Bug 56962

Summary: [Chromium] Vertical Japanese text is not displayed on Snow Leopard
Product: WebKit Reporter: Mihai Parparita <mihaip>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt, jamesr, mark, noel.gordon, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
fast/dynamic/text-combine.html in ToT Chromium
none
Patch jamesr: review+

Mihai Parparita
Reported 2011-03-23 14:16:28 PDT
Created attachment 86685 [details] fast/dynamic/text-combine.html in ToT Chromium The following tests are failing on Chromium on Snow Leopard due to vertical text not being rendered in the right place: fast/blockflow/border-vertical-lr.html fast/blockflow/broken-ideograph-small-caps.html fast/blockflow/broken-ideographic-font.html fast/blockflow/japanese-lr-selection.html fast/blockflow/japanese-lr-text.html fast/blockflow/japanese-rl-selection.html fast/blockflow/japanese-rl-text-with-broken-font.html fast/blockflow/japanese-rl-text.html fast/blockflow/japanese-ruby-vertical-lr.html fast/blockflow/japanese-ruby-vertical-rl.html fast/blockflow/Kusa-Makura-background-canvas.html fast/blockflow/vertical-align-table-baseline.html fast/blockflow/vertical-baseline-alignment.html fast/blockflow/vertical-font-fallback.html fast/dynamic/text-combine.html fast/repaint/japanese-rl-selection-clear.html fast/repaint/japanese-rl-selection-repaint.html fast/repaint/repaint-across-writing-mode-boundary.html fast/ruby/base-shorter-than-text.html fast/text/emphasis-combined-text.html fast/text/justify-ideograph-vertical.html Expected image: http://svn.webkit.org/repository/webkit/trunk/LayoutTests/platform/mac/fast/dynamic/text-combine-expected.png Actual image: http://build.chromium.org/f/chromium/layout_test_results/Webkit_Mac10_6/results/layout-test-results/fast/dynamic/text-combine-actual.png Looking at the actual result in ToT Chromium (see attachment), the vertical text is getting rendered, just in the wrong position. However, we do have the correct glyph positions when computing layout, shown by find-in-page highlighting the right area.
Attachments
fast/dynamic/text-combine.html in ToT Chromium (108.76 KB, image/png)
2011-03-23 14:16 PDT, Mihai Parparita
no flags
Patch (4.38 KB, patch)
2011-03-24 16:36 PDT, Mihai Parparita
jamesr: review+
Mihai Parparita
Comment 2 2011-03-23 21:52:06 PDT
It looks like this is caused by this block in FontMac.mm: http://trac.webkit.org/changeset/80740/trunk/Source/WebCore/platform/graphics/mac/FontMac.mm Unlike Safari (which builds separate binaries for Leopard and Snow Leopard), Chromium always builds with the 10.5 SDK (and on Leopard?) so we don't end up on the SL path through that code, because BUILDING_ON_SNOW_LEOPARD is not true for us. At least for Chromium this will have to be a run-time check. Besides ATSUI vs. CoreText (http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp#L258), is there any other precedent for Chromium making a run-time switch where the Mac port does it at build time?
Ojan Vafai
Comment 3 2011-03-23 22:04:26 PDT
I don't think it's reasonable to create a runtime configuration every time we use BUILDING_ON_SNOW_LEOPARD/BUILDING_ON_LEOPARD. This bug also means that we don't correctly render elliptical gradients on Snow Leopard. Chromium really just needs to create separate binaries for Snow Leopard and Leopard. I don't know the history here to know why we share a binary though.
Mark Mentovai
Comment 4 2011-03-24 06:43:28 PDT
Chromium won’t be creating different binaries for different OS releases.
Mihai Parparita
Comment 5 2011-03-24 06:45:50 PDT
(In reply to comment #4) > Chromium won’t be creating different binaries for different OS releases. In that case, for doing these checks at runtime, is using Gestalt with gestaltSystemVersionMajor/Minor still the way to go?
Mark Mentovai
Comment 6 2011-03-24 07:41:19 PDT
If WebKit already has a function to get the OS version, it’s probably better to call that. If you’re concerned about bloating the object code size for Apple-style WebKit, which is built for a specific OS release, you can use macros to hide your tests. In some cases, you can use this in conjunction with compiler optimizations to keep things clean and workable. For example: #if BUILD_TIME_CHECK_FOR_LEOPARD bool useNewThing = false; #elif BUILD_TIME_CHECK_FOR_SNOW_LEOPARD bool useNewThing = true; #else bool useNewThing = RuntimeCheckForSnowLeopard(); #endif if (useNewThing) { // ... } Depending on the macros available, it may be easier to write this as #if CHROMIUM bool useNewThing = RuntimeCheckForSnowLeopard(); #elif BUILD_TIME_CHECK_FOR_LEOPARD bool useNewThing = false; // ...
Mihai Parparita
Comment 7 2011-03-24 16:36:19 PDT
Mihai Parparita
Comment 8 2011-03-24 16:40:20 PDT
With this patch the tests mentioned in the initial report will start to pass. Some of them will need rebaselines (for both mac and and chromium) since the results are now shifted by one pixel (presumably a side effect of r80582, the mac/ baselines haven't been updated since then). Rebaselines are not in the uploaded patch since it's too big for Bugzilla.
James Robinson
Comment 9 2011-03-24 16:51:21 PDT
Comment on attachment 86855 [details] Patch r=me
Mihai Parparita
Comment 10 2011-03-24 17:17:18 PDT
Note You need to log in before you can comment on or make changes to this bug.