Skip to content

Commit

Permalink
Use nullopt when the non-hangable-run-end is not applicable
Browse files Browse the repository at this point in the history
The new trailing space logic refactoring, landed in r806928 and relanded
again in 807457, assigned the current offset as the non-hangable-run-end
when this is not applicable.

The root cause of this issue is that this offset must not exceed the
item s range-end, so that we clamp it to this range-end value. However,
since in some cases we use the original offset as the the
non-hangable-run-end, we may lead to a situation where the offset used
exceed the item's range end. This is precisely the DCHECK violation
described in the issue 1130288.

Since r808007 we have decided to use optional values for the
non-hangable-run-end, but we didn't update the implementation of the
PreviousBreakOpportunities and NextBreakOpportunities functions
accordingly.

Bug: 1130288
Change-Id: If5e5fb380320ca54f7a6d17d1c2bd020a643e12e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421728
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#809016}
  • Loading branch information
javifernandez authored and chromium-wpt-export-bot committed Sep 21, 2020
1 parent 2e309e8 commit 9c03638
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions css/css-text/whitespace-followed-by-cham-symbol-crash.html
@@ -0,0 +1,7 @@
<title>CSS Text Test: Under quirks mode, a white space, followed by a Cham symbol, makes chrome to crash</title>
<link rel="help" href="https://crbug.com/972992">
<style>
body { margin: 40 91 18446744073709551526px 5307% }
#tCF9 { line-break: anywhere; }
</style>
s a<custom-element-middle id=tCF9> <highlight>&#xaa2c;</highlight>

0 comments on commit 9c03638

Please sign in to comment.