Commit Graph

78 Commits

Author SHA1 Message Date
Kyle Huey
e5eb83ac5a 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
Isaac Aggrey
e496b51126 Bug 795351: Replace LL_MAXINT, LL_MININT, LL_MAXUINT with stdint versions; r=ehsan 2012-09-28 14:55:23 -05:00
Isaac Aggrey
b33410feb2 Bug 789847 - Remove PR_CALLBACK usage from tree 2012-09-25 11:18:38 -05:00
Ehsan Akhgari
0fd9123eac 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
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Rafael Ávila de Espíndola
b0ea6e34bb Bug 774028 - Fix variable declaration. r=dholbert. 2012-07-15 00:12:53 -04:00
Brian Birtles
8ed82c9ac8 Bug 752902 - Call Unlink before clearing time value specs; r=dholbert 2012-05-23 08:21:23 +09:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Brian Birtles
cef9ecb825 Bug 512525 - Implement SVG Fragment Identifier parsing and animation hyperlinking - Part 1 infrastructure to support hyperlinking. r=dholbert 2012-05-17 10:56:57 +01:00
Nicholas Nethercote
85b9728d6c Bug 711895 - Tweak the warning options used for GCC builds (3rd attempt). r=waldo,derf,khuey,mhommey.
--HG--
extra : rebase_source : 20540c9b838ee3be6cb0847c1b90fdc3bd44059d
2012-03-21 22:21:16 -07:00
Nicholas Nethercote
c4ee2f9bdc Backed out changeset 0124795a8cbb (bug 711895) due to i10n build bustage. r=me. 2012-03-21 21:46:27 -07:00
Nicholas Nethercote
5524d35c04 Bug 711895 - Tweak the warning options used for GCC builds (2nd attempt). r=waldo,derf,khuey,mhommey,jwatt. 2012-03-15 19:40:00 -07:00
Rafael Ávila de Espíndola
8db92c8db2 Bug 723534 - Remove dead default cases. r=ehsan. 2012-02-24 08:36:53 -05:00
Brian Birtles
7ad86b97e5 Bug 705236 part 1 - Allow trailing separator in SMIL values list; r=dholbert 2012-02-24 09:45:40 +09:00
Brian Birtles
84e9938c0c Bug 720103 - Detect and break create-delete cycles in SMIL timegraphs; r=dholbert 2012-02-02 08:58:58 +09:00
Brian Birtles
39c3899ca5 Bug 720103 - Pass timed element not interval to notify new interval callback; r=dholbert 2012-01-31 09:54:10 +09:00
Matt Brubeck
22477b5b6b Back out da3319e4987c (bug 704482) because of test_smilAccessKey.xhtml failure 2011-11-23 19:02:43 -08:00
Daniel Holbert
557975b943 Bug 704482: Reject 'accessKey' time specifications in SVG animation elements when scripting is disabled. r=birtles r=roc 2011-11-23 17:49:26 -08:00
Brian Birtles
e49647895e Bug 691337 - Detect integer overflow when creating instance times; r=longsonr 2011-11-16 08:56:32 +13:00
Brian Birtles
492570a156 Bug 697640 - Ignore self-dependent end instance times when determining if an open-ended interval is ok; r=dholbert 2011-11-14 16:58:30 +13:00
Brian Birtles
28e21c581e Bug 690994 - Check for self-dependent times when there are coincident zero-duration intervals; r=dholbert 2011-11-14 16:58:30 +13:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Brian Birtles
a819b6b88c Bug 682184 part 2 - Add nsSMILTimeValue::IsResolved; r=dholbert 2011-09-07 09:20:40 +09:00
Brian Birtles
08eeeda336 Bug 682184 part 1 - Rename nsSMILTimeValue::IsResolved to IsDefinite; r=dholbert 2011-09-07 09:20:40 +09:00
Ehsan Akhgari
78f4e1ccb9 Revert to 176fae7de173 which was fine.
Sorry for breaking the history, won't trust TBPL, ever again. :(
2011-09-02 09:15:54 -04:00
Ehsan Akhgari
a171549936 Revert to changeset e6fc4594c22e which was the last one to get a green Win7 tp run 2011-09-02 09:03:08 -04:00
Brian Birtles
cfb3ac26f3 Bug 678938 - SMIL: Make sure current interval is properly cleared when doing a rewind; r=dholbert 2011-09-02 08:15:44 +09:00
Brian Birtles
2be626a78f Bug 678847 part 2 - SMIL: Fix recursion with self-referential end conditions on open intervals; r=dholbert 2011-09-02 08:14:58 +09:00
Brian Birtles
c05de232af Bug 670313 - Check range of instance time values when they are passed in; r=dholbert 2011-07-25 10:46:08 -07:00
Brian Birtles
dd63118982 Bug 669225 part 7 - Mark stack classes as such; r=dholbert 2011-07-25 10:46:04 -07:00
Brian Birtles
0a4ca726ca Bug 669225 part 6 - Break dependencies sooner on unlink; r=dholbert 2011-07-25 10:45:49 -07:00
Brian Birtles
ac3e371931 Bug 669225 part 5 - Make sure other removal functors don't remove instance times that should be preserved; r=dholbert 2011-07-25 10:45:29 -07:00
Brian Birtles
e94f86fd06 Bug 669225 part 4 - Make sure filtering of instance times doesn't remove the previous interval's end time; r=dholbert 2011-07-25 10:45:03 -07:00
Brian Birtles
5fc127fdbc Bug 669225 part 3 - Add assertion to catch potentially problematic instance time deletion; r=dholbert 2011-07-25 10:44:58 -07:00
Brian Birtles
a9772f3991 Bug 669225 part 2 - Preserve instance times that belong to intervals; r=dholbert 2011-07-25 10:44:54 -07:00
Brian Birtles
5c758ce335 Bug 669234 - Use AutoRestore to manage depth recursion tracking in nsSMILTimedElement, r=dholbert 2011-07-15 11:17:15 +09:00
Brian Birtles
e5b308da49 Bug 665334 part 3 - Don't remove instance times used as fixed interval endpoints, r=dholbert 2011-07-02 12:37:56 +09:00
Brian Birtles
dbea318c75 Bug 665334 part 2 - Add fallback to detect infinite recursion when updating the interval and bail out, r=dholbert 2011-07-02 12:37:47 +09:00
Brian Birtles
3606b29e7b Bug 664343 - Batch updates to current interval, r=dholbert 2011-07-02 12:37:10 +09:00
Brian Birtles
1ffb9cb392 Bug 663288 - Don't allow instance times to be self-dependent, r=dholbert 2011-06-22 10:12:35 +09:00
Brian Birtles
df2767992e Bug 650732 - Move interval change notifications into the timed element, r=dholbert 2011-06-15 09:16:57 +09:00
Daniel Holbert
0ed416d521 Bug 604147: Make nsSMILTimedElement::GetNextInterval return PRBool instead of nsresult. r=birtles 2011-03-27 19:10:33 -04:00
Brian Birtles
2b13cacbcd Bug 615872 Part 2 - SVG SMIL: Remove local resamples from timed elements; r=dholbert; a=roc 2010-12-23 14:48:31 +09:00
Brian Birtles
365bdf5a91 Bug 615002 - SVG SMIL: Ignore previous milestones if we've been reset; r=dholbert; a=roc 2010-12-14 09:38:14 +09:00
Brian Birtles
c6097b97f5 Bug 605345 - SVG SMIL: Fix time container pause state handling to avoid negative container times; r=dholbert; a=blocking-2.0 2010-11-10 08:22:02 +09:00
Brian Birtles
c9ec008e48 Bug 579828 - SVG SMIL: Trim, don't prune invalid active intervals; r=dholbert; a=roc 2010-10-20 08:55:09 +09:00
Brian Birtles
721bffca0b Bug 596796 - SVG SMIL: Fix inconsistent state when resetting current interval; r=dholbert; a=roc 2010-10-13 09:20:12 +09:00
Brian Birtles
a7ca4fe4a3 Bug 594653 - SVG SMIL: Don't use InstanceTimeComparator on times without serial numbers; r=dholbert; a=roc 2010-10-13 09:17:55 +09:00
Brian Birtles
e679591d1a Bug 588287 - SVG SMIL: Fix reparenting animation to younger time container; r=dholbert; a=blocking-final 2010-10-13 09:15:32 +09:00