Commit Graph

997 Commits

Author SHA1 Message Date
Boris Zbarsky
9407377ffd Bug 795221 part 5. Hook up <svg:style> elements to cycle collect their stylesheet. r=smaug
--HG--
rename : content/html/content/crashtests/795221-1.html => content/html/content/crashtests/795221-4.html
2012-10-07 22:39:09 -04:00
Jeff Muizelaar
fb8c5e5cd5 Bug 792199. Only decode visible images immediately when switching to a tab. r=joe
This creates a new method 'StartDecoding' which does a RequestDecode and some
decoding of the image.

--HG--
extra : rebase_source : 89c1c2f40e3dfb6e025939ebf3257f81ce429501
2012-10-04 16:02:15 -04:00
Peter Van der Beken
b5b5988316 Fix for bug 791774 (Hook DOM lists up to the new DOM bindings). r=bz.
--HG--
extra : rebase_source : 873020edd9cd3defc932d77bd26b5d65ebf263cb
2012-06-13 17:18:30 +02:00
Kyle Huey
1ccfbe810b 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
Robert Longson
630fe1e9bd Bug 729139 - Accept negative radius arcs in markup. r=jwatt 2012-09-29 11:19:13 +01:00
Isaac Aggrey
0cc4b12d36 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Matt Woodrow
7e3df0fdae Bug 539356 - Disable test_text.html on android since it crashes on armv6. r=roc 2012-09-29 01:12:39 +12:00
Alexandre Dumont
01f3a22f41 Bug 596753: Flatten layout/svg/base/src into layout/svg. r=dholbert
--HG--
rename : layout/svg/base/src/Makefile.in => layout/svg/Makefile.in
rename : layout/svg/base/src/SVGFEContainerFrame.cpp => layout/svg/SVGFEContainerFrame.cpp
rename : layout/svg/base/src/SVGFEImageFrame.cpp => layout/svg/SVGFEImageFrame.cpp
rename : layout/svg/base/src/SVGFELeafFrame.cpp => layout/svg/SVGFELeafFrame.cpp
rename : layout/svg/base/src/SVGFEUnstyledLeafFrame.cpp => layout/svg/SVGFEUnstyledLeafFrame.cpp
rename : layout/svg/base/src/SVGViewFrame.cpp => layout/svg/SVGViewFrame.cpp
rename : layout/svg/base/src/nsISVGChildFrame.h => layout/svg/nsISVGChildFrame.h
rename : layout/svg/base/src/nsISVGGlyphFragmentNode.h => layout/svg/nsISVGGlyphFragmentNode.h
rename : layout/svg/base/src/nsISVGSVGFrame.h => layout/svg/nsISVGSVGFrame.h
rename : layout/svg/base/src/nsSVGAFrame.cpp => layout/svg/nsSVGAFrame.cpp
rename : layout/svg/base/src/nsSVGClipPathFrame.cpp => layout/svg/nsSVGClipPathFrame.cpp
rename : layout/svg/base/src/nsSVGClipPathFrame.h => layout/svg/nsSVGClipPathFrame.h
rename : layout/svg/base/src/nsSVGContainerFrame.cpp => layout/svg/nsSVGContainerFrame.cpp
rename : layout/svg/base/src/nsSVGContainerFrame.h => layout/svg/nsSVGContainerFrame.h
rename : layout/svg/base/src/nsSVGEffects.cpp => layout/svg/nsSVGEffects.cpp
rename : layout/svg/base/src/nsSVGEffects.h => layout/svg/nsSVGEffects.h
rename : layout/svg/base/src/nsSVGFilterFrame.cpp => layout/svg/nsSVGFilterFrame.cpp
rename : layout/svg/base/src/nsSVGFilterFrame.h => layout/svg/nsSVGFilterFrame.h
rename : layout/svg/base/src/nsSVGFilterInstance.cpp => layout/svg/nsSVGFilterInstance.cpp
rename : layout/svg/base/src/nsSVGFilterInstance.h => layout/svg/nsSVGFilterInstance.h
rename : layout/svg/base/src/nsSVGFilterPaintCallback.h => layout/svg/nsSVGFilterPaintCallback.h
rename : layout/svg/base/src/nsSVGForeignObjectFrame.cpp => layout/svg/nsSVGForeignObjectFrame.cpp
rename : layout/svg/base/src/nsSVGForeignObjectFrame.h => layout/svg/nsSVGForeignObjectFrame.h
rename : layout/svg/base/src/nsSVGGFrame.cpp => layout/svg/nsSVGGFrame.cpp
rename : layout/svg/base/src/nsSVGGFrame.h => layout/svg/nsSVGGFrame.h
rename : layout/svg/base/src/nsSVGGenericContainerFrame.cpp => layout/svg/nsSVGGenericContainerFrame.cpp
rename : layout/svg/base/src/nsSVGGenericContainerFrame.h => layout/svg/nsSVGGenericContainerFrame.h
rename : layout/svg/base/src/nsSVGGeometryFrame.cpp => layout/svg/nsSVGGeometryFrame.cpp
rename : layout/svg/base/src/nsSVGGeometryFrame.h => layout/svg/nsSVGGeometryFrame.h
rename : layout/svg/base/src/nsSVGGlyphFrame.cpp => layout/svg/nsSVGGlyphFrame.cpp
rename : layout/svg/base/src/nsSVGGlyphFrame.h => layout/svg/nsSVGGlyphFrame.h
rename : layout/svg/base/src/nsSVGGradientFrame.cpp => layout/svg/nsSVGGradientFrame.cpp
rename : layout/svg/base/src/nsSVGGradientFrame.h => layout/svg/nsSVGGradientFrame.h
rename : layout/svg/base/src/nsSVGImageFrame.cpp => layout/svg/nsSVGImageFrame.cpp
rename : layout/svg/base/src/nsSVGInnerSVGFrame.cpp => layout/svg/nsSVGInnerSVGFrame.cpp
rename : layout/svg/base/src/nsSVGInnerSVGFrame.h => layout/svg/nsSVGInnerSVGFrame.h
rename : layout/svg/base/src/nsSVGIntegrationUtils.cpp => layout/svg/nsSVGIntegrationUtils.cpp
rename : layout/svg/base/src/nsSVGIntegrationUtils.h => layout/svg/nsSVGIntegrationUtils.h
rename : layout/svg/base/src/nsSVGMarkerFrame.cpp => layout/svg/nsSVGMarkerFrame.cpp
rename : layout/svg/base/src/nsSVGMarkerFrame.h => layout/svg/nsSVGMarkerFrame.h
rename : layout/svg/base/src/nsSVGMaskFrame.cpp => layout/svg/nsSVGMaskFrame.cpp
rename : layout/svg/base/src/nsSVGMaskFrame.h => layout/svg/nsSVGMaskFrame.h
rename : layout/svg/base/src/nsSVGOuterSVGFrame.cpp => layout/svg/nsSVGOuterSVGFrame.cpp
rename : layout/svg/base/src/nsSVGOuterSVGFrame.h => layout/svg/nsSVGOuterSVGFrame.h
rename : layout/svg/base/src/nsSVGPaintServerFrame.cpp => layout/svg/nsSVGPaintServerFrame.cpp
rename : layout/svg/base/src/nsSVGPaintServerFrame.h => layout/svg/nsSVGPaintServerFrame.h
rename : layout/svg/base/src/nsSVGPathGeometryFrame.cpp => layout/svg/nsSVGPathGeometryFrame.cpp
rename : layout/svg/base/src/nsSVGPathGeometryFrame.h => layout/svg/nsSVGPathGeometryFrame.h
rename : layout/svg/base/src/nsSVGPatternFrame.cpp => layout/svg/nsSVGPatternFrame.cpp
rename : layout/svg/base/src/nsSVGPatternFrame.h => layout/svg/nsSVGPatternFrame.h
rename : layout/svg/base/src/nsSVGStopFrame.cpp => layout/svg/nsSVGStopFrame.cpp
rename : layout/svg/base/src/nsSVGSwitchFrame.cpp => layout/svg/nsSVGSwitchFrame.cpp
rename : layout/svg/base/src/nsSVGTSpanFrame.cpp => layout/svg/nsSVGTSpanFrame.cpp
rename : layout/svg/base/src/nsSVGTSpanFrame.h => layout/svg/nsSVGTSpanFrame.h
rename : layout/svg/base/src/nsSVGTextContainerFrame.cpp => layout/svg/nsSVGTextContainerFrame.cpp
rename : layout/svg/base/src/nsSVGTextContainerFrame.h => layout/svg/nsSVGTextContainerFrame.h
rename : layout/svg/base/src/nsSVGTextFrame.cpp => layout/svg/nsSVGTextFrame.cpp
rename : layout/svg/base/src/nsSVGTextFrame.h => layout/svg/nsSVGTextFrame.h
rename : layout/svg/base/src/nsSVGTextPathFrame.cpp => layout/svg/nsSVGTextPathFrame.cpp
rename : layout/svg/base/src/nsSVGTextPathFrame.h => layout/svg/nsSVGTextPathFrame.h
rename : layout/svg/base/src/nsSVGUseFrame.cpp => layout/svg/nsSVGUseFrame.cpp
rename : layout/svg/base/src/nsSVGUtils.cpp => layout/svg/nsSVGUtils.cpp
rename : layout/svg/base/src/nsSVGUtils.h => layout/svg/nsSVGUtils.h
rename : layout/svg/base/src/resources/content/svgBindings.xml => layout/svg/resources/content/svgBindings.xml
rename : layout/svg/base/src/svg.css => layout/svg/svg.css
2012-09-24 23:01:21 +02:00
Cameron McCormack
ed5dd572c2 Bug 793612 - Make nsSVGArcConverter robust against zero-sized arc segments. r=longsonr 2012-09-24 22:07:41 +10:00
Reuben Morais
c4e8f2f436 Bug 793440 - Fix tautological constant out of range check on DOMSVGTransform.cpp. r=longsonr 2012-09-22 20:48:27 -04:00
Robert Longson
3e3a71ce0c Bug 567848 - Split content methods from nsSVGUtils into SVGContentUtils. r=dholbert
--HG--
rename : layout/svg/base/src/nsSVGUtils.cpp => content/svg/content/src/SVGContentUtils.cpp
rename : layout/svg/base/src/nsSVGUtils.h => content/svg/content/src/SVGContentUtils.h
2012-09-22 20:26:05 +01:00
Peter Van der Beken
d21c8a19b6 Fix for bug 788532 (Add the new DOM bindings API to DOM lists). r=bz.
--HG--
extra : rebase_source : 18e21a786b6a9cc2aeada52ba5ca3a2614cb596b
2012-09-05 22:49:53 +02:00
Peter Van der Beken
cc7dbc2506 Fix for bug 788532 (Add the new DOM bindings API to DOM lists) - Rename Length to LengthNoFlush in SVG DOM lists. r=bz.
--HG--
extra : rebase_source : 6db1028fe04d03286561ac13fe7ea818f54245bf
2012-09-05 16:52:57 +02:00
Jonathan Watt
98393bbc28 Bug 787722 - Prevent out-of-bounds read/writes under nsSVGFELightingElement::Filter. r=roc.
--HG--
extra : rebase_source : 8354ba5e16ca00a09a7b794b2408db63e76ca9df
2012-09-13 12:23:28 +01:00
Robert Longson
6f3a540d19 Bug 783995 - enable animation of view element attributes. r=dholbert 2012-09-09 12:44:03 +01:00
Daniel Holbert
c1f983b3b6 Bug 788862: Initialize 'segType' in SVGPathData::ConstructPath. r=jwatt 2012-09-06 11:33:01 -07:00
Ehsan Akhgari
51966b80a6 Bug 579517 follow-up: Remove NSPR types that crept in
--HG--
extra : rebase_source : 3fc28d51fcb5c63e417b0fe2b90fb6e1eb0cac63
2012-09-06 10:11:28 -04:00
Cameron McCormack
62846ede0b Bug 655877 - Part 45: Note a crashtest that involves XBL as triggering assertions. r=longsonr 2012-09-06 16:07:53 +10:00
Robert Longson
a936c01668 Back out 92f2cf2f42b2 (bug 754592) for causing regression 2012-09-04 14:53:04 -07:00
Randell Jesup
29ac5c0b8c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Jonathan Watt
450c028ef3 Bug 767056 - Stop calling nsLayoutUtils::PostRestyleEvent during reflow to avoid infinite loop. r=roc.
--HG--
extra : rebase_source : c397431c824e2d1f624765636320129201209b60
2012-08-31 15:30:18 +01:00
Ryan VanderMeulen
db0d22bd6d Merge the last PGO-green inbound changeset to m-c. 2012-08-30 21:54:09 -04:00
Kyle Huey
3ff74985e4 Bug 786048: Rename 'JSEventListener' to 'EventHandler' to better match the spec's terminology. r=smaug 2012-08-30 09:25:10 -07:00
David Zbarsky
390bb39784 Bug 779084 - Move querySelector stuff out of nsGenericElement and into nsINode r=bz 2012-08-30 13:10:13 -04:00
Boris Zbarsky
073e13c1ad Bug 732209 part 2. Communicate the CORS state of style link loads to the CSS loader. r=sicking 2012-08-28 13:10:07 -04:00
Daniel Holbert
e9b3a11922 (no bug) fix an instance of end-of-line whitespace, so I can label this push as DONTBUILD since it just backs out & relands a cset (no code changes, other than this whitespace fix) 2012-08-25 10:06:10 -07:00
Robert Longson
28a94da8c1 Bug 783915 - Make SVG Fragment identifier processing more robust. r=dholbert 2012-08-25 10:02:34 -07:00
Daniel Holbert
ea0d71281a back out 8247f7b038ce because it landed with the wrong bug # in commit message (said bug 785017, should've said bug 783915) 2012-08-25 10:01:48 -07:00
Robert Longson
7e597a65cd Bug 785017 - Make SVG Fragment identifier processing more robust. r=dholbert 2012-08-25 11:07:54 +01:00
Robert Longson
adaa947aad Bug 785017 - Use NS_GetStaticAtom in svg content where appropriate. r=dholbert 2012-08-24 08:29:09 +01:00
Daniel Holbert
e3dbe8e8d3 Bug 784828 patch 2: Make nsSVGAttrTearoffTable lookups use nsRefPtr instead of manual NS_ADDREF refcounting, in nsSVGLength2.cpp. r=longsonr 2012-08-22 23:24:43 -07:00
Daniel Holbert
8e5b38878d Bug 784828 patch 1: Make nsSVGAttrTearoffTable lookups use nsRefPtr instead of manual NS_ADDREF refcounting, in DOMSVG*List.cpp. r=longsonr 2012-08-22 23:24:41 -07:00
Peter Van der Beken
854457d901 Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Ehsan Akhgari
8c296bbcd4 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
Ed Morley
57fe127515 Merge mozilla-central to mozilla-inbound 2012-08-15 19:00:48 +01:00
Kyle Huey
433d46efea Merge m-c to b-s. 2012-08-15 06:25:20 -07:00
Kyle Huey
697d217729 Bug 697230: Part 2 - Push onload blocking logic down into imagelib. r=joe sr=bz 2012-08-13 15:58:53 -07:00
Kyle Huey
059e6b9d3e Bug 683290: Discard images that are not in the DOM. r=bz 2012-08-13 15:11:50 -07:00
David Zbarsky
8d316c5861 Bug 773842 - Fix build warnings under content/ r=mounir 2012-08-10 14:01:16 -04:00
Robert Longson
5bbf8d04f0 Bug 782387 - Blank SVG rendering, after clicking a link to a view fragment and then navigating back. r=dholbert 2012-08-15 12:50:48 +01:00
Aryeh Gregor
982100775b Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Jonathan Watt
63a2fee122 Bug 782141 - Don't mix signed and unsigned variables in nsSVGFEMorphologyElement::Filter(), and clamp radii to 100000. r=roc. 2012-08-14 10:12:52 +01:00
Aryeh Gregor
5662d18449 Bug 780469 - Reduce unnecessary includes in some content/ header files; r=bz 2012-08-06 15:02:08 +03:00
David Zbarsky
fe804d085c [Bug 780428] Don't include nsIFrame.h in places where it's not necessary r=roc 2012-08-05 23:00:56 -04:00
Mike Hommey
c1b35e7b2a Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Aryeh Gregor
afc1681fc9 Bug 563659 part 3 - Make Element inherit from FragmentOrElement; r=bz 2012-06-27 16:01:55 +03:00
Ehsan Akhgari
c80897316e Merge the nullptr conversion from mozilla-central into mozilla-inbound 2012-07-30 10:28:15 -04:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Aryeh Gregor
58769bb9d6 Bug 777292 - Don't use |= on nsresult; r=ehsan 2012-07-27 17:03:08 +03:00
Robert Longson
42a531f78a Tests for Bug 710974 - extraneous commas should be rejected by number list parser. r=dholbert 2012-07-30 10:02:50 +01:00