WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
112227
REGRESSION (
r133351
, sub-pixel layout): Right-to-left block with text-overflow: ellipsis truncates prematurely (breaks facebook.com Hebrew UI)
https://bugs.webkit.org/show_bug.cgi?id=112227
Summary
REGRESSION (r133351, sub-pixel layout): Right-to-left block with text-overflo...
mitz
Reported
2013-03-12 23:01:31 PDT
To reproduce, navigate to the URL. The text truncated with ellipsis, even though it could fit untruncated (or the box could be made wider to let it fit). The same can be seen in many UI elements at facebook.com when the UI language is set to Hebrew on the website. This was caused by <
http://trac.webkit.org/r133351
>.
Attachments
Patch
(378.04 KB, patch)
2014-05-16 10:45 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2013-03-12 23:02:09 PDT
<
rdar://problem/13408101
>
Levi Weintraub
Comment 2
2013-03-12 23:27:53 PDT
Thanks for the great reduction!
Simon Fraser (smfr)
Comment 3
2013-03-26 14:02:58 PDT
Levi: any update?
Robert Hogan
Comment 4
2013-03-30 02:11:08 PDT
I can't reproduce with
r144213
.
Allan Sandfeld Jensen
Comment 5
2013-04-26 09:30:29 PDT
I can't reproduce the issue either, using
r149181
and Qt with subpixel-layout.
zalan
Comment 6
2013-12-09 13:33:12 PST
I can repro it on Mac with subpixel on. (
r160307
)
zalan
Comment 7
2014-04-22 12:23:31 PDT
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; }
zalan
Comment 8
2014-05-16 10:45:32 PDT
Created
attachment 231580
[details]
Patch
Maciej Stachowiak
Comment 9
2014-05-18 17:21:59 PDT
Comment on
attachment 231580
[details]
Patch r=me
WebKit Commit Bot
Comment 10
2014-05-19 10:37:57 PDT
Comment on
attachment 231580
[details]
Patch Clearing flags on attachment: 231580 Committed
r169048
: <
http://trac.webkit.org/changeset/169048
>
WebKit Commit Bot
Comment 11
2014-05-19 10:38:09 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug