Changeset 96431 in webkit


Ignore:
Timestamp:
Sep 30, 2011 3:12:37 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=69173

RTL/LTR mixtures still not correct in regions. Simplify the loop once I realized it's only
your directionality that matters and not your containing block's.

Reviewed by Dan Bernstein.

Source/WebCore:

Added new test in fast/regions.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::borderBoxRectInRegion):

LayoutTests:

  • fast/regions/multiple-directionality-changes-in-variable-width-regions.html: Added.
  • platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.png: Added.
  • platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r96427 r96431  
     12011-09-30  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=69173
     4       
     5        RTL/LTR mixtures still not correct in regions. Simplify the loop once I realized it's only
     6        your directionality that matters and not your containing block's.
     7
     8        Reviewed by Dan Bernstein.
     9
     10        * fast/regions/multiple-directionality-changes-in-variable-width-regions.html: Added.
     11        * platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.png: Added.
     12        * platform/mac/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Added.
     13
    1142011-09-30  Dan Bernstein  <mitz@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r96427 r96431  
     12011-09-30  David Hyatt  <hyatt@apple.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=69173
     4       
     5        RTL/LTR mixtures still not correct in regions. Simplify the loop once I realized it's only
     6        your directionality that matters and not your containing block's.
     7
     8        Reviewed by Dan Bernstein.
     9
     10        Added new test in fast/regions.
     11
     12        * rendering/RenderBox.cpp:
     13        (WebCore::RenderBox::borderBoxRectInRegion):
     14
    1152011-09-30  Dan Bernstein  <mitz@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r96423 r96431  
    216216    boxInfo = currentBox->renderBoxRegionInfo(region);
    217217    while (boxInfo && boxInfo->isShifted()) {
    218         RenderBox* containerBox = currentBox->containingBlock();
    219         LayoutUnit widthDelta = currentBox->logicalWidth() - boxInfo->logicalWidth();
    220         if (containerBox->style()->direction() == LTR) {
    221             if (currentBox->style()->direction() == RTL)
    222                 logicalLeft -= widthDelta;
    223             else
    224                 logicalLeft += boxInfo->logicalLeft();
    225            
    226         } else {
    227             if (currentBox->style()->direction() == LTR)
    228                 logicalLeft += widthDelta;
    229             else
    230                 logicalLeft -= widthDelta - boxInfo->logicalLeft();
    231         }
    232         currentBox = containerBox;
     218        if (currentBox->style()->direction() == LTR)
     219            logicalLeft += boxInfo->logicalLeft();
     220        else
     221            logicalLeft -= (currentBox->logicalWidth() - boxInfo->logicalWidth()) - boxInfo->logicalLeft();
     222        currentBox = currentBox->containingBlock();
    233223        boxInfo = currentBox->renderBoxRegionInfo(region);
    234224    }
Note: See TracChangeset for help on using the changeset viewer.