Closed Bug 1499875 Opened 6 years ago Closed 6 years ago

Extend test_flex_items.html with some items that grow & shrink by known amounts

Categories

(Core :: Layout: Flexbox, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(4 files)

Right now test_flex_items.html doesn't really test any flexing. (The only size-changes that happen are from min/max clamping.)

This is in part because its flex container has items whose sizes come from text measurements, which means we can't predict (for all platforms) how much space there is to be distributed, so we can't predict how much of that space any item will get.

We should add two more flex containers to that mochitest:
 - one where the items shrink by specific known amounts
 - one where the items grow by specific known amounts
...so that we can check that mainDeltaSize gets reported correctly to devtools.

I'm tentatively planning on taking this after my patch stack up through bug 1498281 has landed, but CC'ing Brad in case I get distracted & he gets to it sooner than I do. :)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Depends on: 1498281
Attachment #9018389 - Attachment description: Bug 1499875: Extend test_flex_items.html (for devtools API) with some complex flexing scenarios where we can predict exact size changes. → Bug 1499875 part 1: Adjust existing tests/content in test_flex_items.html to prepare for additional flex containers to be added.
BTW: the flex container that I'm adding in "part 2" may be interesting to Patrick (and the rest of us) as a complicated stress-test for our "intuitively explain what happened" UI.

For ease of use, here's that flex container as a standalone testcase -- and you can find my narrative for what happens in the 4 passes of flex layout in the HTML comment at the bottom of the patch on this phabricator page:
 https://phabricator.services.mozilla.com/D9169?id=26140
Just attached a screencast of what the testcase looks like, in a build with this bug's dependencies having all landed [which correct some of the reported values].

At first glance, I think the reported data is correct & matches the story that I tell in the phabricator code-comment that I linked to in comment 3.
Attachment #9018441 - Attachment description: Bug 1499875 part 2: Give mochitest test_flex_items.html some tests for a flex container that has multiple passes of flex-grow + clamping. r?bradwerth → Bug 1499875 part 2: Give mochitest test_flex_items.html some tests for a flex container that has multiple passes of flex-grow + clamping.
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18152a7b3fa5
part 1: Adjust existing tests/content in test_flex_items.html to prepare for additional flex containers to be added. r=bradwerth
https://hg.mozilla.org/integration/autoland/rev/c13ad6a94911
part 2: Give mochitest test_flex_items.html some tests for a flex container that has multiple passes of flex-grow + clamping. r=bradwerth
https://hg.mozilla.org/mozilla-central/rev/18152a7b3fa5
https://hg.mozilla.org/mozilla-central/rev/c13ad6a94911
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: