Граф коммитов

520 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 954a119d07 bug 735577 - pt 3.2 - update the rest of layout code to use the new accessors on nsHTMLReflowState. r=smontagu 2013-12-27 17:59:21 +00:00
Quentin Headen 6f30920da5 Bug 731667 - Rewrite mtable implementation to avoid use of _moz-* attributes - implement parsing and rendering. r=karlt, r=bz 2013-12-13 12:42:43 -05:00
Mats Palmgren eb2304a29c Bug 919318 - A few cosmetic changes after dropping the Get prefix on some methods. r=dholbert 2013-09-25 11:42:35 +00:00
Mats Palmgren 4974add798 Bug 919318 - Drop the Get prefix on the frame methods GetFirstContinuation, GetLastContinuation, GetFirstInFlow, GetLastInFlow and also on nsLayoutUtils::GetLastContinuationWithChild, because they never return null. r=dholbert 2013-09-25 11:42:34 +00:00
Scott Johnson a1817949ef Bug 743402, Part 4: Refactor ApplySkipSides() and GetSkipSides() to return the correct value during reflow by adding an optional nsHTMLReflowState parameter. [r=roc] 2013-07-25 10:34:27 -05:00
Ryan VanderMeulen 6e81109389 Backed out 6 changesets (bug 743402) for reftest failures on a CLOSED TREE.
Backed out changeset 19848fff857e (bug 743402)
Backed out changeset 049168537ae0 (bug 743402)
Backed out changeset 3098fea37f2d (bug 743402)
Backed out changeset ada93e976dca (bug 743402)
Backed out changeset c7907c54187f (bug 743402)
Backed out changeset 2edbbf6440c4 (bug 743402)
2013-07-24 15:14:04 -04:00
Scott Johnson e963713207 Bug 743402, Part 4: Refactor ApplySkipSides() and GetSkipSides() to return the correct value during reflow by adding an optional nsHTMLReflowState parameter. [r=roc] 2013-07-24 12:47:17 -05:00
Timothy Nikkel 38244a9048 Bug 695763. Part 4. Invalidate table background images if they are not decoded and we are asked to do a sync decode. r=roc 2013-06-26 11:43:26 -05:00
Boris Zbarsky 7f102d7f2d Bug 852428 part 2. Make nsIFrame::Init infallible. r=dholbert 2013-03-19 21:47:48 -04:00
Mats Palmgren 5ad7b9425b Bug 850964 - Remove obsolete NS_FRAME_INVALIDATE_ON_MOVE flag. r=roc 2013-03-15 23:32:35 +01:00
Ed Morley ee99ebb3df Backed out changeset 4bfe5e636d68 (bug 850964) for assertions on a CLOSED TREE 2013-03-14 15:19:06 +00:00
Mats Palmgren 049bfc9e5d Bug 850964 - Remove obsolete NS_FRAME_INVALIDATE_ON_MOVE flag. r=roc 2013-03-14 14:39:26 +01:00
Trevor Saunders efd4042c8d bug 846487 - remove remaining usage of some nsIDOMFooElement r=Ms2Ger 2013-02-14 10:33:16 -05:00
L. David Baron c5b9eee040 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 42e294f8cb 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 5c77da3630 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
L. David Baron 50d4e367af Bug 841789, patch 1: Rename nsIFrame::GetStyleContext() to nsIFrame::StyleContext() since it can never return null. r=dholbert
This makes it conform to our convention that getters returning pointers
that can never be null do not begin with "Get".
2013-02-15 21:38:33 -08:00
Mats Palmgren b7ae90666d 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
Alexander Surkov 9ca55cbd90 Bug 810572, part 2.5 - rename AccType constants again, r=tbsaunde, sr=roc 2012-12-18 10:25:52 +09:00
Trevor Saunders 8d7e7dd8d7 bug 781409 - remove nsITableLayout r=roc,davidb 2012-08-08 09:05:17 -04:00
Alexander Surkov f52aca4834 Bug 810572, part2 - remove 'Accessible' postfix from AccTypes constants, r=tbsaunde, sr=roc 2012-12-12 19:04:12 +09:00
Trevor Saunders 244a675d42 bug 542039 - accessible object types r=surkov, roc 2012-09-28 17:53:44 -04:00
Kyle Huey 43e58e33c8 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 5b90207e93 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 cee1aa3599 Bug 539356 - Part 9c - Remove old invalidation code. r=bz 2012-08-29 17:39:31 +12:00
Ed Morley aba3a8f5ef Revert mozilla-inbound to e4dd1fa6d222 for crashes and test failures on a CLOSED TREE 2012-09-27 16:34:46 +01:00
Matt Woodrow 515829e8e5 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 4d096475d2 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-08-29 17:38:58 +12:00
Ehsan Akhgari e368dc9c85 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
Kyle Huey 0a624c1ae1 Bug 697230: Part 0 - Make table frame classes call into their superclass in DidSetStyleContext. r=bz 2012-08-13 14:13:34 -07:00
Ms2ger 75ab7efb95 Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg 2012-08-09 09:09:40 +02:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Ehsan Akhgari cf18ee9122 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
Matt Woodrow 31125260ee Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12:00
Jonathan Watt 970e60a384 Bug 767388 - Kill NS_DEBUG. r=bz.
--HG--
extra : rebase_source : d045208a26345712dbb4628c973c616cd9504f28
2012-06-25 20:59:42 +01:00
L. David Baron 6642be49cb Remove nsStyleBorder::GetActualBorder, since it now does the same thing as nsStyleBorder::GetComputedBorder. (Bug 713643, patch 3) r=bzbarsky 2012-05-30 22:19:49 -07:00
Trevor Saunders 5d33ad118a bug 759033 - nsAccessible -> Accessible and nsAccessibleWrap -> AccessibleWrap r=surkov
--HG--
rename : accessible/src/atk/nsAccessibleWrap.cpp => accessible/src/atk/AccessibleWrap.cpp
rename : accessible/src/atk/nsAccessibleWrap.h => accessible/src/atk/AccessibleWrap.h
rename : accessible/src/base/nsAccessible.cpp => accessible/src/generic/Accessible.cpp
rename : accessible/src/base/nsAccessible.h => accessible/src/generic/Accessible.h
rename : accessible/src/mac/nsAccessibleWrap.h => accessible/src/mac/AccessibleWrap.h
rename : accessible/src/mac/nsAccessibleWrap.mm => accessible/src/mac/AccessibleWrap.mm
rename : accessible/src/msaa/nsAccessibleWrap.cpp => accessible/src/msaa/AccessibleWrap.cpp
rename : accessible/src/msaa/nsAccessibleWrap.h => accessible/src/msaa/AccessibleWrap.h
rename : accessible/src/other/nsAccessibleWrap.cpp => accessible/src/other/AccessibleWrap.cpp
rename : accessible/src/other/nsAccessibleWrap.h => accessible/src/other/AccessibleWrap.h
2012-05-28 21:18:45 -04:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Robert O'Callahan 8a8de768a2 Bug 735898. Part 7: Remove expensive nsIFrame::HasBorder checks, just check style instead. r=dbaron,a=blocking-fennec 2012-04-18 17:14:31 +12:00
L. David Baron 90733eea84 Add a font inflation data structure per block formatting context. (Bug 706193, patch 2) r=roc
This structure is per block formatting context because we have to make a
single inflation decision for things like consecutive runs of paragraphs
of text.  Inflating some paragraphs and not others (within the same
sequence of adjacent paragraphs) based on the amount of text in each one
would be disastrous.  Otherwise it's ideal for the units to be as small
as possible as long as they merge such sequences; therefore this uses a
definition corresponding to CSS's idea of elements that establish new
block formatting contexts.
2012-04-16 15:32:12 -07:00
Robert O'Callahan 7c34e38876 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
Mats Palmgren 885fa92ef4 Bug 736915 - Print Selection prints a blank page when the selection is inside a table. r=bz
When rendering just the current Selection (Print - Selection) then don't create display items
for table-related frames unless the frame itself is part of the selection, and always ask
descendant frames to build display lists [in case they are selected].
2012-04-03 02:30:45 +02:00
Nathan Froyd 68a79f10ae Bug 731615 - Eliminate duplicate headers in layout. rs=smontagu 2012-02-29 10:57:47 -05:00
Mats Palmgren 86699a57d7 Bug 720142 - Use nsIntRect for table damage. r=bernd 2012-01-22 23:48:34 +01:00
Benjamin Stover dc9cd57308 Bug 524925 - Recompute overflow without reflowing for transforms. part=1/6 r=dbaron
Add an extra change hint, UpdateOverflow, that can be used to specify that
a frame's overflow areas may have changed and that they need to be recalculated.
When a transform on a frame changes, instead of marking it for reflow, set this
hint instead.

There is an added virtual function on nsIFrame, UpdateOverflow, which is called
recursively on a frame when the corresponding hint is set, to allow it to
update its overflow areas.
2011-06-15 14:03:49 -07:00
Mats Palmgren 522639239d Bug 716408 - Make nsTableFrame::GetTableFrame abort if the given frame isn't a table frame descendant, thus guaranteeing a non-null result. r=bernd 2012-01-17 00:38:10 +01:00
Mats Palmgren 78d0f2c7ca Bug 515530 - Remove nsHTMLContainerFrame. r=roc 2011-12-27 21:18:48 +01:00
Mats Palmgren 498185f3f0 Bug 619273 - Move the selection state bit from frames to content nodes. r=smaug 2011-12-20 10:15:41 +01:00
Bernd b7288402ad bug 707622 - rows without originating cells are suppressed at the table bottom r=mats 2011-12-07 20:38:25 +01:00
Bernd 844db3e17f bug 460637 - the group cellmaps need to set the damageArea relative to the entire table, patch by Mats Palmgren, Randell Jesup and Bernd, r=mats, bernd 2011-10-27 09:58:44 -04:00