Commit Graph

70 Commits

Author SHA1 Message Date
L. David Baron
88915cde1f Bug 538194 patch 1 - Refactor some code dealing with fitting block formatting contexts around floats into separate functions. r=roc 2015-08-02 21:03:09 -07:00
Jonathan Kew
b9987170d7 Bug 1131451 part 1 - Replace containerWidth with containerSize in logical-coordinate classes and APIs, frame classes, etc. r=dholbert 2015-07-16 10:07:57 +01:00
Simon Montagu
9bad487a2b Bug 1143218 patch 3: a better fix for bug 1105137 using line-left and line-right to place floats, r=jfkthame 2015-03-22 11:44:48 +02:00
Simon Montagu
ccbc04d19a Bug 1131013: when setting the position of inline frames in vertical writing modes with right-to-left direction, subtract the inline start from the container height to get the correct vertical position. r=jfkthame 2015-02-11 01:43:03 -08:00
Mats Palmgren
5f0a00a9eb Bug 447660 part 3 - When collecting / pushing a float, make sure to also pick up its next-in-flows that are in same block. r=roc
Move the AssertNoDuplicateContinuations in DrainPushedFloats earlier because
DrainOverflowLines() sometimes picks up overflow line with a placeholder for
a float that has a next-in-flow in this block and unmark those floats as
pushed floats because they aren't anymore.

Change AppendPushedFloat to push any next-in-flows that are in the same block
as the given float too.

Make DoCollectFloats collect next-in-flows in the same block.

