WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105600
REGRESSION (
r138196
): Regions with text-overflow: ellipsis; are being ellipsized unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=105600
Summary
REGRESSION (r138196): Regions with text-overflow: ellipsis; are being ellipsi...
Mark Rowe (bdash)
Reported
2012-12-20 18:35:47 PST
After <
http://trac.webkit.org/changeset/138196
> I'm seeing unnecessarily ellipsized text on a number of different websites. For instance, on <
https://github.com/scalatra/scalatra/
> the folder listing includes many ellipsized items. In particular, the first item "akka" is displayed as "ak…" even though the following item is substantially longer and is not itself truncated. This is also visible on Facebook in the news feed sorting widget. "Most recent" is truncated to "Must rece…", even though there's clearly room for the "nt" to be displayed.
Attachments
Patch
(4.59 KB, patch)
2012-12-26 13:00 PST
,
Emil A Eklund
darin
: review+
Details
Formatted Diff
Diff
Patch for landing
(5.30 KB, patch)
2012-12-27 10:37 PST
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2012-12-20 18:37:10 PST
<
rdar://problem/12922386
>
Levi Weintraub
Comment 2
2012-12-20 19:50:59 PST
If this is urgent for anyone, feel free to roll out the patch. Otherwise Emil or I will take a look tomorrow AM PST (assuming he doesn't look at it tonight).
Emil A Eklund
Comment 3
2012-12-21 09:53:03 PST
Looking into this now.
Emil A Eklund
Comment 4
2012-12-21 11:19:08 PST
I have not been able to reproduce the problem on the github site listed above nor on facebook in a tip of tree safari build regardless of zoom level.
mitz
Comment 5
2012-12-21 11:34:27 PST
You may need to disable screen font substitution and/or enable kerning and ligatures by default to see this. The relevant user defaults are: WebKitScreenFontSubstitutionEnabled WebKitKerningAndLigaturesEnabledByDefault
mitz
Comment 6
2012-12-21 11:40:55 PST
(In reply to
comment #5
)
> You may need to disable screen font substitution and/or enable kerning and ligatures by default to see this. The relevant user defaults are: > > WebKitScreenFontSubstitutionEnabled
This is actually a WebKit preference, so for Safari’s WebKit2 content view you’ll need to use com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled
> WebKitKerningAndLigaturesEnabledByDefault
Emil A Eklund
Comment 7
2012-12-21 11:51:49 PST
Tried setting the defaults as but still does not reproduce. Are there any other settings I might need (or perhaps the defaults needs to be set in a different way)? $ defaults write com.apple.Safari WebKitScreenFontSubstitutionEnabled 1 $ defaults write com.apple.Safari WebKitKerningAndLigaturesEnabledByDefault 1 $ defaults write com.apple.Safari.ContentPageGroupIdentifier WebKit2ScreenFontSubstitutionEnabled 1
Mark Rowe (bdash)
Comment 8
2012-12-21 11:53:55 PST
The last one should be: $ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled 1
Emil A Eklund
Comment 9
2012-12-21 12:27:30 PST
(In reply to
comment #8
)
> The last one should be: > > $ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled 1
Ah, thanks. Sadly I'm still not able to reproduce the problem.
mitz
Comment 10
2012-12-22 09:41:51 PST
(In reply to
comment #9
)
> (In reply to
comment #8
) > > The last one should be: > > > > $ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled 1 > > Ah, thanks. Sadly I'm still not able to reproduce the problem.
1 (or YES) is the default on Mountain Lion and earlier. In order to be able to reproduce the problem, please try $ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled 0
Emil A Eklund
Comment 11
2012-12-26 10:26:59 PST
(In reply to
comment #10
)
> 1 (or YES) is the default on Mountain Lion and earlier. In order to be able to reproduce the problem, please try > > $ defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2ScreenFontSubstitutionEnabled 0
That did the trick, thanks!
Emil A Eklund
Comment 12
2012-12-26 13:00:10 PST
Created
attachment 180761
[details]
Patch
Darin Adler
Comment 13
2012-12-26 17:44:46 PST
Comment on
attachment 180761
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180761&action=review
> Source/WebCore/rendering/RenderBlockLineLayout.cpp:3206 > + int lineBoxEdge = ltr ? snapSizeToPixel(curr->x() + curr->logicalWidth(), curr->x()) : snapSizeToPixel(curr->x(), 0);
Is there a way to write the two snaps more consistently. I’m concerned that curr->x() ends up being the reference value when it’s LTR, but 0 when it’s RTL. Does not seem quite right. And the test case only covers LTR, so the RTL code could be wrong and the test would not show us.
Emil A Eklund
Comment 14
2012-12-27 10:36:35 PST
(In reply to
comment #13
)
> (From update of
attachment 180761
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=180761&action=review
> > > Source/WebCore/rendering/RenderBlockLineLayout.cpp:3206 > > + int lineBoxEdge = ltr ? snapSizeToPixel(curr->x() + curr->logicalWidth(), curr->x()) : snapSizeToPixel(curr->x(), 0); > > Is there a way to write the two snaps more consistently. I’m concerned that curr->x() ends up being the reference value when it’s LTR, but 0 when it’s RTL. Does not seem quite right. And the test case only covers LTR, so the RTL code could be wrong and the test would not show us.
I tested with both LTR and RTL content and both resulted in incorrect truncation. The proposed change fixes the problem for both LTR and RTL and the snapping matches the logic we use for snapping rtl content elsewhere. I'll updated the patch to include a test for RTL content.
Emil A Eklund
Comment 15
2012-12-27 10:37:15 PST
Created
attachment 180811
[details]
Patch for landing
Emil A Eklund
Comment 16
2012-12-28 10:34:39 PST
Committed
r138543
: <
http://trac.webkit.org/changeset/138543
>
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