Cameron McCormack
c3aabb8cc2
Bug 508725 - Part 6: Modify selector matching to take style scopes into account. r=dbaron
2013-01-09 10:25:48 +11:00
Cameron McCormack
af05b63534
Bug 508725 - Part 5: Record the <style scoped> elements in scope in preparation for selector matching. r=dbaron
2013-01-09 10:25:48 +11:00
Cameron McCormack
27ece3d947
Bug 508725 - Part 3: Create a rule processor for each style scope. r=dbaron
2013-01-09 10:25:47 +11:00
Cameron McCormack
7acdf057ce
Backout bug 508725 (d267bb4b58b5, 50f71edffeb9, 6aec8e22fe60, e62e1f33958a, 0f146c435249, eb959b9f4862, 2b0ee42f3aa0, 02db01cd6796, 2ef0e517d43d, b650588e05c9 and a3c916829d56) for build failure on a CLOSED TREE.
2013-01-08 19:36:21 +11:00
Cameron McCormack
c5a68a5dc2
Bug 508725 - Part 6: Modify selector matching to take style scopes into account. r=dbaron
2013-01-08 19:09:23 +11:00
Cameron McCormack
d0d5f0c03b
Bug 508725 - Part 5: Record the <style scoped> elements in scope in preparation for selector matching. r=dbaron
2013-01-08 19:09:23 +11:00
Cameron McCormack
b525ea3869
Bug 508725 - Part 3: Create a rule processor for each style scope. r=dbaron
2013-01-08 19:09:22 +11:00
Boris Zbarsky
8303fbfe0f
Bug 818400. Add a preference to control :scope and pref it off in release builds for now. r=dbaron
2012-12-24 19:35:34 -08:00
Boris Zbarsky
aaba93baff
Bug 648722 part 2. Make :scope match the context node for selectors API calls. r=dbaron
2012-12-04 23:15:47 -05:00
Boris Zbarsky
1fa20dc707
Bug 648722 part 1. Add a :scope pseudo-class that just matches the same thing as :root for now. r=dbaron
2012-12-04 23:15:47 -05:00
John Schoenick
9cb35b3ef7
Bug 548133 - Remove special handling for object 'pluginurl' param. r=dolske,josh
2012-11-19 11:38:03 -08:00
Brendan Dahl
7e5f38db9d
Bug 115199 - CSS2 @page rule style support. r=dbaron
2012-08-31 14:21:28 -07:00
Boris Zbarsky
4e934f7f8e
Bug 811449 part 8. Get rid of nsGenericElement. r=peterv
2012-11-14 14:10:08 -08:00
Cameron McCormack
1c716ff434
Bug 811581 - Add a base class for all *RuleProcessorData classes. r=bz
2012-11-15 06:09:01 +11:00
Ryan VanderMeulen
5240f9d681
Backed out changesets 0b6b3d2856a4 and 30776e402787 (bug 115199) for reftest failures.
2012-11-13 20:19:18 -05:00
Brendan Dahl
a41fcdd8da
Bug 115199 - CSS2 @page rule style support. r=dbaron
2012-08-31 14:21:28 -07:00
Jacek Szpot
09f9b9a1c3
Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan
2012-10-26 15:32:10 +02:00
Peter Van der Beken
82b618706e
Fix for bug 773780 (Add API for new DOM bindings for Node). r=bz.
2012-10-09 14:31:24 +02:00
Kyle Huey
0ee82049a5
Bug 760331: Coalesce data for inline style across nodes. r=bz
...
This patch enables sharing of an nsAttrValue's MiscContainer between nodes for style rules. MiscContainers of type eCSSStyleRule are now refcounted (with some clever struct packing to ensure that the amount of memory allocated for MiscContainer remains unchanged on 32 and 64 bit). This infrastructure can be used to share most MiscContainer types in the future if we find advantages to sharing other types than just eCSSStyleRuley. A cache mapping strings to MiscContainers has been added to nsHTMLCSSStyleSheet. MiscContainers can be shared between nsAttrValues when one nsAttrValue is SetTo another nsAttrValue or when there is a cache hit in this cache. This patch also adds the ability to tell a style rule that it belongs to an nsHTMLCSSStyleSheet, with appropriate accessor functions to separate that from the existing case of belonging to an nsCSSStyleSheet.
The primary use case is to reduce memory use for pages that have lots of inline style attributes with the same value. This can happen easily with large pages that are automatically generated. An (admittedly pathological) testcase in Bug 686975 sees over 250 MB of memory savings with this change. Reusing the same MiscContainer for multiple nodes saves the overhead of maintaining separate copies of the string containing the serialized value of the style attribute and of creating separate style rules for each node. Eliminating duplicate style rules enables further savings in layout through style context sharing. The testcase sees the amount of memory used by style contexts go from over 250 MB to 10 KB.
Because the cache is based on the text value of the style attribute, it will not handle attributes that have different text values but are parsed into identical style rules. We also do not attempt to share MiscContainers when the node's base URI differs from the document URI. The effect of these limitations is expected to be low.
2012-09-30 09:40:24 -07:00
Simon Montagu
f502732ba2
Add vendor prefix to :dir selector. Bug 562169, r=dbaron
2012-09-29 13:41:10 -07:00
Ehsan Akhgari
243c878d26
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
691ef24b2a
Bug 780618 - Move all error codes to nsError.h; r=ehsan
2012-07-27 17:03:27 +03:00
Simon Montagu
981883b49d
Bug 562169. Add support for :dir(ltr/rtl) CSS selector, layout/style part, r=bz
2012-08-09 20:37:58 -07:00
Matt Brubeck
77d013d0d3
Back out bug 562169 because of Dromaeo DOM regressions
...
Backed out changeset 841cd6e1e585 (bug 562169)
Backed out changeset e226e413dd27 (bug 562169)
Backed out changeset 9c24b7287c5b (bug 562169)
2012-08-08 08:14:48 -07:00
Simon Montagu
5a1e394247
Add support for :dir(ltr/rtl) CSS selector, layout/style part. Bug 562159, r=bz
2012-08-07 21:44:24 -07:00
Cameron McCormack
0470b4ceb7
Bug 649740 - Implement @supports. r=dbaron,bz
2012-08-02 10:32:12 +10:00
Aryeh Gregor
8b4a23fc4c
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Aryeh Gregor
e3e1225e61
Bug 626472 part 1 - Define nsnull as nullptr where available; r=ehsan
2012-07-20 14:16:17 +03:00
Boris Zbarsky
df055137fc
Bug 758885. Don't apply the dynamic :hover reresolution skipping optimization to selectors which can match on mutable state other than :hover. r=dbaron
2012-05-29 00:17:45 -04:00
Gervase Markham
cb6a072c2a
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Josh Matthews
7e2e5dc340
Bug 722853 - Derive private browsing status from docshell when assigning element states. r=dbaron
2012-03-30 02:16:22 -04:00
Ms2ger
b18166e17d
Backout bug 722853 - changeset f40a17213344; r=orange
2012-03-26 18:41:19 +02:00
Josh Matthews
a8e710d1e3
Bug 722853 - Derive private browsing status from docshell when assigning element states. r=dbaron
2012-02-21 09:57:09 -05:00
Boris Zbarsky
fec7497c81
Bug 735481. Skip ancestor filtering on IDs and classes in quirks mode, because that matching needs to be case-insensitive. r=dbaron
2012-03-14 00:44:13 -05:00
Boris Zbarsky
bb4a759c20
Bug 732667. Only do checks for :hover selectors when hover state changes on nodes which have relevant hover rules. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
73e04e8c16
Bug 705877 part 4. Use the TreeMatchContext's ancestor filter, if any, in EnumerateAllRules. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
a85603c9a0
Bug 705877 part 3. Hang an optional Bloom filter and some methods for managing it off the TreeMatchContext. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
16a526edc5
Bug 705877 part 2. Store the hashes of the atoms occurring as IDs, classes, and tag names in selectors that would need to match one of our ancestors. r=dbaron
...
We store a maximum of 4 hashes to save space. Interesting questions are whether 4 is the right number
and whether we should, prioritize ids and classes over tags. In practice, this seems to be good enough
at least performance-wise, though it's possible we could use less memory and still do OK on the performance.
2012-03-12 22:54:14 -05:00
Phil Ringnalda
86022420b1
Back out 83a33626d965:6e9330f5a9bd (bug 732667 and bug 705877) for Windows build bustage
2012-03-12 22:12:41 -07:00
Boris Zbarsky
a79196f052
Bug 732667. Only do checks for :hover selectors when hover state changes on nodes which have relevant hover rules. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
29fd212e56
Bug 705877 part 4. Use the TreeMatchContext's ancestor filter, if any, in EnumerateAllRules. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
7d2fecc5d9
Bug 705877 part 3. Hang an optional Bloom filter and some methods for managing it off the TreeMatchContext. r=dbaron
2012-03-12 22:54:15 -05:00
Boris Zbarsky
14e44b7fec
Bug 705877 part 2. Store the hashes of the atoms occurring as IDs, classes, and tag names in selectors that would need to match one of our ancestors. r=dbaron
...
We store a maximum of 4 hashes to save space. Interesting questions are whether 4 is the right number
and whether we should, prioritize ids and classes over tags. In practice, this seems to be good enough
at least performance-wise, though it's possible we could use less memory and still do OK on the performance.
2012-03-12 22:54:14 -05:00
Nathan Froyd
20f5ce545a
Bug 731615 - Eliminate duplicate headers in layout. rs=smontagu
2012-02-29 10:57:47 -05:00
Zack Weinberg
cb5a4ee507
Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron
2012-02-23 08:19:00 -08:00
Heather Arthur
ab3806d91a
Bug 708874 - API for locking pseudo-class state of an element. r=bz
2012-02-08 10:42:38 -08:00
Nicholas Nethercote
c1dd090b4c
Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett.
2012-01-25 00:52:51 -08:00
Nicholas Nethercote
1240eea7f7
Bug 707865 - Convert nsTArray::SizeOf() to nsTArray::SizeOfExcludingThis(). r=jlebar.
2011-12-15 14:59:53 -08:00
Boris Zbarsky
cd731428ca
Bug 700914. Initialize the rulehash's hashtables lazily. r=dbaron
2011-12-09 05:29:01 -05:00
Nicholas Nethercote
a76fc052f5
Bug 705987 - Use mallocSizeOf in the layout memory reporters. r=khuey,bzbarsky
2011-12-08 21:01:52 -08:00