Commit Graph

14543 Commits

Author SHA1 Message Date
Matt Woodrow
543dfebcda Bug 795796 - Fix empty transactions. r=cjones 2012-10-01 17:29:02 +13:00
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
Mounir Lamouri
ebe616f9e1 Merge m-i inm-c. 2012-09-30 13:19:15 +01:00
Daniel Holbert
7e0081585f Bug 666041: Reftests for css3-flexbox. (tests-only)
--HG--
rename : layout/reftests/bugs/solidblue.png => layout/reftests/flexbox/solidblue.png
2012-09-29 23:42:29 -07:00
Daniel Holbert
4d32a021d6 Bug 666041 patch 8: Add special handling for "min-width: auto" value on flex items. r=dbaron 2012-09-29 23:38:46 -07:00
Daniel Holbert
bd68c21394 Bug 666041 patch 7: implementation of flex container class for CSS3 flexbox. r=dbaron 2012-09-29 23:38:46 -07:00
Daniel Holbert
3544930bb5 Bug 666041 patch 6.5: Add flag to nsHTMLReflowState & ComputeSize for measuring auto height. r=dbaron 2012-09-29 23:38:46 -07:00
Matt Woodrow
04f480d859 Bug 795611 - Call virtual InvalidateFrame from InvalidateFrameSubtree since nsTable*Frame overloads it. r=cjones 2012-09-30 19:20:25 +13:00
Matt Woodrow
61b00ebf38 Bug 795576 - Correctly add the NS_FRAME_UPDATE_LAYER_TREE when invalidating inside a popup. r=cjones 2012-09-30 19:20:24 +13:00
Matt Woodrow
48360d5f92 Bug 795646 - Add crashtest for merged nsDisplayFixedPosition items. r=cjones 2012-09-30 19:20:24 +13:00
Ryan VanderMeulen
b9204da41d Merge the last PGO-green inbound changeset to m-c. 2012-09-29 23:38:08 -04:00
Matt Woodrow
0158c64b27 Bug 795591 - Disable merged display item tracking. r=cjones 2012-09-30 13:55:10 +13:00
Simon Montagu
a6d148a96d Add vendor prefix to :dir selector. Bug 562169, r=dbaron 2012-09-29 13:41:10 -07:00
Jonathan Kew
2cf5d23c2c bug 674373 pt 6 - support HiDPI display in Cocoa widget code. r=roc,smichaud 2012-09-29 12:36:09 +01:00
Jonathan Kew
e18b10e5fb bug 674373 pt 5 - provide a fullZoom API in nsIDOMWindowUtils, and use this rather than inferring zoom from CSS to device pixel ratio. r=roc 2012-09-29 12:35:19 +01:00
Jonathan Kew
2c2d5f0ecf bug 674373 pt 4 - pass device-to-CSS pixel ratio to LookAndFeel code when requesting a font style. r=roc 2012-09-29 12:35:08 +01:00
Joe Drew
4b9e01692f Bug 486918 - Create and obey a high-quality downscaling pref, and turn it off on OS X and mobile. r=jlebar 2012-09-27 14:12:56 -04:00
Robert Longson
eb62e6dca9 Bug 729139 - Accept negative radius arcs in markup. r=jwatt 2012-09-29 11:19:13 +01:00
Doug Sherk
6e7d4f9757 Bug 746502: Add support for <meta name=viewport> on B2G/async panning and zooming r=cjones,smaug 2012-09-28 22:18:18 -04:00
Doug Sherk
c0e08ee726 Bug 784908: Part 1: Change names of FrameMetrics variables to be more descriptive, add documentation, change some coordinate spaces. r=roc 2012-09-28 22:16:34 -04:00
Ed Morley
024d4659cf Backout bec7e68cad9a & a6228bc28958 (bug 786299) for Windows compilation errors on a CLOSED TREE 2012-09-29 01:44:30 +01:00
Jason Duell
223a507caf Bug 786299 - Part 2: Delete app-cache related to an app when uninstalled. r=honza 2012-09-28 16:13:17 -07:00
Ed Morley
722b933229 Backout 92530b29ac24, 42e659956dc6 & 38277196c099 (bug 486918), d3b69fe15ac3 & b2dba2108722 (bug 786444), e7381ac9e30a (bug 786449) on suspicion of causing Android reftest failures on a CLOSED TREE 2012-09-28 23:00:28 +01:00
Ed Morley
7012ae5306 Backout ec0dcd401a3f (bug 786108) for crashes 2012-09-28 22:04:56 +01:00
Scott Johnson
e7b108bf5e Bug 795313: Modify order of conditionals in UpdateFontInflationDataWidthFor() for performance enhancements. [r=dbaron] 2012-09-28 14:38:33 -05:00
Joe Drew
db8e984995 Bug 486918 - Create and obey a high-quality downscaling pref, and turn it off on OS X and mobile. r=jlebar
--HG--
extra : rebase_source : 386bee19522e3cb8bca16ec40e3c092a52ae18d2
2012-09-27 14:12:56 -04:00
Ryan VanderMeulen
25626ce092 Merge m-c to inbound. 2012-09-29 23:45:54 -04:00
Steve Workman
fd6793666f Bug 734546: Add DASH Decoders and Readers r=cpearce r=ted 2012-09-29 16:29:04 -07:00
Seth Fowler
2c3af5ccdc Bug 786108 - Cache UTF-16 version of URI to prevent repeated conversions in the CSS scanner, and free the cache after a short time. r=bz 2012-09-28 09:56:47 -07:00
Isaac Aggrey
997db4d142 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Gene Lian
9491b6633a Bug 789973 - B2G system time: adjust system clock after receiving NITZ timestamp (part 1). r=jlebar 2012-09-28 14:02:28 +08:00
foudfou
d72827c0aa Bug 785542 - Convert usages of PR_MIN and PR_MAX to NS_MIN and NS_MAX; r=ehsan
Occurences of PR_MAX in layout/style/nsCSSProps.cpp and xpcom/glue/nsTArray.h
can not be converted without C++11 support (constexpr).

