Bug 1564708 [wpt PR 17612] - [LayoutNG] Include negative margin beyond the right edge, a=testonly

Automatic update from web-platform-tests
[LayoutNG] Include negative margin beyond the right edge

This patch changes the line breaking behavior so that a
negative inline margin beyond the right edge can be included
in the line. Before this change, negative margins could move
the position back only when it's within the available width.

Legacy and WebKit don't do this, while Edge and Gecko do.
However, LayoutNG cannot render a page legacy and WebKit
render the same as other browser due to a bug in min-content.
Instead of copying the min-content bug in LayoutNG, this
patch fixes the page by matching to Edge and Gecko.

Bug: 979894
Change-Id: I07eedbb75f5c3b43e48b826bef18d95f1af872c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1684243
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#674177}

--

wpt-commits: 9aacd72c9f396544fc93a1419fa8c9bfe02c015a
wpt-pr: 17612
This commit is contained in:
Koji Ishii 2019-07-19 19:40:21 +00:00 коммит произвёл James Graham
Родитель 99978cbdd5
Коммит 3e747bcb80
1 изменённых файлов: 26 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,26 @@
<!DOCTYPE html>
<title>CSS Test: Check inline negative margin should not cause the line to wrap</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<link rel="help" href="https://crbug.com/979894">
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#inline-width">
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
<style>
html, body { margin: 0; }
div {
font-family: Ahem;
font-size: 10px;
line-height: 1;
}
#container {
display: inline-block;
}
span {
color: orange;
}
</style>
<body>
<div id="container" data-expected-height=10>123 <span style="margin-left: -8ch">1234 </span></div>
<script>checkLayout('#container');</script>
</body>