Changeset 76768

Timestamp:
01/27/11 00:23:31 (4 years ago)
Author:
mitz@apple.com
Message:

REGRESSION (r76743): Uneven spacing in right-to-left justified text
https://bugs.webkit.org/show_bug.cgi?id=53225

Reviewed by Sam Weinig.

Fixes failure in fast/text/atsui-spacing-features.html

There was an inconsistency between rendering code and font code in the interpretation of
'after expansion' and 'trailing expansion'. Changed all code to interpret these in terms of
visual order rather than logical.

  • platform/graphics/Font.cpp:

(WebCore::Font::expansionOpportunityCount): Added a text direction parameter and changed to
iterate in visual order accordingly.

  • platform/graphics/Font.h:
  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::WidthIterator): Pass the run direction to expansionOpportunityCount().
(WebCore::WidthIterator::advance): For right-to-left runs, evaluate the trailing expansion
condition with respect to the first character, which is the trailing character in visual order.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::ComplexTextController): Pass the run direction to
expansionOpportunityCount().

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.

Location:
trunk/Source/WebCore
Files:
6 edited

Note: See TracChangeset for help on using the changeset viewer.