--HG--
extra : rebase_source : 3b4f7e26690fad487dd11594449948411d4e79bc
2012-09-27 23:44:47 +02:00
Ed Morley
9d3a09a092 Bug 752786 - Disable one part of test_bug469613.xul on OS X 10.8 for too many intermittent failures 2012-09-28 15:45:29 +01:00
Matt Woodrow
d9a6418c44 Bug 539356 - Revert LayerTreeInvalidation changes to detect Image changes, landed on a CLOSED TREE. r=roc 2012-09-29 01:12:59 +12:00
Ed Morley
9afe80f95c Backout 52be204da1cf (bug 776663), 965397b043c0 (bug 777508), 182c763efa68 (bug 776832), a2a509184b07 & cba5ba69091f (bug 789973) for failures in test_child_process_shutdown_message.html and friends / conflicting with the backout on a CLOSED TREE 2012-09-28 14:08:04 +01:00
Robert O'Callahan
4af0a9996d Bug 539356. Make PruneDisplayListForExtraPage prune print preview properly. r=mattwoodrow
PruneDisplayListForExtraPage wasn't pruning properly in print preview. It
was pruning to the RootReferenceFrame, which is per-page when printing normally,
but is the ancestor of all pages in print preview, so it wasn't doing anything in
print preview.
So, pass in the nsPageFrame we want to prune to. This prevents bogus
entirely-clipped-out display items appearing in the display list for the page.
2012-09-28 23:19:39 +12:00
Robert O'Callahan
c54bcbb4f7 Bug 539356 - Fix mActiveScrolledRootOffset to be offset to the reference frame. r=mattwoodrow 2012-09-28 23:19:39 +12:00
Matt Woodrow
44b3b5cbeb Bug 781053 - Part 3 - Force the throbber into it's own layer. r=roc 2012-09-25 08:31:48 +12:00
Matt Woodrow
3fb0e93449 Bug 781053 - Part 2 - Trigger empty transactions when an animated image in an ImageLayer changes frame. r=roc 2012-09-25 08:31:30 +12:00
Matt Woodrow
28ef42bcbf Bug 781053 - Part 1 - Allow conversion of nsImageBoxFrame to an ImageLayer. r=roc 2012-09-25 08:29:14 +12:00
Robert O'Callahan
89d50b3d5f Bug 770106. nsDisplayButtonBorderBackground should use the button's border-box for hit-testing, not its visual overflow area. r=mattwoodrow 2012-09-28 23:19:38 +12:00
Matt Woodrow
bc48b0711b Bug 539356 - Avoid some causes of unnecessary painting. r=roc 2012-09-26 11:59:56 +12:00
Matt Woodrow
6cc55ebd06 Bug 539356 - Handled scrolled inactive layers trees correctly. r=roc 2012-09-17 10:57:22 +12:00
Matt Woodrow
07dd94ec3a Bug 539356 - Use rect invalidation in XUL tree's to avoid over invalidation. r=roc 2012-08-29 17:49:18 +12:00
Matt Woodrow
f0d7341b98 Bug 539356 - Correctly invalidate SVG observers. r=roc 2012-08-29 17:49:16 +12:00
Matt Woodrow
1572061ab5 Bug 539356 - Make the table code use rect invalidation to avoid over invalidation. r=roc 2012-08-29 17:48:45 +12:00
Matt Woodrow
5f32437ca2 Bug 539356 - Add an option for frames to invalid just a rect instead of the frame bounds. r=roc 2012-08-29 17:48:45 +12:00
Matt Woodrow
326c678fc2 Bug 539356 - Add HasRetainedDataFor. r=roc 2012-08-29 17:48:45 +12:00
Robert O'Callahan
e920e6f5eb Bug 770058. Part 2: When the document switches between active and inactive, invalidate all frames. r=mattwoodrow 2012-08-29 17:48:45 +12:00
Robert O'Callahan
0cff39f9ec Bug 770058. InvalidateFrame doesn't need flags, we can just avoid calling ScheduleRepaint if we find any ancestor frame with a descendant that needs invalidation. r=mattwoodrow 2012-08-29 17:48:44 +12:00