New issue
Advanced search Search tips

Issue 900727 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 5
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 767634



Sign in to add a comment

[css-text-3] overflow-wrap: break-word incorrectly kicks in when line breaking generate a leading white-space in lines below

Project Member Reported by jfernandez@chromium.org, Oct 31

Issue description

Chrome Version: 71.0.3573.0

What steps will reproduce the problem?
(1) Load the attached test case
(2) 
(3)

What is the expected result?

The text should be broken into 3 lines (expected.png), using the following breaking opportunities: 

"xxx  | |12345|6789" 

What happens instead?

The single leading white in the second line is not used to avoid the overflow; instead, the word is broken like this (result.png): 

"xxx  | 1234|56789"


 
result.png
2.0 KB View Download
expected.png
2.2 KB View Download
Description: Show this description
Blocking: 767634
Components: Blink>CSS
Owner: jfernan...@igalia.com
Components: -Blink>CSS Blink>Layout
Summary: [css-text-3] overflow-wrap: break-word incorrectly kicks in when line breaking generate a leading white-space in lines below (was: [css-text-3] overflow-wrap: break-word incorrectly kicks in when line breaking generate a leading white-space in below lines)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4dc6641110334fe6a1807f37278ae543d2bb76ae

commit 4dc6641110334fe6a1807f37278ae543d2bb76ae
Author: Javier Fernandez <jfernandez@igalia.com>
Date: Fri Nov 02 21:29:36 2018

[css-text] Keep track of the initial offset for each handled text

In order to identify single leading white-spaces as potential line
breaking opportunities we need to know the offset the iterator starts
at for the current text to handle.

When we landed the change in r596406 we incorrectly assumed that
leading white-spaces were always at offset 1. However, this is not
valid when such leading white-spaces are generated by previous broken
lines.

This CL solves the issue by using the stored initial offset to identify
such single leading white-spaces as potential breaking opportunities.

Bug:  900727 
Change-Id: Ibc9dda7632d72ed82a61025015489ec3b70d6919
Reviewed-on: https://chromium-review.googlesource.com/c/1311274
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605055}
[add] https://crrev.com/4dc6641110334fe6a1807f37278ae543d2bb76ae/third_party/WebKit/LayoutTests/external/wpt/css/css-text/overflow-wrap/overflow-wrap-break-word-005.html
[modify] https://crrev.com/4dc6641110334fe6a1807f37278ae543d2bb76ae/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h

Status: Fixed (was: Untriaged)

Sign in to add a comment