Skip to content

Commit

Permalink
Revert "[LayoutNG] Fix hyphens when rewinding occurs"
Browse files Browse the repository at this point in the history
This reverts commit 957329b6eeba01be943a4991c8bd082a87ac1417.

Reason for revert: r708894 fixed the case where hyphens are
not rendered under certain conditions, but caused the
infinite rewind loop in |NGLineBreaker| when there are
negative margins on inline boxes.

This patch reverts the fix. I will work on the new fix for
the issue 1015297 after this revert.

Original change's description:
> [LayoutNG] Fix hyphens when rewinding occurs
>
> This patch removes |NGLineInfo::LineEndFragment|, which was
> introduced to support hyphens and ellipsis with the single
> code. However, ellipsis was changed to use different code,
> and |LineEndFragment| ended up with non-optimal way to handle
> hyphens.
>
> Although hyphens appear at most once in a line, storing this
> to |NGLineInfo| makes harder to keep it in sync with the
> hyphenated item. This patch changes it to a field in
> |NGInlineItemResult|.
>
> Bug: 1015297
> Change-Id: I0706cf54bebfa967661dc40123c6dfd5887ff59c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868534
> Commit-Queue: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#708894}

TBR=kojii@chromium.org,ikilpatrick@chromium.org

Bug: 1015297, 1028817
Change-Id: I5f116288b935f3fd296f4c25c1bf0457779a8e84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940323
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719869}
  • Loading branch information
kojiishi authored and chromium-wpt-export-bot committed Nov 28, 2019
1 parent 983bb5e commit 38526f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions css/css-text/hyphens/hyphens-overflow-001.html
Expand Up @@ -9,7 +9,6 @@
font-size: 10px;
font-family: Ahem;
width: 5.1ch;
border: 1px solid blue;
}
</style>
<body>
Expand All @@ -19,7 +18,4 @@
<div>1234&shy;xx</div>
<div>12345&shy;xx</div>
<div>123456&shy;xx</div>

<div style="width: 10ch"><span>ren&shy;for&shy;cer</span>99999</div>
<div><span>00&shy;1</span>222</div>
</body>
5 changes: 0 additions & 5 deletions css/css-text/hyphens/reference/hyphens-overflow-001-ref.html
Expand Up @@ -4,8 +4,6 @@
div {
font-size: 10px;
font-family: Ahem;
width: 5.1ch;
border: 1px solid blue;
}
</style>
<body>
Expand All @@ -15,7 +13,4 @@
<div>1234-<br>xx</div>
<div>12345-<br>xx</div>
<div>123456-<br>xx</div>

<div style="width: 10ch">renfor-<br>cer99999</div>
<div>00-<br>1222</div>
</body>

0 comments on commit 38526f6

Please sign in to comment.