Changeset 78396 in webkit


Ignore:
Timestamp:
Feb 11, 2011 5:34:28 PM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

2011-02-11 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Darin Adler.

Background image positioning on RTL text
https://bugs.webkit.org/show_bug.cgi?id=32862

  • fast/inline/inline-box-background-long-image.html: Added.
  • fast/inline/inline-box-background-repeat-x.html: Added.
  • fast/inline/inline-box-background-repeat-y.html: Added.
  • fast/inline/inline-box-background.html: Added.
  • fast/inline/resources: Added.
  • fast/inline/resources/checker.png: Added.
  • fast/inline/resources/gradient.png: Added.
  • platform/mac/fast/inline/inline-box-background-expected.checksum: Added.
  • platform/mac/fast/inline/inline-box-background-expected.png: Added.
  • platform/mac/fast/inline/inline-box-background-expected.txt: Added.
  • platform/mac/fast/inline/inline-box-background-long-image-expected.checksum: Added.
  • platform/mac/fast/inline/inline-box-background-long-image-expected.png: Added.
  • platform/mac/fast/inline/inline-box-background-long-image-expected.txt: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-x-expected.checksum: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-x-expected.png: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-x-expected.txt: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-y-expected.checksum: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-y-expected.png: Added.
  • platform/mac/fast/inline/inline-box-background-repeat-y-expected.txt: Added.

2011-02-11 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Darin Adler.

Background image positioning on RTL text
https://bugs.webkit.org/show_bug.cgi?id=32862

When the style of InlineFlowBox is right-to-left, the strips should be rearranged in reverse order.

Tests: fast/inline/inline-box-background-long-image.html

fast/inline/inline-box-background-repeat-x.html
fast/inline/inline-box-background-repeat-y.html
fast/inline/inline-box-background.html

  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintFillLayer):
Location:
trunk
Files:
19 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r78395 r78396  
     12011-02-11  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Background image positioning on RTL text
     6        https://bugs.webkit.org/show_bug.cgi?id=32862
     7
     8        * fast/inline/inline-box-background-long-image.html: Added.
     9        * fast/inline/inline-box-background-repeat-x.html: Added.
     10        * fast/inline/inline-box-background-repeat-y.html: Added.
     11        * fast/inline/inline-box-background.html: Added.
     12        * fast/inline/resources: Added.
     13        * fast/inline/resources/checker.png: Added.
     14        * fast/inline/resources/gradient.png: Added.
     15        * platform/mac/fast/inline/inline-box-background-expected.checksum: Added.
     16        * platform/mac/fast/inline/inline-box-background-expected.png: Added.
     17        * platform/mac/fast/inline/inline-box-background-expected.txt: Added.
     18        * platform/mac/fast/inline/inline-box-background-long-image-expected.checksum: Added.
     19        * platform/mac/fast/inline/inline-box-background-long-image-expected.png: Added.
     20        * platform/mac/fast/inline/inline-box-background-long-image-expected.txt: Added.
     21        * platform/mac/fast/inline/inline-box-background-repeat-x-expected.checksum: Added.
     22        * platform/mac/fast/inline/inline-box-background-repeat-x-expected.png: Added.
     23        * platform/mac/fast/inline/inline-box-background-repeat-x-expected.txt: Added.
     24        * platform/mac/fast/inline/inline-box-background-repeat-y-expected.checksum: Added.
     25        * platform/mac/fast/inline/inline-box-background-repeat-y-expected.png: Added.
     26        * platform/mac/fast/inline/inline-box-background-repeat-y-expected.txt: Added.
     27
    1282011-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
    229
  • trunk/Source/WebCore/ChangeLog

    r78395 r78396  
     12011-02-11  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Background image positioning on RTL text
     6        https://bugs.webkit.org/show_bug.cgi?id=32862
     7
     8        When the style of InlineFlowBox is right-to-left, the strips should be rearranged in reverse order.
     9
     10        Tests: fast/inline/inline-box-background-long-image.html
     11               fast/inline/inline-box-background-repeat-x.html
     12               fast/inline/inline-box-background-repeat-y.html
     13               fast/inline/inline-box-background.html
     14
     15        * rendering/InlineFlowBox.cpp:
     16        (WebCore::InlineFlowBox::paintFillLayer):
     17
    1182011-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
    219
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r77286 r78396  
    10091009        // as though you had one single line.  This means each line has to pick up the background where
    10101010        // the previous line left off.
    1011         // FIXME: What the heck do we do with RTL here? The math we're using is obviously not right,
    1012         // but it isn't even clear how this should work at all.
    10131011        int logicalOffsetOnLine = 0;
    1014         for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
    1015             logicalOffsetOnLine += curr->logicalWidth();
    1016         int totalLogicalWidth = logicalOffsetOnLine;
    1017         for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
    1018             totalLogicalWidth += curr->logicalWidth();
     1012        int totalLogicalWidth;
     1013        if (renderer()->style()->direction() == LTR) {
     1014            for (InlineFlowBox* curr = prevLineBox(); curr; curr = curr->prevLineBox())
     1015                logicalOffsetOnLine += curr->logicalWidth();
     1016            totalLogicalWidth = logicalOffsetOnLine;
     1017            for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox())
     1018                totalLogicalWidth += curr->logicalWidth();
     1019        } else {
     1020            for (InlineFlowBox* curr = nextLineBox(); curr; curr = curr->nextLineBox())
     1021                logicalOffsetOnLine += curr->logicalWidth();
     1022            totalLogicalWidth = logicalOffsetOnLine;
     1023            for (InlineFlowBox* curr = this; curr; curr = curr->prevLineBox())
     1024                totalLogicalWidth += curr->logicalWidth();
     1025        }
    10191026        int stripX = tx - (isHorizontal() ? logicalOffsetOnLine : 0);
    10201027        int stripY = ty - (isHorizontal() ? 0 : logicalOffsetOnLine);
Note: See TracChangeset for help on using the changeset viewer.