Skip to content

Commit

Permalink
[FlexNG] Skip relayout boundary optimisation if a flex-item.
Browse files Browse the repository at this point in the history
Before this patch we'd consider a text-control a relayout root. If this
was also a NG flex-item it wouldn't have enough information to correctly
layout, (it wouldn't know what size to stretch to for example).

This patch disables the relayout boundary optimisation for text-controls
and SVG roots - which are also flex-items.

Bug: 1082447
Change-Id: I0e3b2186301fbf9488c0723c525a5e45e2ca80df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207611
Commit-Queue: Ian Kilpatrick <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#769810}
  • Loading branch information
bfgeek authored and chromium-wpt-export-bot committed May 18, 2020
1 parent 18532f7 commit adae164
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions css/css-flexbox/relayout-input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/1082447" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<div style="display: flex; width: 100px;">
<input id="target" style="position: relative; height: 20px; flex: 1; width: 0px;" data-expected-width="100" />
</div>
<script>
test(function() {
document.body.offsetTop;
document.getElementById('target').value = 'text';
checkLayout('#target');
});
</script>

0 comments on commit adae164

Please sign in to comment.