Commit Graph

111 Commits

Author SHA1 Message Date
Seth Fowler
0a654b9497 Bug 695763. Part 2. Invalidate list style images if they are not decoded and we are asked to do a sync decode. r=roc 2013-06-22 11:30:57 -05:00
Boris Zbarsky
ea6d9a6694 Bug 879628. Don't screw up the text from earlier counters when using counters() with various list styles. r=dbaron 2013-06-07 22:45:46 -04:00
Timothy Nikkel
e6710aa1e3 Bug 877458. Bullet frame should honour the sync decode images flag. r=matt.woodrow 2013-05-29 18:23:31 -05:00
Robert O'Callahan
2817c39fd2 Bug 862180. Part 2: Rename nsDisplayItem::GetUnderlyingFrame() to Frame(). r=mattwoodrow 2013-04-20 00:02:13 +12:00
Seth Fowler
34385b573b Bug 853774 - nsBulletFrame should handle its requests more safely. r=tn
--HG--
extra : rebase_source : cdbf51bcb02cf7b072881e0bc9425fd64ebe3015
2013-04-12 10:05:57 -07:00
Seth Fowler
66d7e369f0 Bug 842850 (Part 1) - Use an SVGImageContext class for overridden SVG properties. r=dholbert,joe sr=bz 2013-02-28 12:22:43 -08:00
L. David Baron
b95410686a Bug 839809: Make counter-increments and list counting that would go past our internal (int32_t) limit keep the counter at its current value rather than wrapping. r=dholbert
Per CSS WG resolution regarding counter-styles-3, afternoon of 2013-02-05:
http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590
http://lists.w3.org/Archives/Public/www-style/2013Feb/0392.html
2013-02-22 10:13:37 -08:00
L. David Baron
88352988db Backout changeset b968708558b9 (bug 839809) for reftest failures. 2013-02-21 19:25:54 -08:00
L. David Baron
c50a9d6ae8 Bug 839809: Make counter-increments and list counting that would go past our internal (int32_t) limit keep the counter at its current value rather than wrapping. r=dholbert
Per CSS WG resolution regarding counter-styles-3, afternoon of 2013-02-05:
http://krijnhoetmer.nl/irc-logs/css/20130205#l-1590
http://lists.w3.org/Archives/Public/www-style/2013Feb/0392.html

Note that this patch depends on signed integer overflow behavior in C++,
which I believe is portable despite being unspecified.
2013-02-21 18:10:59 -08:00
L. David Baron
822b2ca3bc Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert
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
2013-02-16 13:51:02 -08:00
Robert O'Callahan
d9665619b9 Bug 840902. Part 2: Remove nsresults from various display list methods. r=mattwoodrow
--HG--
extra : rebase_source : de498510bf8d85d9b0b2fab0137ef3be01c9adfa
2013-02-15 00:12:27 +13:00
Robert O'Callahan
59dfd955a1 Bug 840902. Part 1: Stop checking the results of various display list methods. r=mattwoodrow
--HG--
extra : rebase_source : 50a3d6809ef76a25a3d02d91f2873d9ba11fdc56
2013-02-15 00:08:08 +13:00
Mats Palmgren
6c53161814 Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
Matt Woodrow
e7ac2cfa42 Bug 822141 - Invalidate bullet display items when their value changes. r=roc 2012-12-21 22:09:23 +13:00
Jeff Muizelaar
b4e2a8d95a Bug 801061. Switch from imgIRequest to imgRequestProxy. r=joe
This doesn't switch all of the users yet, but is a step in the right
direction.

