Bug 138891

Summary: [OS X] Upright vertical text is completely broken for multi-code-unit code points
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, jonlee, mitz, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 144303    
Attachments:
Description Flags
Patch
none
Patch mitz: review+

Myles C. Maxfield
Reported 2014-11-19 15:30:45 PST
Upright vertical text is completely broken for multi-code-unit codepoints
Attachments
Patch (6.28 KB, patch)
2014-11-19 15:49 PST, Myles C. Maxfield
no flags
Patch (8.46 KB, patch)
2014-11-19 16:26 PST, Myles C. Maxfield
mitz: review+
Myles C. Maxfield
Comment 1 2014-11-19 15:49:01 PST
Myles C. Maxfield
Comment 2 2014-11-19 15:49:32 PST
mitz
Comment 3 2014-11-19 16:07:47 PST
Comment on attachment 241899 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=241899&action=review > Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp:153 > - setGlyphDataForIndex(offset + stringIndices[i], glyphs[i], fontData); > + // Because of the size of the GlyphPage, the string will never straddle a code-unit size boundary > + unsigned index = U16_IS_LEAD(buffer[stringIndices[i]]) ? stringIndices[i] / 2 : stringIndices[i]; > + setGlyphDataForIndex(offset + index, glyphs[i], fontData); Shouldn’t you make this change in the else block below as well? It’s weird to write the logic this way, because we are relying on the fact that buffer is either uniformly BMP characters or surrogate pairs. It wouldn’t work otherwise. I think that instead you should use the glyphStep approach we use above.
Myles C. Maxfield
Comment 4 2014-11-19 16:26:08 PST
Myles C. Maxfield
Comment 5 2014-11-19 17:35:47 PST
Note You need to log in before you can comment on or make changes to this bug.