mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Automatic update from web-platform-tests Consistently refuse to break inside replaced content. To determine if a layout object is either block-fragmentable or monolithic, we used to check IsAtomicInlineLevel(). This is slightly inadequate, since what we really want to test, is whether the element is replaced or not (+ some other things, such as scrollbars and containment, which we're already taking care of well). Note that GetPaginationBreakability() isn't really interesting at all in inline formatting contexts, since we're on a line then, and lines are by definition monolithic. We relied on the fact that IsAtomicInlineLevel() doesn't really behave as one would expect: In addition to returning true for atomic inline level content, it will also return true for certain types of *block* level content [1], such as images (which is totally non-intuitive). For many types of form controls, on the other hand, it will return false, because many form controls are implemented using LayoutBlockFlow-derived types (and thereby they'd be mistaken for regular non-replaced content). Use ShouldBeConsideredAsReplaced() instead of IsAtomicInlineLevel(). While the former actually calls the latter (so in a sense we're still indirectly calling IsAtomicInlineLevel(), which is what the TODO told us to stop doing), ShouldBeConsideredAsReplaced() additionally includes form elements manually implementation, and this is what makes the difference and fixes the problem. [1] See crbug.com/567964 Bug: 946544 Change-Id: I851df11fc6022b7e1d7e165978892190dac990da Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1587887 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#654963} -- wpt-commits: 9fec2d50466b600c3cb4f471597c85d44a039565 wpt-pr: 16594
11 lines
643 B
HTML
11 lines
643 B
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
|
<link rel="help" href="https://www.w3.org/TR/css-break-3/#possible-breaks">
|
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
|
<meta name="assert" content="Replaced content should be considered to be monolithic">
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
<div style="width:100px; height:100px; background:red;">
|
|
<div style="columns:3; column-gap:0;">
|
|
<input style="display:block; margin:0; border:none; padding:0; width:100px; height:100px; background:green;">
|
|
</div>
|
|
</div>
|