The new nsDisplayResolution layer type is created for any subdocument whose
presShell specifies a non-1.0 resolution. This is specifically needed for
platforms such as Android and Metro, where the presShells corresponding to
the tabs (which have non-1.0 resolutions) are not the root presShell.
This patch does the following:
* Move nsIFrame::IntrinsicSize to mozilla::IntrinsicSize so that it can
be forward-declared.
* Move a number of templated inline nsLayoutUtils methods to nsIFrame.
* Use mozilla::layout::FrameChildListID instead of the
nsIFrame::ChildListID typedef in nsLayoutUtils.h.
* Move nsReflowFrameRunnable to its only user, nsProgressMeterFrame.cpp.
* Make a number of functions requiring nsIFrame.h out-of-line.
* Remove the nsIFrame.h #include from nsLayoutUtils.h and add it to the
places which require it implicitly.
Specifically:
* move all the frame dump methods to nsIFrame. Especially nsFrame::ListTag
was annoying, often requiring a cast to nsFrame*.
* print common values in the same order for all types of frames
* print fluid continuations as "next-in-flow=%p" and non-fluid as
"next-continuation=%p" (as before)
* print the style-context more compactly, e.g.
"[sc=0x7faa6b60e0a0] pst=:first-line" becomes
"[sc=0x7faa6b60e0a0:first-line]"
* suppress printing visual/scroll-overflow rects when they are identical
to mRect and do the same for nsLineBox::List where it was especially
hard to see which lines actually had real overflow
* fix a bug that printed the child list name at the far right when the
principal list was empty (making it hard to see)
* print the address of child lists (other than the principal list) to
help debug frame list property bugs
* s/NS_IMETHODIMP/void/
This patch does several things. Sorry.
In BuildDisplayList implementations, instead of wrapping display items in nsDisplayClip, we
push clip state onto the nsDisplayListBuilder and give the display items an
explicit clip when they're created.
In FrameLayerBuilder, we use the explicit clips we find on display items instead of
computing our own.
We remove nsDisplayClip and everything that depends on it.
We remove ExplodeAnonymousChildLists. With nsDisplayClip gone, and
nsDisplayOptionEventGrabber removed in a previous patch, there are no
anonymous child lists.
nsDisplayItem::TryMerge implementations need to make sure they have the same
clip before being merged.
I ripped out the part of PruneDisplayListForExtraPage that adjusts clip rects.
As far as I can tell, it isn't actually necessary.
--HG--
extra : rebase_source : 6f3988b385d0ac54ab26fad10b12173884441f48
Except for the changes in:
layout/generic/nsIFrame.h (part)
layout/style/nsComputedDOMStyle.h (all)
layout/style/nsRuleNode.cpp (part)
layout/style/nsStyleContext.cpp (part)
layout/style/nsStyleContext.h (part)
(see patch 3b in the bug), this patch was written with the sed script:
s/\<GetStyle\(Font\|Color\|List\|Text\|Visibility\|Quotes\|UserInterface\|TableBorder\|SVG\|Background\|Position\|TextReset\|Display\|Content\|UIReset\|Table\|Margin\|Padding\|Border\|Outline\|XUL\|SVGReset\|Column\)\>/Style\1/g
Original work from :roc.
Add check in nsFrameLoader::ShowRemoteFrame() so restyle of subdocument frames
doesn't resize remote content until first reflow finished and size is decided.
--HG--
extra : rebase_source : 24959ad409eb4e8993ae9eb0a82f5d670866ba54
This was autogenerated by basically replacing all occurrences of the word "nsIView" with nsView.
--HG--
rename : view/public/nsIView.h => view/public/nsView.h
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.