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

255 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 8c62035164 Bug 1527519 Part 3 - Replace remaining nsLayoutUtils::GetAsBlock() with do_QueryFrame(), and delete nsLayoutUtils::GetAsBlock(). r=mats
Depends on D19861

Differential Revision: https://phabricator.services.mozilla.com/D19863

--HG--
extra : moz-landing-system : lando
2019-02-15 01:38:05 +00:00
Ting-Yu Lin 305e652840 Bug 1523061 Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert
Many of the modifications are guarded by #ifdefs. I verify them locally
by manually define them in nsBlockDebugFlags.h and nsLinelayout.cpp.

Note that I replace "mFrame" with "frame" in lines guarded by
NOISY_BLOCK_DIR_MARGINS in nsBlockFrame.cpp because they were
incorrectly renamed in Bug 1277129 Part 6a.
https://hg.mozilla.org/mozilla-central/rev/a70b04f074fc

Differential Revision: https://phabricator.services.mozilla.com/D17733

--HG--
extra : moz-landing-system : lando
2019-01-29 21:22:14 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andi-Bogdan Postelnicu 5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Mats Palmgren 60e745ae58 Bug 1424528 part 1 - Remove nsDidReflowStatus::FINISHED 3rd arg in DidReflow calls (automated change). r=dholbert
MozReview-Commit-ID: CiK7pV0OsGr
2017-12-14 16:21:49 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Mats Palmgren 6cda75700f Bug 1405443 - Don't delete next-in-flows when the state IsInlineBreakBefore. r=dholbert
MozReview-Commit-ID: vCqhHFsXUO
2017-10-06 20:59:09 +02:00
Ting-Yu Lin 35273fdc6c Bug 1341009 - Pass const reference instead of value for nsReflowStatus. r=dholbert
It's good to save a copy constructor call.

Also, make nsBlockFrame::SplitFloat() return void because the only
caller (BlockReflowInput::FlowAndPlaceFloat()) doesn't check its return
value, and (more importantly) because it only ever returns NS_OK.

MozReview-Commit-ID: 9LmDCXd7xGS

--HG--
extra : rebase_source : ea5fb41890c4ca58cd1d7f400a7c1becd66c3fdd
2017-09-13 15:47:51 +08:00
Jonathan Watt bcaeb4d9e8 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-07-25 12:02:35 +01:00
Carsten "Tomcat" Book 6121e5b902 Backed out changeset 31c43a9ffa8b (bug 1379474) for bustage 2017-07-10 08:06:30 +02:00
Jonathan Watt b4ab3914e7 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-06-13 11:45:17 +01:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Ting-Yu Lin d5c6d28836 Bug 775624 Part 16 - Convert NS_INLINE_IS_BREAK_BEFORE to a method. r=dholbert
MozReview-Commit-ID: 8vxRpqbZNnk

--HG--
extra : rebase_source : 195e2da23d64da9e9a888968a45eaae2e6539585
2017-02-14 16:05:24 +08:00
Ting-Yu Lin f7a393e947 Bug 775624 Part 5 - Remove NS_FRAME_IS_COMPLETE. r=dholbert
This patch is written by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "NS_FRAME_IS_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : aa8b11d3a756c9e7c521e6ffd70713af0174bd98
2017-02-11 22:45:07 +08:00
Ting-Yu Lin 99ebdf6cf3 Bug 775624 Part 4 - Remove NS_FRAME_IS_FULLY_COMPLETE. r=dholbert
This patch is written by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "NS_FRAME_IS_FULLY_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsFullyComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 200639e836cebe26fd77cde21f478fd027e1725f
2017-02-11 22:38:48 +08:00
Jeremy Chen aee90be343 Bug 1286468 followup - Fix naming issues.
MozReview-Commit-ID: C2PDA4R5k5F
2016-10-24 15:01:25 +08:00
Jeremy Chen 349eabf2f7 Bug 1286468 - Rename line related functions in nsBlockFrame. r=TYLin
1. Rename these functions to agree with Mozilla coding style.
2. Use singular naming instead of plural naming since each of these functions
returns an iterator pointing to a singular line.
3. Rename line() and rline() to BeginLineFrom() and RBeginLineFrom(), which
shall improve the readability.

MozReview-Commit-ID: txZjVnv9Yb

