New issue
Advanced search Search tips

Issue 639781 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Space is missing when using word-wrap: break-word and floated 100% width images and two-letter words

Reported by mflo...@gmail.com, Aug 22 2016

Issue description

Chrome Version       : 52.0.2743.116 (Official Build) (64-bit)
OS: 	Mac OS X 
Blink:	537.36 (@9115ecad1cae66fd5fe52bd9120af643384fd6f3)
URLs (if applicable) : http://jsbin.com/zepapo/edit?html,css,output
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
       Safari: OK   9.1.2 (11601.7.7)
      Firefox: OK   48.0.1 
Chrome canary: FAIL 54.0.2832.2 (Official Build) canary (64-bit)

What steps will reproduce the problem?
(1) Open chrome
(2) Goto http://jsbin.com/zepapo/edit?html,css,output

What is the expected result?
There should be a space between It and is under the first picture.

What happens instead?
The space is missing making it look like "Itis".

Please provide any additional information below. Attach a screenshot if
possible.
It only happens when the first word is two characters long. One letter works fine, as well as more (tested 3-5).

The minimum code to reproduce is something like this:
<style>
figure {
  width: 100%;
  float: left;
}

img {
  width: 100%;
}

.container {
  word-wrap: break-word;
}
</style>
<div class="container">
  <figure>
    <img src="http://placekitten.com/800/50" alt="kitten" />
  </figure>
  <span>It is missing a space when first word is two letters long</span>
</div>
 
Screen Shot 2016-08-22 at 11.29.50.png
95.9 KB View Download
Components: Blink>Layout
Labels: -Type-Bug -Pri-3 M-54 OS-Linux OS-Mac OS-Windows Pri-1 Type-Bug-Regression
Owner: kojii@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on mac 10.11.5 win10 and Linux 14.04 chrome version 52.0.2743.116 and canary - The space is missing making it look like "Itis"

This is working fine in M50 builds and hence a regression. Below is the bisect info

Good Build: 52.0.2743.73
Bad Build: 52.0.2743.74

CL : https://chromium.googlesource.com/chromium/src/+log/52.0.2743.73..52.0.2743.74?pretty=fuller&n=10000

Possible suspect : https://codereview.chromium.org/2136013002

Please reassign if this is not related to your change.
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 15 2016

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

commit d5bcb937b6dd019905eb7bbd9834b1eb26213f2a
Author: kojii <kojii@chromium.org>
Date: Thu Sep 15 04:16:20 2016

Fix BreakingContext::rewindToMidWordBreak to set m_currentCharacterIsSpace

This patch fixes BreakingContext::rewindToMidWordBreak to set
m_currentCharacterIsSpace correctly when it rewinded m_current.

Not doing so sets previousCharacterIsSpace incorrectly, and can
collapse whitespaces that should not be collapsed.

BUG= 639781 

Review-Url: https://codereview.chromium.org/2334143002
Cr-Commit-Position: refs/heads/master@{#418776}

[add] https://crrev.com/d5bcb937b6dd019905eb7bbd9834b1eb26213f2a/third_party/WebKit/LayoutTests/fast/text/break-word-with-floats-expected.html
[add] https://crrev.com/d5bcb937b6dd019905eb7bbd9834b1eb26213f2a/third_party/WebKit/LayoutTests/fast/text/break-word-with-floats.html
[modify] https://crrev.com/d5bcb937b6dd019905eb7bbd9834b1eb26213f2a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h

Comment 3 by kojii@chromium.org, Sep 16 2016

Labels: -OS-Linux -OS-Windows -OS-Mac OS-All
Status: Fixed (was: Assigned)

Sign in to add a comment