Commit Graph

119 Commits

Author SHA1 Message Date
Ehsan Akhgari
2fb9794854 Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1782 to 1582.
2013-10-01 17:00:38 -04:00
Daniel Holbert
c191b38ac7 Bug 919871: Make .cpp files in layout/generic #include their corresponding .h file first. r=mats 2013-09-24 18:43:43 -07:00
Corey Ford
52c667104f Bug 911786 - Part 2: Reapply relative positioning when moving frames without reflowing them. r=dholbert 2013-09-11 11:51:42 -07:00
Ehsan Akhgari
80d135155d Bug 907883 - Minimize #includes in layout/generic; r=roc
--HG--
extra : rebase_source : 5e87b764a12b05aff477c71547e2131be67ca93b
2013-08-22 14:32:52 -04:00
Corey Ford
b2510f37c3 Bug 898794 - Store normal frame position before applying relative positioning. r=dbaron 2013-08-08 17:20:17 -07:00
Corey Ford
9c2fee65d8 Bug 898797 - Use nsHTMLReflowState::ApplyRelativePositioning when placing floats. r=dbaron 2013-07-29 21:53:13 -07:00
Scott Johnson
8e92c99740 Bug 743402, Part 1: Add a GetConsumedHeight() function to nsSplittableFrame in order to retrieve the portion of the computed height that was consumed by previous-in-flows. [r=roc] 2013-07-25 10:34:12 -05:00
Ryan VanderMeulen
6b307780d7 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
b6e4526ae0 Bug 743402, Part 1: Add a GetConsumedHeight() function to nsSplittableFrame in order to retrieve the portion of the computed height that was consumed by previous-in-flows. [r=roc] 2013-07-24 12:47:01 -05:00
L. David Baron
5e108587ad Bug 855464: Optimize nsBlockReflowState::ClearFloats better, given that nsBlockFrame::WidthToClearPastFloats is somewhat expensive. r=dholbert
This fixes a performance issue that showed up in a profile of the b2g
contacts app (though it's not clear what percentage of the time it was
given the difficulty of understanding output of 'perf').
2013-03-31 00:50:29 -07: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
Daniel Holbert
2a2cc2f06b Bug 837000: Remove nsBlockReflowState.h's essentially-unnecessary #include of nsBlockFrame.h (and related cleanup). r=dbaron 2013-02-11 17:52:55 -08:00
Daniel Holbert
8f9051e747 Bug 836899: Remove nsBlockReflowState constructor unused parameter 'aMetrics'. r=dbaron 2013-01-31 14:40:05 -08: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
L. David Baron
236d1979ed Bug 588237, patch 4: Pull pushed floats back from the next-in-flow at the start of reflow. r=roc 2013-01-11 14:51:21 -08:00
Jeff Walden
7146c23e80 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Mats Palmgren
6f2db95cbc Bug 812879. r=fantasai 2012-11-28 19:55:36 +01:00
Mats Palmgren
b1a520c604 Bug 685012 - Implement page-break-inside:avoid in layout. r=fantasai,sr=roc 2012-11-08 17:09:38 +01:00
David Zbarsky
307c734c43 [Bug 799407] Fix build warnings in layout r=roc 2012-10-10 01:00:05 -04: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
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
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Ehsan Akhgari
5e6974df88 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
Matt Woodrow
cbd39105d9 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12: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
88a762e752 Replace AutoMaybeNullInflationContainer with AutoMaybeDisableInflationForShrinkWrap since the concept of the pres context's current inflation container will be going away. (Bug 747720, patch 2) r=roc 2012-05-20 22:18:27 -07:00
Mats Palmgren
86aed91a8e Bug 730769 - Add NewLineBox/FreeLineBox methods to nsBlockFrame. part=1/2 r=bz 2012-03-11 03:32:27 +01:00
L. David Baron
a7425ba7e8 Set inflation container to null during ComputeSize calls for inflation containers, when we should not have inflation applied. (Bug 706609, patch 4.5) r=roc 2012-01-24 17:21:29 -08:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Ehsan Akhgari
bdc5c5427c Bug 659828 - Part 1: Apply table margins to the outer table frame instead of the inner table frame (also fixes bug 87277); r=dbaron
Outer table frames act as CSS2.1 table wrapper boxes.  We used to lay them out
without taking their margins into the account, which meant that their width was
always equal to the available width.  This breaks horizontal positioning of
absolutely positioned kids of a table frame.