--HG--
extra : rebase_source : b4dae99ab7bf751bd9974616f8f8e6dfe6248fc2
2016-10-22 19:41:05 +08:00
Jeremy Chen a670e3349a Bug 1286468 - Rename line related typedefs in nsBlockFrame. r=TYLin
MozReview-Commit-ID: Cz9R3D4NzMc

--HG--
extra : rebase_source : 19da1e2a58abedf61fddd9c8e314830cf81a4602
2016-10-22 19:41:04 +08:00
Manish Goregaokar aad318e17a Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT

--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Jeremy Chen c6d0429830 Bug 1297306 - part6:replace NS_STYLE_CLEAR_* with StyleClear enum class. r=xidorn
After using enum class, a switch-case warning in CombineBreakType is caught.
This is one of such kind safty checks that we would like to gain.
Fix it by adding default case for switch-case in CombineBreakType.

MozReview-Commit-ID: BdS3LPN6qzX

--HG--
extra : rebase_source : 17f24a0d482ed6eb51b23e6942d0ac1c87375e0b
2016-09-07 10:20:17 +08:00
Ting-Yu Lin d77152fcd0 Bug 1277129 Part 7c - Rename various RS variables to RI. r=dbaron
This patch is generated by the following script:

function rename() {
find layout\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename aChildRS aChildRI
rename aContainingBlockRS aContainingBlockRI
rename aFrameRS aFrameRI
rename aLastRS aLastRI
rename aOuterRS aOuterRI
rename aRS aRI
rename blockHtmlRS blockHtmlRI
rename captionRS captionRI
rename cellRS cellRI
rename childRS childRI
rename firstAncestorRS firstAncestorRI
rename flexContainerRS flexContainerRI
rename gridRS gridRI
rename innerRS innerRI
rename lastButOneRS lastButOneRI
rename LineContainerRS LineContainerRI
rename mBlockRS mBlockRI
rename parentRS parentRI
rename secondAncestorRS secondAncestorRI
rename lastRSSize lastRISize
rename lastRSPadding lastRIPadding

MozReview-Commit-ID: YEgZs3WMow

--HG--
extra : rebase_source : c26050c71a3a5b13ef46e6d3582e581702d49ee8
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin cd13f0ea71 Bug 1277129 Part 6a - Rename frame to mFrame in SizeComputationInput. r=dbaron
MozReview-Commit-ID: 3SXZ4qEZJc

--HG--
extra : rebase_source : 577d48f047af163585acea95dda311358f5e8c25
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 6111a2de40 Bug 1277129 Part 2c - Rename nsBlockReflowState to BlockReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsBlockReflowState" "BlockReflowInput"

MozReview-Commit-ID: FtjqkQpGfcI

--HG--
extra : rebase_source : c8f678bc47217b778df7f91f0f6cce6c44b04d90
2016-07-21 18:36:36 +08:00
Ting-Yu Lin 371989a096 Bug 1277129 Part 2b - Rename nsBlockReflowState.h/cpp to BlockReflowInput.h/cpp and fix #includes. r=dbaron
The #includes are fixed by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsBlockReflowState\.h" "BlockReflowInput\.h"

MozReview-Commit-ID: 6QMqko1XOsT

--HG--
rename : layout/generic/nsBlockReflowState.cpp => layout/generic/BlockReflowInput.cpp
rename : layout/generic/nsBlockReflowState.h => layout/generic/BlockReflowInput.h
extra : rebase_source : 8911b9bbe68ceca82c77b7e120d87bfa71b7211c
2016-07-21 18:36:36 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Ting-Yu Lin 1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
Mats Palmgren 73b1279e0e Bug 1174553 part 3 - [css-grid] Implement the 'min-content' / 'max-content' sizing functions in layout. r=dholbert 2015-09-04 22:06:57 +02:00
L. David Baron bb57d7d42e Bug 451791 patch 2 - Report block non-empty to its parent block during margin collapsing if we encounter clearance. r=roc
The goal of ComputeCollapsedBStartMargin is to collapse all of the
margins that collapse with a block's top margin.  It does this by
scanning forward through the child list until it finds something that
blocks collapsing; it descends into children through recursion.  When we
find a non-empty block or line, we stop collapsing and report to the
parent that the child is non-empty so that it stops collapsing as well.

This patch changes our behavior when we have clearance to do the same
thing that we do for non-empty lines or blocks (which makes both
occurrences of |goto done| be preceded by the same code).  Without the
patch we would fail to report being non-empty to the parent (and instead
report emptiness based on the IsEmpty() method).  This meant that,
without the patch, if a block has a child with clearance but also has
IsEmpty() true, we would stop scanning margins in that block after the
clearance, but start searching again for margins in the block's parent,
starting with the block's bottom margin.  This patch sets *aBlockIsEmpty
to true in that case so that we do not pick up again in the block's
parent (or, potentially, grandparent, etc.).

--HG--
extra : commitid : LCMTvXvZT3G
2015-08-05 21:04:38 -07:00
L. David Baron 119b557460 Bug 538194 patch 2 - Redo block reflow below floats when the height of a block that does not intersect floats pushes it into the way of other floats. r=roc
This adds an additional retry loop in block reflow that we can only
trigger when reflowing a block formatting context (replacedBlock
non-null).  It can retry in two different ways, either with a narrower
width but at the same vertical position (when
ReplacedBlockFitsInAvailSpace is still true) or at a new vertical
position (which is treated as a form of clearance).

Fortunately we don't have to worry about margins collapsing *through*
such a boundary since we're dealing with a new block formatting context.

Note that Chromium passes all of the new bfc-displace-* tests, although
it moves the block formating context down unnecessarily in
bfc-shrink-1.html (which we do neither before nor after the patch),
though agrees with the width we have after the patch (but not before the
patch).

--HG--
extra : commitid : FgDc4hjTxHp
2015-08-02 21:03:09 -07:00
L. David Baron dc94df9c46 Bug 478834 - Record that we need to look for clearance if we encounter a block that might need to be pushed down for intersecting floats (i.e., one that establishes a BFC). r=roc
Without this change, nsBlockFrame::ReflowBlockFrame will fail to have
mayNeedRetry true, which means that it won't set
blockHTMLRS.mDiscoveredClearance, which means that on a descendant
replaced block we will fail to fall into any of the cases that call
ClearFloats.  This change will cause us to hit the first ClearFloats
call and discover the need for clearance.

I tested locally that the new reftest fails without the patch and passes
with the patch.
2015-07-27 20:23:56 -07:00
Jonathan Kew 4e6c40d7ea 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
Jonathan Kew a97792aed1 Bug 1144501 - Take account of orthogonal writing modes when adjusting available size to reflow a child frame. r=smontagu 2015-04-07 15:35:30 +01:00
Mats Palmgren ed9ed2d61a Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc 2015-03-29 22:38:40 +00:00
Simon Montagu 13be932c72 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 4454a1b4b5 Bug 1143218 patch 1: Back out the fix for bug 1105137, r=jfkthame 2015-03-22 11:44:48 +02:00
Simon Montagu 9cdb41a6f4 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
Simon Montagu 2df582470e Bug 1121748 - patch 1 - Make sure to update the frame dimensions before calling ApplyRelativePositioning. r=jfkthame 2015-01-18 22:01:57 -08:00
Simon Montagu 32d27c84d2 Bug 1063471: finish off converting nsBlockReflowContext to logical coordinates (comment-only change), r=jfkthame 2015-01-08 02:10:24 -08:00
Simon Montagu 1eacdee679 Bug 1079154 patch 5: convert callers of ApplyRelativePosition, ReflowChild and FinishReflowChild in layout/generic to the logical versions, r=jfkthame 2015-01-06 23:10:07 -08:00
Simon Montagu 33a271e5bd Bug 1105137: treat nsFloatManager's mOrigin as an offset, not a point, and rename it to mOffset to make that clearer, r=jfkthame 2014-12-11 03:56:03 -08:00
Jonathan Kew 1c2aa200a8 Bug 1096224 - part 2 - Fix writing mode mismatch in margin calculation in PlaceBlock. r=smontagu 2014-11-26 10:24:16 +00:00
Jonathan Kew bc30822def Bug 1093684 - part 3 - Replace |bottom| with |block-end| in a bunch of comments, and rename mCarriedOutBottomMargin to mCarriedOutBEndMargin. r=smontagu 2014-11-17 08:49:38 +00:00
Jonathan Kew bb857cabb0 Bug 1086883 - Convert writing modes where necessary for orthogonal flows when collapsing margins in nsBlockReflowContext methods. r=smontagu 2014-10-24 12:24:38 +01:00
Simon Montagu 8d64967541 Bug 1079139: make nsFlowAreaRect.mRect a LogicalRect. r=jfkthame 2014-10-21 15:16:13 -07:00