--HG--
extra : rebase_source : 91b4fef3f67586179c119208d000cf7629e04963
2012-10-12 08:43:01 -04:00
Josh Matthews
3db6e574aa Bug 788959 - Clear the listener associated with cancelled bullet frame image requests. r=bz 2012-11-28 10:30:05 -05:00
Josh Matthews
80112a2809 Bug 505385 - Part 18: Reduce number of notifications - START_REQUEST/START_CONTAINER -> SIZE_AVAILABLE, remove START_DECODE and START_FRAME. Rename remaining ones for clarity. r=joe 2012-10-12 12:11:23 -04:00
Josh Matthews
2c57ae944e Bug 505385 - Part 11: Create a new imgINotificationObserver interface to replace all uses of imgIContainerObserver and imgIDecoderObserver outside of image/. r=joe 2012-10-12 12:11:22 -04:00
Josh Matthews
08a5eceeeb Back out bug 585385 for build bustage. 2012-10-11 21:58:24 -04:00
Josh Matthews
ae359191a3 Bug 505385 - Part 18: Reduce number of notifications - START_REQUEST/START_CONTAINER -> SIZE_AVAILABLE, remove START_DECODE and START_FRAME. Rename remaining ones for clarity. r=joe 2012-10-11 21:34:24 -04:00
Josh Matthews
f3459980ad Bug 505385 - Part 11: Create a new imgINotificationObserver interface to replace all uses of imgIContainerObserver and imgIDecoderObserver outside of image/. r=joe 2012-10-11 21:34:23 -04: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
Matt Woodrow
958ce7d98d Bug 539356 - Part 9c - Remove old invalidation code. r=bz 2012-08-29 17:39:31 +12:00
Ed Morley
c863356300 Revert mozilla-inbound to e4dd1fa6d222 for crashes and test failures on a CLOSED TREE 2012-09-27 16:34:46 +01:00
Matt Woodrow
c73c0db2f1 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-08-29 17:38:58 +12:00
Boris Zbarsky
40ab1e88e7 Bug 601912. Implement <ol reversed>. r=dholbert 2012-09-07 22:30:24 -04: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
Ms2ger
3f950b5744 Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg 2012-08-09 09:09:40 +02:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Aryeh Gregor
e57dd159b2 Bug 626472 part 1 - Define nsnull as nullptr where available; r=ehsan 2012-07-20 14:16:17 +03:00
Ehsan Akhgari
5e6974df88 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
David Zbarsky
ae718ee1c0 Bug 763350 - Clean up some includes in content/ and dom/ r=smaug 2012-07-01 16:45:59 -07:00
Matt Woodrow
cbd39105d9 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12:00
Jonathan Watt
6380335603 Bug 767388 - Kill NS_DEBUG. r=bz.
--HG--
extra : rebase_source : d045208a26345712dbb4628c973c616cd9504f28
2012-06-25 20:59:42 +01:00
Daniel Holbert
93cab320e1 Bug 766783: Remove unneeded member variable nsBulletFrame::mComputedSize. r=mats 2012-06-21 12:58:28 -07:00
Ed Morley
c5acb642c1 Merge mozilla-central to mozilla-inbound 2012-05-21 13:19:38 +01:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
L. David Baron
54995e2a8e Remove width determination parameters from font inflation methods. (Bug 747720, patch 5) r=roc
These are no longer needed since we're getting the width from the
nsFontInflationData.
2012-05-20 22:18:28 -07:00
Robert O'Callahan
d0dd680745 Bug 733607. Restructure logic to compute snapped bounds of display items in layer coordinates. Moves responsibility for computing snapped bounds from within the display items to callers of GetBounds/GetOpaqueRegion. r=tnikkel
Previously we snapped the results of nsDisplayItem::GetBounds and
nsDisplayItem::GetOpaqueRegion internally. By tracking which display items were
inside transforms, we disabled snapping quite conservatively whenever an ancestor
had a transform, which is undesirable.

With this patch, we don't snap inside GetBounds or GetOpaqueRegion, but just return
a boolean flag indicating whether the item will draw with snapping or not. This flag
is conservative so that "true" means we will snap (if the graphics context has a transform
that allows snapping), but "false" means we might or might not snap (so it's always safe
to return false).

FrameLayerBuilder takes over responsibility for snapping item bounds. When it converts
display item bounds to layer pixel coordinates, it checks the snap flag returned from
the display item and checks whether the transform when we draw into the layer will be
a known scale (the ContainerParameters scale factors) plus integer translation. If both
are true, we snap the item bounds when converting to layer pixel coordinates. With
this approach, we can snap item bounds even when the items have ancestors with active
transforms.
2012-04-10 23:24:18 +12:00
L. David Baron
5eb8920348 Switch nsLayoutUtils inflation methods to the new setup with state on the pres context. (Bug 706609, patch 5) r=roc
This is the third of three patches to rework the way we handle getting
the font inflation container and width data during reflow, which are
needed so that we can sometimes honor inflation during intrinsic width
calculation (which we need to do to make some form controls inflate
correctly).
2012-01-24 17:21:29 -08:00
Kyle Huey
9cc71b5f7f Bug 714752: Make imgIContainerObserver::FrameChanged take an imgIRequest*. r=joe sr=roc 2012-01-06 07:32:38 -05:00
Mats Palmgren
9cc6cc3865 Bug 515530 - Remove nsHTMLContainerFrame. r=roc 2011-12-27 21:18:48 +01:00
Ms2ger
294b93eff9 Bug 709509 - Remove manual refcounting and QIing from nsBulletFrame::DidSetStyleContext; r=dbaron 2011-12-24 09:28:23 +01:00
L. David Baron
b4141b61eb Apply font size inflation to list bullets. (Bug 627842, patch 13) r=roc
Note that this doesn't do anything about the indentation of the list, so
for large inflation there may end up being overlap as a result.
2011-11-23 18:48:23 -08:00
Scott Johnson
a48978a4bf Bug 666446, Part 6/10 - Change nsBulletFrame to utilize refresh driver-based animations for performance improvements. [r=roc] 2011-11-09 13:39:16 -08:00
Justin Lebar
86c0378be8 Back out bug 666446 due to Talos regression. 2011-11-02 20:11:01 -04:00
Scott Johnson
9cfbbc8b00 Bug 666446, Part 6/10 - Change nsBulletFrame to utilize refresh driver-based animations for performance improvements. [r=roc] 2011-11-01 11:06:53 -04:00
Timothy Nikkel
6744e4ecfa Bug 694213. Make various display items return bounds in the correct coordinate space. r=roc 2011-10-21 12:45:32 -05:00
Timothy Nikkel
79abab2e7b Backout 18f70ede04b0 (bug 694213). 2011-10-20 20:59:47 -05:00
Timothy Nikkel
332c11b9c9 Bug 694213. Make various display items return bounds in the correct coordinate space. r=roc 2011-10-20 12:44:28 -05:00