Changeset 116435 in webkit


Ignore:
Timestamp:
May 8, 2012 10:51:29 AM (12 years ago)
Author:
hbono@chromium.org
Message:

[Chromium] Fix the position of an RTL resizer
https://bugs.webkit.org/show_bug.cgi?id=80640

Reviewed by Tony Chang.

When rendering an RTL resizer, my r110073 renders it at the same position as the
one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
resizer image at an incorrect position on Mac and Linux. This change uses the
correct formula to calculate the position of an RTL resizer.

Source/WebCore:

Test: platform/chromium/scrollbars/rtl-resizer-position.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::drawPlatformResizerImage):

LayoutTests:

  • platform/chromium/platform/chromium/scrollbars: Added.
  • platform/chromium/platform/chromium/scrollbars/rtl-resizer-position-expected.png: Added.
  • platform/chromium/platform/chromium/scrollbars/rtl-resizer-position-expected.txt: Added.
  • platform/chromium/scrollbars/rtl-resizer-position.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116431 r116435  
     12012-05-08  Hironori Bono  <hbono@chromium.org>
     2
     3        [Chromium] Fix the position of an RTL resizer
     4        https://bugs.webkit.org/show_bug.cgi?id=80640
     5
     6        Reviewed by Tony Chang.
     7
     8        When rendering an RTL resizer, my r110073 renders it at the same position as the
     9        one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
     10        resizer image at an incorrect position on Mac and Linux. This change uses the
     11        correct formula to calculate the position of an RTL resizer.
     12
     13        * platform/chromium/platform/chromium/scrollbars: Added.
     14        * platform/chromium/platform/chromium/scrollbars/rtl-resizer-position-expected.png: Added.
     15        * platform/chromium/platform/chromium/scrollbars/rtl-resizer-position-expected.txt: Added.
     16        * platform/chromium/scrollbars/rtl-resizer-position.html: Added.
     17
    1182012-05-08  Csaba Osztrogonác  <ossy@webkit.org>
    219
  • trunk/Source/WebCore/ChangeLog

    r116430 r116435  
     12012-05-08  Hironori Bono  <hbono@chromium.org>
     2
     3        [Chromium] Fix the position of an RTL resizer
     4        https://bugs.webkit.org/show_bug.cgi?id=80640
     5
     6        Reviewed by Tony Chang.
     7
     8        When rendering an RTL resizer, my r110073 renders it at the same position as the
     9        one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
     10        resizer image at an incorrect position on Mac and Linux. This change uses the
     11        correct formula to calculate the position of an RTL resizer.
     12
     13        Test: platform/chromium/scrollbars/rtl-resizer-position.html
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::RenderLayer::drawPlatformResizerImage):
     17
    1182012-05-08  Andreas Kling  <kling@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r116395 r116435  
    26522652    }
    26532653
    2654     IntRect imageRect(resizerCornerRect.maxXMaxYCorner() - cornerResizerSize, cornerResizerSize);
    26552654    if (renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
    26562655        context->save();
    2657         context->translate(imageRect.x(), imageRect.y());
    2658         imageRect.setX(0);
    2659         imageRect.setY(0);
     2656        context->translate(resizerCornerRect.x() + cornerResizerSize.width(), resizerCornerRect.y() + resizerCornerRect.height() - cornerResizerSize.height());
    26602657        context->scale(FloatSize(-1.0, 1.0));
    2661         context->drawImage(resizeCornerImage.get(), renderer()->style()->colorSpace(), imageRect);
     2658        context->drawImage(resizeCornerImage.get(), renderer()->style()->colorSpace(), IntRect(IntPoint(), cornerResizerSize));
    26622659        context->restore();
    26632660        return;
    26642661    }
     2662    IntRect imageRect(resizerCornerRect.maxXMaxYCorner() - cornerResizerSize, cornerResizerSize);
    26652663    context->drawImage(resizeCornerImage.get(), renderer()->style()->colorSpace(), imageRect);
    26662664}
Note: See TracChangeset for help on using the changeset viewer.