Summary: | REGRESSION (r133351, sub-pixel layout): Right-to-left block with text-overflow: ellipsis truncates prematurely (breaks facebook.com Hebrew UI) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | allan.jensen, commit-queue, eae, esprehn+autocc, glenn, kondapallykalyan, leviw, robert, simon.fraser, webkit-bug-importer, WebkitBugTracker, zalan | ||||
Priority: | P1 | Keywords: | InRadar, Regression | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | data:text/html,%3Cspan%20style=%22font-family:%20lucida%20grande;%20position:%20absolute;%20outline:%20thin%20dashed%20lightblue;%20overflow:%20hidden;%20text-overflow:%20ellipsis;%20direction:%20rtl;%22%3Esample%3C/span%3E | ||||||
Attachments: |
|
Description
mitz
2013-03-12 23:01:31 PDT
Thanks for the great reduction! Levi: any update? I can't reproduce the issue either, using r149181 and Qt with subpixel-layout. Truncation happens when right/left offsets are integral snapped (so available width is int snapped too) while the computed text length is not. When we try to fit the text, we start truncating because available width < text length. The fix is either snap both the available width and the text length or neither. Our approach is to not to snap during layout time, however removing just these 2 snappings introduce regression. I am going to address it when inlines are properly un-snapped. diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp index 112d972..56685d8 100644 --- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp +++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp @@ -614,8 +614,8 @@ void RenderBlockFlow::updateLogicalWidthForAlignment(const ETextAlign& textAlign static void updateLogicalInlinePositions(RenderBlockFlow& block, float& lineLogicalLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, Layou { LayoutUnit lineLogicalHeight = block.minLineHeightForReplacedRenderer(firstLine, boxLogicalHeight); - lineLogicalLeft = block.pixelSnappedLogicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight); - lineLogicalRight = block.pixelSnappedLogicalRightOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight); + lineLogicalLeft = block.logicalLeftOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight); + lineLogicalRight = block.logicalRightOffsetForLine(block.logicalHeight(), shouldIndentText == IndentText, lineLogicalHeight); availableLogicalWidth = lineLogicalRight - lineLogicalLeft; } Created attachment 231580 [details]
Patch
Comment on attachment 231580 [details]
Patch
r=me
Comment on attachment 231580 [details] Patch Clearing flags on attachment: 231580 Committed r169048: <http://trac.webkit.org/changeset/169048> All reviewed patches have been landed. Closing bug. |