| Summary: | Unnecessary line-wrapping for no apparent reason | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Rebert <webkit> | ||||||||
| Component: | CSS | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | mmaxfield, simon.fraser, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Mac (Intel) | ||||||||||
| OS: | OS X 10.10 | ||||||||||
| URL: | http://jsfiddle.net/3mzzwbw7/ | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 159753 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Chris Rebert
2015-05-13 23:24:19 PDT
Created attachment 253101 [details]
Copy of JS Fiddle example
Likely due to a disagreement with the fast and complex text codepaths Created attachment 253414 [details]
Reduction
Reduction attached. The element is a float. My intuition says that RenderText::computePreferredLogicalWidths()'s measurement of the width of the text is somehow ending up smaller than BreakingContext::handleText()'s measurement. Simple line layout means that TextFragmentIterator is used instead of BreakingContext This is due to float precision. :( The disagreement is between RenderText::computePreferredLogicalWidths() and BreakingContext::handleText(). The initial layout uses simple line layout, but when you interact with the page, RenderText::positionForPoint() uses the regular line layout (this subsequent layout is the problematic one). The width of the float is calculated as the sum of the following items: "Chelsea" => 64.998001 " " => 5.00400019 "EBALE" => 55.9980011 Total: 126.000000 Simple line layout agrees with this calculation. However, when we get around to using regular line layout, the width of the text inside the float is calculated as the sum of the following items: "Chelsea" => 64.998001 " EBALE" => 61.0020065 Total: 126.000008 Note that 126.0f + 1 ULP = 126.000008 No longer occurs Confirmed that this no longer repros as of r186963. I've removed this from Bootstrap's Wall of Browser bugs: https://github.com/twbs/bootstrap/pull/16842 |