Changeset 84655 in webkit


Ignore:
Timestamp:
Apr 22, 2011 11:53:15 AM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-04-22 Levi Weintraub <leviw@chromium.org>

Reviewed by Darin Fisher.

REGRESSION: left property broken with position:fixed elements in RTL documents
https://bugs.webkit.org/show_bug.cgi?id=59204
http://code.google.com/p/chromium/issues/detail?id=80216

Test: fast/block/positioning/rtl-fixed-positioning.html

fast/block/positioning/vertical-rl/fixed-positioning.html

Returning the proper scroll offsets for fixed position content in RTL documents.
We regressed to X and Y offsets not updating while scrolling when we clamped to zero,
but RTL documents scroll in negative space.

  • page/FrameView.cpp: (WebCore::FrameView::scrollXForFixedPosition): Properly handling RTL documents where the scroll origin and offsets are negative. (WebCore::FrameView::scrollYForFixedPosition): Properly handling vertical writing- mode RTL documents, like above.
  • platform/ScrollView.h: (WebCore::ScrollView::scrollOrigin): Changing this accessor to const.

2011-04-22 Levi Weintraub <leviw@chromium.org>

Reviewed by Darin Fisher.

REGRESSION: left property broken with position:fixed elements in RTL documents
https://bugs.webkit.org/show_bug.cgi?id=59204
http://code.google.com/p/chromium/issues/detail?id=80216

Test to ensure position:fixed works properly in RTL documents.

  • fast/block/positioning/rtl-fixed-positioning.html: Added.
  • fast/block/positioning/vertical-rl/fixed-positioning.html: Added.
  • platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.checksum: Added.
  • platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.png: Added.
  • platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.txt: Added.
  • platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.checksum: Added.
  • platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.png: Added.
  • platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.txt: Added.
Location:
trunk
Files:
8 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84651 r84655  
     12011-04-22  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        REGRESSION: left property broken with position:fixed elements in RTL documents
     6        https://bugs.webkit.org/show_bug.cgi?id=59204
     7        http://code.google.com/p/chromium/issues/detail?id=80216
     8
     9        Test to ensure position:fixed works properly in RTL documents.
     10
     11        * fast/block/positioning/rtl-fixed-positioning.html: Added.
     12        * fast/block/positioning/vertical-rl/fixed-positioning.html: Added.
     13        * platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.checksum: Added.
     14        * platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.png: Added.
     15        * platform/mac/fast/block/positioning/rtl-fixed-positioning-expected.txt: Added.
     16        * platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.checksum: Added.
     17        * platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.png: Added.
     18        * platform/mac/fast/block/positioning/vertical-rl/fixed-positioning-expected.txt: Added.
     19
    1202011-04-22  Roland Steiner  <rolandsteiner@chromium.org>
    221
  • trunk/Source/WebCore/ChangeLog

    r84653 r84655  
     12011-04-22  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        REGRESSION: left property broken with position:fixed elements in RTL documents
     6        https://bugs.webkit.org/show_bug.cgi?id=59204
     7        http://code.google.com/p/chromium/issues/detail?id=80216
     8
     9        Test: fast/block/positioning/rtl-fixed-positioning.html
     10              fast/block/positioning/vertical-rl/fixed-positioning.html
     11
     12        Returning the proper scroll offsets for fixed position content in RTL documents.
     13        We regressed to X and Y offsets not updating while scrolling when we clamped to zero,
     14        but RTL documents scroll in negative space.
     15
     16        * page/FrameView.cpp:
     17        (WebCore::FrameView::scrollXForFixedPosition): Properly handling RTL documents where
     18        the scroll origin and offsets are negative.
     19        (WebCore::FrameView::scrollYForFixedPosition): Properly handling vertical writing-
     20        mode RTL documents, like above.
     21        * platform/ScrollView.h:
     22        (WebCore::ScrollView::scrollOrigin): Changing this accessor to const.
     23
    1242011-04-22  Justin Schuh  <jschuh@chromium.org>
    225
  • trunk/Source/WebCore/page/FrameView.cpp

    r84553 r84655  
    11481148    int x = scrollX();
    11491149
    1150     if (x < 0)
    1151         x = 0;
    1152     else if (x > maxX)
    1153         x = maxX;
     1150    if (!ScrollView::scrollOrigin().x()) {
     1151        if (x < 0)
     1152            x = 0;
     1153        else if (x > maxX)
     1154            x = maxX;
     1155    } else {
     1156        if (x > 0)
     1157            x = 0;
     1158        else if (x < -maxX)
     1159            x = -maxX;
     1160    }
    11541161
    11551162    if (!m_frame)
     
    11761183    int y = scrollY();
    11771184
    1178     if (y < 0)
    1179         y = 0;
    1180     else if (y > maxY)
    1181         y = maxY;
     1185    if (!ScrollView::scrollOrigin().y()) {
     1186        if (y < 0)
     1187            y = 0;
     1188        else if (y > maxY)
     1189            y = maxY;
     1190    } else {
     1191        if (y > 0)
     1192            y = 0;
     1193        else if (y < -maxY)
     1194            y = -maxY;
     1195    }
    11821196
    11831197    if (!m_frame)
  • trunk/Source/WebCore/platform/ScrollView.h

    r84296 r84655  
    317317
    318318    void setScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updatePositionSynchronously);
    319     IntPoint scrollOrigin() { return m_scrollOrigin; }
     319    IntPoint scrollOrigin() const { return m_scrollOrigin; }
    320320
    321321    // Subclassed by FrameView to check the writing-mode of the document.
Note: See TracChangeset for help on using the changeset viewer.