The main purpose of this patch is to apply the margins of tables to their outer
frame, instead of the inner frame.  This means that the inner table frame will
always have a zero margin, which means that a lot of the stuff which used to
rely on the fact that table margins are applied to the inner frame need to
change.

In particular, in order to get the computed margins of a table, we used to query
the inner table frame, and this patch corrects that.  Also, when shrink wrapping
tables, we used to not take the margins of the inner table frame into account,
which is fixed by this patch too.  nsBlockReflowState::
ComputeReplacedBlockOffsetsForFloats also needed to be changed to read the
margin values from the outer frame too.

Also, as part of this patch, we start to respect the CSS2.1 margin model for
captions on all sides.  This means that in particular, the top/bottom margins on
the top-outside and bottom-outside captions will not be collapsed with the
top/bottom margins of the table, and that the margins of the caption element
contribute to the width and height of the outer table frame.  The
427129-table-caption reftest has been modified to match this new behavior.

Another side effect of this bug is fixing bug 87277, and the reftests for that
bug are marked as passing in this patch.
2011-05-31 19:02:56 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Craig Topper
7a1b417e0b Bug 654369 - Part 10: Make nsFloatManager::StoreRegionFor return void r=bz
--HG--
extra : rebase_source : dcf1babec6d26cfaee2e050e1fbd8abca941c8eb
2011-05-08 01:00:29 -07:00
Ed Morley
7bd9e7ed4a Bug 665723 - Fix unused variable warnings in layout/generic/; r=roc 2011-06-21 17:37:47 +02:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12:00
Robert O'Callahan
dc7ee6cfc4 Bug 594333. Invalidate frame subtree (including layers) when moving a float. r=dbaron 2010-12-20 14:37:43 +13:00
L. David Baron
bea16867c4 Reflow floating ::first-letter before deciding where to place the float, since we need to reflow it to learn its width. (Bug 594303) r=roc a2.0=blocking:betaN 2010-10-06 21:25:47 -07:00
L. David Baron
b401e8f1d5 Convert nsBlockReflowState::mFloatCombinedArea and part of nsBlockFrame to split overflow areas. (Bug 542595, patch 9) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:45 -07:00
L. David Baron
109dae0465 Don't push floats past break due to total lack of available height when we're required to place something. (Bug 586973) r=roc a2.0=blocking 2010-08-19 09:38:00 -04:00
L. David Baron
52881c4fb2 Split floats when they are overflow-incomplete. (Bug 585598) r=roc a2.0=blocking 2010-08-19 09:38:00 -04:00
fantasai
4b31319f01 Change coordinate system in the float manager from content box (most of the time, but sometimes border box) to always border box. (Bug 551425) r=dbaron a2.0=blocking+ 2010-08-11 12:32:53 -07:00
L. David Baron
6d279b0435 Rename float continuations to pushed floats. (Bug 563584, patch 33) r=roc
This patch was generated with the following sed commands on layout/generic/*.{h,cpp}: 's/FLOAT_CONTINUATION/PUSHED_FLOAT/g;s/FloatContinuation/PushedFloat/g;s/float continuation/pushed float/g' plus whitespace fixup where the frame state bits are defined.
2010-08-05 21:59:20 -07:00
L. David Baron
48dd50ff36 Don't force availableHeight to be nonnegative, because doing so means that we'll place zero height blocks (including their non-zero-height contents) at the bottom of a page when there's not room (see nsHTMLReflowState::SetTruncated). (Bug 563584, patch 32) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5239f85a39 Don't split floats when we're not paginating. (Bug 563584, patch 26) Fixes assertion on layout/generic/crashtests/461294-1.html . r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
bc78f1fdf5 In a constrained height situation, we need to reflow anything with floats. (Bug 563584, patch 25) Fixes assertion on layout/generic/crashtests/408883-1.html . r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5deb652621 Add bit to lines indicating that they may have a placeholder for a float that was pushed to the next line (and bump the child count up to 32 bits). (Bug 563584, patch 24) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
934f7dfb67 Pass correct *remaining* height to float manager, rather than the whole height of the content area. (Bug 563584, patch 22) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
4a3f5d15df Remove aReflowStatus parameters made unnecessary by previous patch. (Bug 563584, patch 20) r=roc 2010-08-05 21:59:20 -07:00