DescriptionMerge 133983 - [Chromium] Arabic digits should appear left-to-right
https://bugs.webkit.org/show_bug.cgi?id=101440
Reviewed by Tony Chang.
Source/WebCore:
Call hb_buffer_set_direction() to set direction when drawing glyphs or
direction should be overridden. Leave direction setting to HarfBuzz when
WebKit is calculating widths because the direction is LTR by default while
calculating widths. Set script before shaping so that HarfBuzz can estimate
appropriate direction.
Test: fast/text/international/arabic-digits.html
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
Add m_script. This holds the script of the run.
(WebCore::HarfBuzzShaper::shape):
Tell shapeHarfBuzzRuns() to set direction when drawing glyphs or
direction should be overridden.
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
Set script of HarfBuzzRuns.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
Add an argument that indicates it should set direction.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::create):
(WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
(WebCore::HarfBuzzShaper::HarfBuzzRun::script):
(HarfBuzzRun):
(HarfBuzzShaper):
LayoutTests:
Add a test that checks Arabic digits appear in increasing order from left to right.
* fast/text/international/arabic-digits-expected.html: Added.
* fast/text/international/arabic-digits.html: Added.
TBR=bashi@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134172
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|