mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1476048 [wpt PR 12000] - [LayoutNG] Support rewinding unpositioned floats, a=testonly
Automatic update from web-platform-tests[LayoutNG] Support rewinding unpositioned floats This patch supports NGLineBreaker to rewind unpositioned floats. When rewinding floats occurs, LayoutNG either position them incorrectly, or hit DCHECK in paint due to duplicated ID. This patch fixes it for unpositioned foats by matching to Edge and Gecko. Blink considers such floats as if it were committed (positioned in LayoutNG terminologies) and thus the position is incorrect. Bug: 636993 Cq-Include-Trybots: luci.chromium.try :linux_layout_tests_layout_ng Change-Id: I884879b2034d2f63ae248f70de3edeb27d71cafe Reviewed-on: https://chromium-review.googlesource.com/1136262 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#575357} -- wpt-commits: 53702f14ec8b654a9c1beb9a013cdc652703cb40 wpt-pr: 12000 MozReview-Commit-ID: 9ea37E6Spi2
This commit is contained in:
parent
3454085340
commit
8f702d6a8d
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
font-size: 10px;
|
||||
width: 12ch;
|
||||
line-height: 1;
|
||||
background: yellow;
|
||||
}
|
||||
.float {
|
||||
width: 12ch;
|
||||
height: 1em;
|
||||
background: orange;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
1111<br>
|
||||
2222 3333
|
||||
<div class="float"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="author" title="Koji Ishii" href="kojii@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#float-position">
|
||||
<link rel="match" href="floats-line-wrap-shifted-001-ref.html">
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Float may not be higher than line-box containing a box generated by an element earlier in the source document." />
|
||||
|
||||
<style>
|
||||
div {
|
||||
font-size: 10px;
|
||||
width: 12ch;
|
||||
line-height: 1;
|
||||
background: yellow;
|
||||
}
|
||||
.float {
|
||||
float: left;
|
||||
width: 12ch;
|
||||
height: 1em;
|
||||
background: orange;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
1111
|
||||
<nobr>
|
||||
2222
|
||||
<!--
|
||||
This float does not fit in the 1st line and thus shifted downward.
|
||||
-->
|
||||
<div class="float"></div>
|
||||
<!--
|
||||
The next word causes the 1st line to wrap.
|
||||
The last break opportunity was before the float, and thus the float is also
|
||||
wrapped to the next line.
|
||||
|
||||
According to the rule 6, the float should be below <nobr> box.
|
||||
6. The outer top of an element's floating box may not be higher than the top
|
||||
of any line-box containing a box generated by an element earlier in the
|
||||
source document.
|
||||
-->
|
||||
3333
|
||||
</nobr>
|
||||
</div>
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user