Closed Bug 1547922 Opened 5 months ago Closed 5 months ago

test_dynamic_reflow_root_disallowal.html improvements

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mats, Assigned: mats)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.

The flex item tests in this file are completely broken...

First, there's a typo in the flex container style when concatenating:
"... teal" + containerSizeDecl since you end up with
"... tealinline-size:..." etc.

Second, none of the tests actaully test anything at all, which
you can see by removing the "+ subtest.candStyle" part on the
reflow root candidate -- the test still pass! The reason for
that is that its child (inner) has a solid purple border so when
changing its size it will render differently and make the test
pass regardless of any change that we intended to test.

After fixing those two bugs it turns out that two of the subtests
don't produce a rendering change at all, so those tests are bogus
and needs to be rewritten. (I'm commenting them out for now.)

BTW, good news about the grid-column/row-start/end properties though...
They return nsChangeHint_AllReflowHints:
https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/style/nsStyleStruct.cpp#1520
which contains nsChangeHint_ReflowChangesSizeOrPosition:
https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/nsChangeHint.h#387
which always causes a reflow of the parent:
https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/layout/base/nsChangeHint.h#192

So it should be possible to make grid items reflow roots as long as all
item properties like that include the ReflowChangesSizeOrPosition bit.

We still can't make subgrids reflow roots of course, but I'll fix that
separately...

nsChangeHint_ReflowChangesSizeOrPosition [...] which always causes a reflow of the parent

Well, that's according to its documentation at least...
I haven't checked if we try to optimize that away at some point though.

Depends on: 1508420
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3de2f935e2d2
part 1 - Fix broken flex layout tests.  r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/a5c14dc63aa6
part 2 - Add some grid layout tests.  r=dholbert
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.