Make VerifyOverflowSituation check some float list invariants too.
2014-12-19 16:28:43 +00:00
Mats Palmgren
17896858d5 Bug 447660 part 1 - Replace the #define DISABLE_FLOAT_BREAKING_IN_COLUMNS with a pref to enable fragmenting of floats inside columns. Set the pref enabled by default in non-RELEASE builds only. r=roc 2014-12-19 16:28:43 +00:00
Jonathan Kew
667814f127 Bug 1088025 - part 1 - Ensure nsBlockReflowState has a constrained mContainerWidth before we reflow lines into the container. r=dbaron 2014-11-13 08:58:03 +00:00
Simon Montagu
c845c35600 Bug 1079139: make nsFlowAreaRect.mRect a LogicalRect. r=jfkthame 2014-10-21 15:16:13 -07:00
Simon Montagu
ea6c771321 Bug 1062963 patch 3: make nsFloatManager's origin a LogicalPoint, adapt GetFlowAreas, AddFloats, ClearFloats, etc. to use it and make nsFloatManager region functions work with logical region. r=jfkthame 2014-10-21 15:16:12 -07:00
Phil Ringnalda
dc50784537 Backed out 4 changesets (bug 1062963, bug 1079139) for failures in 427129-table-caption.html in b2g reftest-6 and Android 2.3 reftest-5
Backed out changeset a9672db96a5d (bug 1079139)
Backed out changeset 241c23570a62 (bug 1062963)
Backed out changeset 90172cc0b012 (bug 1062963)
Backed out changeset 71211c4a4acc (bug 1062963)
2014-10-19 18:44:16 -07:00
Simon Montagu
3ddb04dc60 Bug 1079139: make nsFlowAreaRect.mRect a LogicalRect. r=jfkthame 2014-10-19 12:32:17 -07:00
Simon Montagu
a9f6fdaa48 Bug 1062963 patch 3: make nsFloatManager's origin a LogicalPoint, adapt GetFlowAreas, AddFloats, ClearFloats, etc. to use it and make nsFloatManager region functions work with logical region. r=jfkthame 2014-10-19 12:32:17 -07:00
Simon Montagu
8b60e42188 Bug 789096 patch 9: use logical coordinates in nsHTMLReflowState available size. r=jfkthame 2014-07-24 01:28:46 -07:00
Jonathan Kew
1260837fc4 bug 789096 patch 8 followup - constify new accessors in nsBlockReflowState. r=smontagu 2014-06-30 19:05:28 +01:00
Simon Montagu
5eca90017f Bug 789096 patch 8: use logical coordinates in nsBlockReflowState. r=jfkthame 2014-06-20 02:55:35 -07:00
Mats Palmgren
81d314f8e6 Bug 998535 - Apply GetSkipSides to block border+padding to make it for work for box-decoration-break:clone. r=roc 2014-05-12 11:45:28 +00:00
Simon Montagu
d89cfb8610 Make nsLineBox.mBounds a LogicalRect. Bug 789096, r=jfkthame 2014-04-16 01:03:28 -07:00
Jonathan Kew
b9938a1edc 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
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
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
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
0ec55d7447 Bug 838462: Remove unused method nsBlockReflowState::Margin(). r=mats 2013-02-05 23:36:37 -08:00
Daniel Holbert
8f9051e747 Bug 836899: Remove nsBlockReflowState constructor unused parameter 'aMetrics'. r=dbaron 2013-01-31 14:40:05 -08:00
Chris Peterson
f913a80fc9 Bug 829344 - Part 4: Fix gcc -Wlogical-op warnings from PRBool/bool conversion. r=ehsan 2013-01-10 17:56:51 -08: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
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01: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
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
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
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
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
4a3f5d15df Remove aReflowStatus parameters made unnecessary by previous patch. (Bug 563584, patch 20) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5247c76404 Do the same for PlaceBelowCurrentLineFloats: don't propagate the truncation of a float into the line's reflow status. (Bug 563584, patch 18) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
867d31744c Don't propagate the float's reflow status through places that expect an inline's reflow status, to avoid the assertion for which bug 563584 was filed. This separates pushing of floats from pushing of lines, and allows first-in-flow floats to be pushed to the next page without their associated line. (Bug 563584, patch 17) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
e714f071f9 Manage float continuations to-be-pulled by the next-in-flow better by keeping them in a separate frame list until they're actually pulled. (Bug 563584, patch 13) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
99f4849c65 Track which frames were float continuations that need to be pulled to the next block rather than figuring it out again when it's time to pull them. (This allows first-in-flows to be float continuations.) (Bug 563584, patch 12) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
4f730231c6 Don't try to clear pushed floats when computing the final size of blocks. Fixes scrollbar on layout/reftests/bugs/563584-6-columns.html . (Bug 563584, patch 11) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
353538a3ba Most of CanPlaceFloat is unnecessary given the float placement rules (in particular, that the top of a float cannot be higher than the top of any prior left or right float) and the fact that we now split floats. (Bug 563584, patch 3) r=roc 2010-08-05 21:59:18 -07:00
L. David Baron
11f75cf522 Remove aForceFit/aRelaxHeightConstraint concept from float reflow, since we now split floats rather than push them to the next page (and correct propagation of nsHTMLReflowState::mFlags::mIsTopOfPage will force fitting when we need to). (Bug 563584, patch 2) r=roc 2010-08-05 21:59:18 -07:00
Daniel Holbert
16a6a6205f Bug 503961: Initialize block-reflow-state's nsOverflowContinuationTracker a little later, so that it doesn't end up with stale overflow-list pointers. r=fantasai r=roc 2009-09-13 17:26:01 -07:00
fantasai
d5c48032c3 Bug 492627 - Remove Placeholder Continuations [Part V: Reimplement float splitting without placeholder continuations] r=roc 2009-08-31 11:25:36 -07:00
fantasai
973c4e83aa Bug 492627 - Remove Placeholder Continuations [Part IV: Switch float layout APIs to pass float directly, without placeholder] r=roc 2009-08-31 11:25:35 -07:00
L. David Baron
7c71744210 Fix bug 25888 for inline frames other than bullets: redo line reflow when the line's height pushes it into the way of other floats. (Bug 25888) r+sr=roc 2009-05-20 07:21:34 -04:00
L. David Baron
78f084eb30 Merge InitFloat into AddFloat (on nsLineLayout and nsBlockReflowState). (Bug 25888) r+sr=roc 2009-05-20 07:21:34 -04:00