WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49378
fast/text/justification-padding-mid-word.html fails on Windows
https://bugs.webkit.org/show_bug.cgi?id=49378
Summary
fast/text/justification-padding-mid-word.html fails on Windows
Adam Roben (:aroben)
Reported
2010-11-11 05:14:57 PST
fast/text/justification-padding-mid-word.html fails on Windows. See the URL for the (uninteresting) diff. I believe it's been failing since it was added in
r71783
. I've checked in new expected results for Windows to get the bots green again.
Attachments
Treat zero-width-space-like and space-like characters correctly in UniscribeController
(3.90 KB, patch)
2010-11-11 17:02 PST
,
mitz
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2010-11-11 05:28:04 PST
<
rdar://problem/8657116
>
mitz
Comment 2
2010-11-11 17:02:58 PST
Created
attachment 73683
[details]
Treat zero-width-space-like and space-like characters correctly in UniscribeController
WebKit Review Bot
Comment 3
2010-11-11 17:04:12 PST
Attachment 73683
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/win/fast/text/justification-padding-mid-word-expected.txt', u'WebCore/ChangeLog', u'WebCore/platform/graphics/win/UniscribeController.cpp']" exit_code: 1 WebCore/platform/graphics/win/UniscribeController.cpp:278: Tab found; better to use spaces [whitespace/tab] [1] WebCore/platform/graphics/win/UniscribeController.cpp:279: Tab found; better to use spaces [whitespace/tab] [1] WebCore/platform/graphics/win/UniscribeController.cpp:280: Tab found; better to use spaces [whitespace/tab] [1] WebCore/platform/graphics/win/UniscribeController.cpp:285: Tab found; better to use spaces [whitespace/tab] [1] WebCore/platform/graphics/win/UniscribeController.cpp:286: Tab found; better to use spaces [whitespace/tab] [1] Total errors found: 5 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 4
2010-11-11 17:06:28 PST
I’ll de-tabify.
Darin Adler
Comment 5
2010-11-11 17:10:39 PST
Comment on
attachment 73683
[details]
Treat zero-width-space-like and space-like characters correctly in UniscribeController View in context:
https://bugs.webkit.org/attachment.cgi?id=73683&action=review
> WebCore/platform/graphics/win/UniscribeController.cpp:287 > - if (Font::treatAsSpace(ch)) { > + bool treatAsSpace = Font::treatAsSpace(ch); > + bool treatAsZeroWidthSpace = ch == zeroWidthSpace || Font::treatAsZeroWidthSpace(ch); > + if (treatAsSpace || treatAsZeroWidthSpace) { > // Substitute in the space glyph at the appropriate place in the glyphs > // array. > glyphs[clusters[k]] = fontData->spaceGlyph(); > - advances[clusters[k]] = logicalSpaceWidth; > - spaceCharacters[clusters[k]] = m_currentCharacter + k + item.iCharPos; > + advances[clusters[k]] = treatAsSpace ? logicalSpaceWidth : 0; > + if (treatAsSpace) > + spaceCharacters[clusters[k]] = m_currentCharacter + k + item.iCharPos; > }
Tabs!
> WebCore/platform/graphics/win/UniscribeController.cpp:342 > - if (glyph == fontData->spaceGlyph()) { > + int characterIndex = spaceCharacters[k]; > + if (characterIndex >= 0) {
The fact that this is a way to detect treatAsSpace because the code above leaves spaceCharacters along for those characters, and the buffer is initialized with -1 is non-obvious. A comment or different coding idiom of some sort could be helpful.
mitz
Comment 6
2010-11-11 17:22:11 PST
Fixed in <
http://trac.webkit.org/changeset/71870
>
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