Closed Bug 1635817 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 23424 - Revert "[FlexNG] Make ComputeMinMaxSizes cache more precise."

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 23424 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/23424
Details from upstream follow.

Balazs Engedy <engedy@chromium.org> wrote:

Revert "[FlexNG] Make ComputeMinMaxSizes cache more precise."

This reverts commit 044aeb3ed3364905cc185d67eb947c7ca3c13741.

Reason for revert: Use-of-uninitialized-value.

https://test-results.appspot.com/data/layout_results/WebKit_Linux_MSAN/5663/blink_web_tests/layout-test-results/results.html

Original change's description:

[FlexNG] Make ComputeMinMaxSizes cache more precise.

Previously our cache was imprecise, we recalculate our min/max sizes
when we didn't strictly need to, as we didn't know if we'd have a
%-block-size replaced element beneath us.

This patch changes ComputeMinMaxSizes to return a MinMaxSizesResult
(instead of just MinMaxSizes). This contains an additional bit of
information to indicate if this sub-tree depended on the %-block-size
given to it.

For most things, this will return false. For legacy layout roots we
always assume that they have children which depend on the %-block-size
(and why we initialize:
intrinsic_logical_widths_depends_on_percentage_block_size_ to true).

Along with this change, the cache changes in the following way:

  • We store an addition bit of information on LayoutBox to store the bit
    of information from ComputeMinMaxSizes.
  • We calculate the %-block-size for our children up-front, this means
    each of the algorithms don't have to do this.
  • With these changes, the cache can now hit, when the %-block-size
    given to us changes.

\o/

Bug: 845235
Change-Id: I93504721dbdd13bef58917b1fab2cabbcd1ce51e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165676
Commit-Queue: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Christian Biesinger \<cbiesinger@chromium.org>
Reviewed-by: Morten Stenshorne \<mstensho@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765797}

TBR=cbiesinger@chromium.org,dgrogan@chromium.org,kojii@chromium.org,ikilpatrick@chromium.org,mstensho@chromium.org

Change-Id: I9e5312e4a919fedbdc2cfd08e50a5f8b188e7a25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 845235
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184130
Reviewed-by: Balazs Engedy \<engedy@chromium.org>
Commit-Queue: Balazs Engedy \<engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765919}

PR 23424 applied with additional changes from upstream: 76e181c868d50d7f9a3901af03249102451d5de7
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1e3eb5c49723
[wpt PR 23424] - Revert "[FlexNG] Make ComputeMinMaxSizes cache more precise.", a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd756e9a2e5b
[wpt PR 23424] - Revert "[FlexNG] Make ComputeMinMaxSizes cache more precise.", a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.