Commit Graph

418 Commits

Author SHA1 Message Date
Mihir Iyer
a6b55293ef Bug 1398483 - Implement column and row gap for flexbox. r=dholbert
MozReview-Commit-ID: 2EmaG3G0HRI
2018-06-19 10:28:31 -07:00
Daniel Holbert
fb00ae4a56 Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats
This patch accomodates for the unfortunate fact that elements with
"table-layout:fixed" have a max-content size of nscoord_MAX (infinity,
effectively), which turns out to be an easy source of integer overflow during
flex layout.

Before this patch, a flex container with "table-layout:fixed" in several flex
items could end up triggering integer-overflow & making the wrong judgement on
its arithmetic to determine...
 - whether a given flex item will fit on an existing flex line.
 - whether we've got positive free space and need to grow our items, or have
   negative free space and need to shrink our items.

This patch makes two changes to fix this issue.

(1) This patch makes us use CheckedInt when summing up flex item hypothetical
    sizes, which prevents integer overflow from flipping the sign of our line's
    total length.

(2) This patch makes us *directly* track the space reserved for flex item
    margin/border/padding within a flex line.  Previously, we tracked this
    implicitly as the difference between two other quantities that we stored;
    but with the other changes in this patch, those two other quantities can
    *both* trigger overflow and get clamped, which would make us lose track of
    how much space to reserve for margin/border/padding.  So now we simply
    track that space-to-reserve directly.

MozReview-Commit-ID: 9izhOnlS4F1
2018-05-25 19:46:29 -07:00
Emilio Cobos Álvarez
a7cc61ed05 Bug 1449326: Account for min- / max- block size changes too in the flex caching code. r=dholbert
We may be reflowing the same kid with different (definite / non-definite)
containing block sizes, which changes the min block size in:

  https://searchfox.org/mozilla-central/rev/f65d7528e34ef1a7665b4a1a7b7cdb1388fcd3aa/layout/generic/ReflowInput.cpp#3077

In which case we may need to reflow in order to properly align the flex item.

MozReview-Commit-ID: 27aS2UrgXjs
2018-04-20 09:55:51 +02:00
Daniel Holbert
ade14896d7 Bug 1454822 part 2: Cache the results of nsFlexContainerFrame::GetMinISize/GetPrefISize. r=mats
Assuming we call MarkIntrinsicISizesDirty in the appropriate scenarios, this
patch shouldn't change behavior - it just caches these values so we don't
needlessly recalculate them.

MozReview-Commit-ID: 8QY4AZJXshy
2018-04-17 17:06:26 -07:00
Daniel Holbert
1099079810 Bug 1454822 part 1: Refactor nsFlexContainerFrame::GetMinISize/GetPrefISize to be implemented via a common helper function. r=mats
This patch does not change behavior; it just merges the implementations of
these two functions into a single common function.

MozReview-Commit-ID: BqsRt3p2NQT
2018-04-17 17:06:23 -07:00
Daniel Holbert
bd66c7df60 Bug 1374540 part 3: Refactor nsFrame::ComputeSize methods to handle the two "used flex-basis of content" scenarios with a consistent codepath. r=mats
This patch doesn't change behavior.

It simply makes us share code/data for two different cases that both ended up
producing mainAxisCoord->GetUnit() == eStyleUnit_Auto.  Now, they'll *both* use
the same static nsStyleCoord to represent this "auto" value.

