Changeset 151807 in webkit


Ignore:
Timestamp:
Jun 20, 2013 3:15:34 PM (11 years ago)
Author:
enrica@apple.com
Message:

Initial advance on the first glyph of the run is not correctly set for rtl text.
https://bugs.webkit.org/show_bug.cgi?id=117839
<rdar://problem/13860717>

Reviewed by Sam Weinig.

Source/WebCore:

We need to set the initial advance to the glyphBuffer, using the
initial advance of the complex run that will be drawn first.
In order to choose the run correctly we must consider the text direction.

Test: fast/text/complex-first-glyph-with-initial-advance.html

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::advance):

LayoutTests:

  • fast/text/complex-first-glyph-with-initial-advance-expected.html: Added.
  • fast/text/complex-first-glyph-with-initial-advance.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151801 r151807  
     12013-06-20  Enrica Casucci  <enrica@apple.com>
     2
     3        Initial advance on the first glyph of the run is not correctly set for rtl text.
     4        https://bugs.webkit.org/show_bug.cgi?id=117839
     5        <rdar://problem/13860717>
     6
     7        Reviewed by Sam Weinig.
     8
     9        * fast/text/complex-first-glyph-with-initial-advance-expected.html: Added.
     10        * fast/text/complex-first-glyph-with-initial-advance.html: Added.
     11
    1122013-06-20  Commit Queue  <commit-queue@webkit.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r151805 r151807  
     12013-06-20  Enrica Casucci  <enrica@apple.com>
     2
     3        Initial advance on the first glyph of the run is not correctly set for rtl text.
     4        https://bugs.webkit.org/show_bug.cgi?id=117839
     5        <rdar://problem/13860717>
     6
     7        Reviewed by Sam Weinig.
     8
     9        We need to set the initial advance to the glyphBuffer, using the
     10        initial advance of the complex run that will be drawn first.
     11        In order to choose the run correctly we must consider the text direction.
     12
     13        Test: fast/text/complex-first-glyph-with-initial-advance.html
     14
     15        * platform/graphics/mac/ComplexTextController.cpp:
     16        (WebCore::ComplexTextController::advance):
     17
    1182013-06-20  Alex Christensen  <achristensen@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r149056 r151807  
    497497            fallbackFonts->add(complexTextRun.fontData());
    498498
    499         if (glyphBuffer && glyphBuffer->isEmpty())
     499        // We must store the initial advance for the first glyph we are going to draw.
     500        // When leftmostGlyph is 0, it represents the first glyph to draw, taking into
     501        // account the text direction.
     502        if (glyphBuffer && !leftmostGlyph)
    500503            glyphBuffer->setInitialAdvance(complexTextRun.initialAdvance());
    501504
Note: See TracChangeset for help on using the changeset viewer.