Originally, in one of these cases ("flex-basis:auto;[main-size-property]:auto),
we left the mainAxisCoord untouched. Now we'll point it at this dummy 'auto'
value. Either way we end up with mainAxisCoord->GetUnit() == eStyleUnit_Auto,
so the behavior doesn't change.

The next patch in this series will make further changes to one of these spots,
as noted in the "XXXdholbert" code-comment included here.

MozReview-Commit-ID: 5ClfbNHuKhO
2018-04-13 12:17:51 -07:00
Sebastian Hengst
d91e9954eb 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
6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Brad Werth
e19a3417cd Bug 1298008 Part 2: Make nsFlexContainer update UsedMargin property after final reflow. r=dholbert
MozReview-Commit-ID: HV4uhJqWjfj
2018-03-08 17:35:47 -08:00
Daniel Holbert
ca41ab2e28 Bug 1174003 late-breaking followup: remove obsolete comment about flex align-self:baseline behavior. (no review, comment-only, DONTBUILD)
There's been a clarification to the spec text that this comment was worried about:
  https://github.com/w3c/csswg-drafts/issues/2316
And with that clarification, this comment is no longer applicable.
2018-03-30 16:13:08 -07:00
Brindusan Cristian
ee1429a31d Backed out 3 changesets (bug 1298008) for devtools failures on browser_boxmodel_pseudo-element.js CLOSED TREE
Backed out changeset c18e2aac48a5 (bug 1298008)
Backed out changeset b5a4113f4649 (bug 1298008)
Backed out changeset 40f53976a5b8 (bug 1298008)
2018-03-30 23:10:23 +03:00
Brad Werth
583b4204fb Bug 1298008 Part 2: Make nsFlexContainer update UsedMargin property after final reflow. r=dholbert
MozReview-Commit-ID: HV4uhJqWjfj
2018-03-08 17:35:47 -08:00
Daniel Holbert
bf58e2eec5 Bug 1449838 part 1: Add utility function nsFlexContainerFrame::IsItemInlineAxisMainAxis(). r=mats
This patch doesn't affect behavior - it's just refactoring / de-duplicating.

(The refactored function does include some new "legacy box" code, just for
completeness & to ensure that the included assertion passes.  But beyond the
assertion, that new code isn't exercised right now -- this function's only
callsites are skipped if the NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX state-bit is
set on the container. Hence, this patch still doesn't affect behavior, even
though it's adding some new logic in the refactored-out function.)

MozReview-Commit-ID: G5aCzwTwkTa
2018-03-29 14:49:28 -07:00
Emilio Cobos Álvarez
1d4859a89a Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
97286b35c8 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
1f5d8de5cc Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Chris Peterson
20b28f1d54 Bug 1443402 - Fix some -Wmissing-prototypes warnings in layout. r=dholbert
-Wmissing-prototypes is a new optional warning available in clang ToT. It warns about global functions that have no previous function declaration (e.g. from an #included header file). These functions can probably be made static (allowing the compiler to better optimize them) or they may be unused.

Confusingly, clang's -Wmissing-prototypes is equivalent to gcc's -Wmissing-declarations, not gcc's -Wmissing-prototypes. A function prototype is a function declaration that specifies the function's argument types. C++ requires that all function declarations specify their argument types, but C does not. As such, gcc's -Wmissing-prototypes is a C-only warning about C functions that have no previous function *prototypes* (with argument types), even if a previous function *declaration* (without argument types) was seen.

MozReview-Commit-ID: FGKVLzeQ2oK
2018-02-22 21:03:45 -08:00
Daniel Holbert
586fb82841 Bug 1174003 part 11: [css-flexbox] Remove IsCrossAxisHorizontal(), and make IsMainAxisHorizontal() a private implementation detail. r=mats
At this point in the series:
 - AxisOrientationTracker::IsCrossAxisHorizontal() has zero callers, so it can
   be deleted.
 - AxisOrientationTracker::IsMainAxisHorizontal() only has two callers, and
   both are inside its own class. So it's effectively become an implementation
   detail of its class, and it can be made private.  (I'm not entirely removing
   it, because it does make its two callers more readable. The callers are
   working with a physical-axis-dependent type, 'LayoutDeviceIntSize', which
   comes from an API that isn't logical-axis-friendly, "GetMinimumWidgetSize",
   so they're not easily logicalized. So: it's nice to keep
   IsMainAxisHorizontal() around as an internal convenience method to tell us
   whether to extract the width or height inside of these two specific
   methods. But we don't want to introduce more callers, so let's leave it
   around & make it private.)

MozReview-Commit-ID: 1iz1e52NmxV
2018-02-28 09:41:16 -08:00
Daniel Holbert
106234e05b Bug 1174003 part 10: [css-flexbox] Remove GET_MAIN_COMPONENT/GET_CROSS_COMPONENT macros (expanding each at its only remaining callsite). r=mats
This patch doesn't affect behavior. Each of these macros only had one caller
remaining, and this patch simply expands each of these macros at its sole
callsite.

Note that I'm using the "IsMainAxisHorizontal()" helper in *both* expansions
here, which makes the alternative variant "IsCrossAxisHorizontal()" unused as
of this patch. The next patch in this series will remove that now-unused
method, which will reduce the "Horizontal"-querying API surface here.

The documentation for the macros is still relevant to their still-existing
"_LOGICAL" variants (and those variants do still have callers), so I'm updating
the documentation to be about those variants.

MozReview-Commit-ID: 5i32VYXzo3r
2018-02-28 09:41:13 -08:00
Daniel Holbert
ee6ff0c2cd Bug 1174003 part 9: [css-flexbox] Remove GET_MAIN_COMPONENT calls from CheckForMinSizeAuto(). r=mats
This patch doesn't change behavior.

The GET_MAIN_COMPONENT macro (some of whose calls I'm removing here) makes a
call to IsMainAxisHorizontal() under the hood.  So I want to get rid of calls
to this this macro, to get closer to killing that method.

In this code, we're interested in the flex item's min-size property in the flex
container's main axis.  This patch makes us simply use MinISize/MinBSize (in
terms of the *flex container's* writing mode) to get the appropriate min-size
property.  The call to IsRowOriented() (querying the flex container's
"flex-direction" property) tells us whether the inline or block axis is the
main axis.

This patch also does away with an unnecessary axis-specific 'overflow-{x/y}'
check, which we don't need to bother with, as noted in a new code-comment (due
to how the 'overflow' subproperties influence each other).

MozReview-Commit-ID: Kqyh69W5IQJ
2018-02-28 09:40:48 -08:00
Daniel Holbert
855adc4740 Bug 1174003 part 8: [css-flexbox] Change flex item intrinsic ratio calculations to use logical axes and a LogicalSize. r=mats
This patch doesn't affect behavior. It does the following:
 - Changes the AxisOrientationTracker "GetMainComponent/GetCrossComponent" APIs
   to take a LogicalSize rather than a nsSize.
 - Changes FlexItem::mIntrinsicRatio to be a LogicalSize rather than a nsSize.
 - Simplifies the MainSizeFromAspectRatio() helper-function (in particular, it
   removes a call to IsCrossAxisHorizontal(), which is an API I'm gradually
   removing in this patch series.)

MozReview-Commit-ID: KXUmaUVPMZa
2018-02-27 16:32:58 -08:00
Daniel Holbert
a094a58937 Bug 1174003 part 7: [css-flexbox] Logicalize IsCrossAxisHorizontal() check in GetBaselineOffsetFromOuterCrossSize (and simplify a condition for baseline fallback). r=mats
This patch doesn't change our behavior -- not in opt builds, at least. In debug
builds, this patch does change an assertion condition, to remove a usage of
IsCrossAxisHorizontal().  This means debug builds may proceed a bit further
when loading e.g. bug 1384266's testcase (which up until now was tripping this
assertion).  Now that testcase fails a slighlty later assertion (which I'll
sort out on that bug).

The first hunk of this patch is just a simplification -- replacing a
complicated condition (IsRowOriented==IsOrthogonalTo) with a simpler
formulation of the same condition.  I'm making that simplification in this
patch so that we're more clearly consistent about what condition we depend on
for baseline alignment.  After this patch, that (simplified) condition matches
the condition that we assert inside of GetBaselineOffsetFromOuterCrossEdge().

Note: I'm adding two XXXdholbert comments in this patch, for outstanding issues
that I ran across which are out-of-scope for this patch series.

MozReview-Commit-ID: 5x5xqWWilQZ
2018-02-27 15:50:30 -08:00
Daniel Holbert
500731ecad Bug 1174003 part 6: [css-flexbox] Replace ComputedCrossSize() helper with a new API that uses logical axes internally. r=mats
This patch doesn't affect behavior.

It removes a helper-function that simply returned nsStylePosition::mWidth or
mHeight -- whichever was in the flex container's cross axis. This helper was
only used to answer the question "is the cross size 'auto'", at a single
callsite.  So, this patch replaces the helper with a new helper that more
directly answers that question.  The new helper's implementation uses logical
axes for its reasoning, too, whereas the removed one used physical axes (and in
particular, it relied on AxisOrientationTracker::IsCrossAxisHorizontal(), which
I'll be getting rid of later in this patch series).

MozReview-Commit-ID: EJ8MObTauZH
2018-02-27 15:46:55 -08:00
Daniel Holbert
aa1755a9b3 Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats
This patch mostly[1] doesn't affect behavior.  It just changes some ReflowInput
width/height-setting logic to use ISize/BSize setters instead of width/height
setters.

To help with this, I'm also adding some more getters to answer the question "is
this flex item's {inline,block} axis the same as the flex container's
{main,cross} axis", for convenience/readability at callsites. (All of these
getters are simply giving a different view of the same underlying single bit of
information.)

[1] One way this patch *kind of* affects behavior: it generalizes the
conditions under which we set the NS_FRAME_CONTAINS_RELATIVE_BSIZE flag on a
flex item.  But that doesn't actually have any user-visible effects right now,
because that flag's only purpose is to determine whether we should reflow, and
currently we always reflow all flex items. If/when that changes, though
(i.e. when we start reflowing flex items more selectively), this patch is
adding a reftest that may test this generalized behavior. (The reftest actually
trivially passes right now, due to unrelated bug 1441348.)

MozReview-Commit-ID: 4NEKLBAjowh
2018-02-27 15:40:18 -08:00
Daniel Holbert
3c50c5d431 Bug 1174003 part 4: [css-flexbox] Remove IsMainAxisHorizontal() check from DoFlexLayout(). r=mats
This patch doesn't affect behavior.  It just replaces some (correct) physical-axis-dependent code with equivalent logical-axis-dependent code.

MozReview-Commit-ID: 27QJU2cFWh
2018-02-27 15:40:18 -08:00
Daniel Holbert
d6aa4439b0 Bug 1174003 part 3: [css-flexbox] Make GetMarginSizeInMainAxis() take a LogicalMargin, instead of nsMargin. r=mats
This patch doesn't change behavior. It just makes us use logical axes/types instead of physical ones for this particular API and its caller.

MozReview-Commit-ID: Jt6SECGI9EU
2018-02-27 15:40:10 -08:00
Daniel Holbert
435f38d555 Bug 1174003 part 2: [css-flexbox] Reformat code around GetMinimumWidgetSize call slightly. r=mats
This patch doesn't change behavior. It's purely to allow the next patch to be more surgical. Specifically, this patch:
 - splits a subtract-and-clamp operation into two separate operations.
 - splits one a comment into two.
...so that the next patch can swap out these variables for new ones, without
pushing these lines over 80 characters.

MozReview-Commit-ID: 4N5sI755CqF
2018-02-27 11:26:43 -08:00
Daniel Holbert
7c8556c8a6 Bug 1174003 part 1: [css-flexbox] Remove unused method nsFlexContainerFrame::IsHorizontal. r=mats
MozReview-Commit-ID: JzvGzJvMhLS
2018-02-27 11:21:22 -08:00
Daniel Holbert
0dab96fe26 Bug 1433339: Apply single-item fallback behavior for 'space-between' more directly, in flexbox code. r=mats
MozReview-Commit-ID: BRx4xGaJS6y
2018-02-17 16:59:01 -08:00
Daniel Holbert
ed8a57187d Bug 1267462 part 9: Fix IsCrossSizeDefinite() helper-method to use logical axes & coords. r=mats
MozReview-Commit-ID: Eda6ltmcDgQ
2018-02-08 15:17:03 -08:00
Daniel Holbert
0238b73dc0 Bug 1267462 part 8: Rename ReflowInput.mFlags.mIsFlexContainerMeasuringHeight with s/Height/BSize/, to match reality. r=mats
This patch doesn't change behavior; it's simply a rename.

I'm also fixing one mistyped mention of this variable in a comment in
nsFlexContainerFrame.cpp.  (The comment had "Reflow" rather than "Height" in
its mention of this variable-name.)

MozReview-Commit-ID: KRW7FCVSlto
2018-02-08 15:15:11 -08:00
Daniel Holbert
a6fd8aef88 Bug 1267462 part 7: Generalize nsFlexContainerFrame::ResolveAutoFlexBasisAndMinSize and helpers to use logical axes & coords. r=mats
In particlar, this patch:

 - ...renames a bunch of 'auto'-BSize-measurement functions/variables from
   "Height" to "BSize".  (I thought about splitting this part out, but
   typically the correctness of the renames was intrinsically tied to the logic
   generalizations that I'm performing here, and vice versa, so it seemed
   clearest to group it all together.)

 - ...replaces some calls to IsMainAxisHorizontal() with the more general
   "FlexItem::IsInlineAxisMainAxis()" API, for cases when we're reasoning about
   whether a flex item's main-size is really just its (easier-to-resolve) ISize.

 - ...replaces some calls to IsCrossAxisHorizontal() with either
   IsColumnOriented() or FlexItem::IsInlineAxisCrossAxis() (depending on
   whether we're reasoning about the flex container's cross-size vs. a flex
   item's cross size).

This makes a bunch of tests start passing (including a "received" w3c
reftest/wpt-test), so this patch also removes some failure annotations.

MozReview-Commit-ID: 3uR1mOzvytX
2018-02-08 15:15:07 -08:00
Daniel Holbert
b0f667928d Bug 1267462 part 6: Add FlexItem methods to test whether its inline axis is in container's main vs. cross axis. r=mats
This patch doesn't affect behavior -- it's just adding a new member-var &
accessor with no usages. The next patch in the series will add some usages.

MozReview-Commit-ID: NKBvKnb7Jw
2018-02-08 15:01:09 -08:00
Daniel Holbert
950b3770c7 Bug 1267462 part 5: Move WritingMode member-var earlier in FlexItem class. r=mats
This patch doesn't affect behavior. It simply reorders a member variable to be
near the beginning of the FlexItem class, so that the next patch in this series
can use that member-variable when initializing another member in the
constructor init list.  (You're only allowed to use earlier member-vars like
this, since member-vars get initialized in order.)

MozReview-Commit-ID: 9v4Dr0Ir6i7
2018-02-08 14:58:47 -08:00
Daniel Holbert
40bb7edbcb Bug 1398963 part 6: Make "visibility:collapse" cause flex items to be 0-sized, in emulated -moz-{inline-}box. r=mats
In modern flexbox and in "display:-webkit-box", children with
"visibility:collapse" currently generate "struts" which have 0 main-size but
nonzero cross-size.

But XUL/-moz-box treats these children differently -- it makes them 0-sized in
both axes. So we need to add a custom behavior to modern flexbox in order to
emulate that.

Specifically, this patch makes us:
 - Ignore these children when computing the flex container's intrinsic sizes.
 - Take a simpler codepath with 0-sized struts for collapsed elements when
   laying out a -moz-box (rather than the typical 2-pass layout, with strut
   cross-size being established in the 1st pass).

MozReview-Commit-ID: IpkADpFFBMx
2017-12-18 12:17:11 -06:00
Daniel Holbert
ae36ac41c4 Bug 1398963 part 2: Make nsFlexContainerFrame label itself as legacy if it has -moz-box/-moz-inline-box display val. r=mats
To be clear, this is a "paving the way" patch.  At this point in the patch
series, it's not yet possible for us to generate a nsFlexContainerFrame that
has display:-moz-box.  (A later patch in this series will make that possible.)

This patch adds the mechanics to nsFlexContainerFrame instances so that they'll
label themselves appropriately (with NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX)
once it *does* become possible for -moz-box to spawn a nsFlexContainerFrame.
Moreover, this patch updates the state bit's documentation to reflect its new
potential-usage.

MozReview-Commit-ID: ElApieVoTLf
2017-12-18 12:17:10 -06:00
Daniel Holbert
7d219d6c3a Bug 1398963 part 1: Rename frame-state bit from NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX to NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX (idempotent patch). r=mats
This patch isn't changing semantics of this bit at all - it just renames it to
a more general name. In other words, this patch does not change behavior.

MozReview-Commit-ID: 4wb13X4YinJ
2017-12-18 12:17:10 -06:00
Brad Werth
3cbe782cfc Bug 1424436 Part 1: Add more asserts in flex api calculation of mainDeltaSize values. r=dholbert
MozReview-Commit-ID: IpMrMfmMy7t
2017-12-08 15:49:56 -08:00
Brad Werth
320b6c8779 Bug 1419924 Part 1: Capture FlexLine cross start position to report to devtools when requested. r=dholbert
MozReview-Commit-ID: 8opVdr4W9S3
2017-12-01 13:02:35 -08:00
Brad Werth
a176a883e9 Bug 1409083 Part 3: Add a GetFirstNonAnonBoxDescendant function to unpack anonymous flex items. r=dholbert
This patch is effectively just resurrecting a function that was previously removed in https://hg.mozilla.org/mozilla-central/rev/173a4f49dfe3#l1.96 .

MozReview-Commit-ID: 4PXSOu4tzzU
2017-11-22 16:44:19 -08:00
Brad Werth
a0d2073c79 Bug 1409083 Part 1: Capture computed flex data for use by devtools. r=dholbert
MozReview-Commit-ID: 2TorIXOJZdh
2017-10-20 11:20:46 -07:00
Phil Ringnalda
6cc9f12122 Backed out 5 changesets (bug 1409083) for eslint failures
Backed out changeset 9de539be3665 (bug 1409083)
Backed out changeset 660e79af5c93 (bug 1409083)
Backed out changeset 574cd09aad41 (bug 1409083)
Backed out changeset b21b06a24705 (bug 1409083)
Backed out changeset b21e6a795493 (bug 1409083)
2017-12-07 19:47:09 -08:00
Brad Werth
32cecd8a39 Bug 1409083 Part 3: Add a GetFirstNonAnonBoxDescendant function to unpack anonymous flex items. r=dholbert
This patch is effectively just resurrecting a function that was previously removed in https://hg.mozilla.org/mozilla-central/rev/173a4f49dfe3#l1.96 .

MozReview-Commit-ID: 4PXSOu4tzzU
2017-11-22 16:44:19 -08:00
Brad Werth
f06c142c0e Bug 1409083 Part 1: Capture computed flex data for use by devtools. r=dholbert
MozReview-Commit-ID: 2TorIXOJZdh
2017-10-20 11:20:46 -07:00
Daniel Holbert
8fea3c215f 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
2017-10-27 10:33:53 -07:00
Daniel Holbert
6d371062a3 Bug 1412346 part 4: Update stale MPL license boilerplate on a few files in layout. r=jfkthame
We have a fair number of files that have a particular stale version of the MPL
boilerplate.  (It was probably originally correct, and then the official
boilerplate changed, and the stale MPL boilerplate continued to propagate via
copypasting from neighboring files into newly-added files.)

This patch updates this stale MPL text (and *only* the MPL text) to the latest
version, which can be found at https://www.mozilla.org/en-US/MPL/headers/ and
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: 8WeBb8b0uRo
2017-10-27 10:09:35 -07:00
Ting-Yu Lin
d93880e505 Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4
2017-09-13 18:00:25 +08:00
Matt Woodrow
e62cf6dd69 Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst
2e92d940f4 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow
61b7fddb66 Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00