https://bugs.webkit.org/show_bug.cgi?id=50360
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2010 00:56:25 +0000 (00:56 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2010 00:56:25 +0000 (00:56 +0000)
Reviewed by James Robinson.

Make sure to include the origin adjustment code that I added on Mac to keep truncation-rtl.html passing.

* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/ScrollView.cpp

index 56fa81d..5d42cdb 100644 (file)
@@ -1,5 +1,16 @@
 2010-12-01  David Hyatt  <hyatt@apple.com>
 
+        Reviewed by James Robinson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50360
+        
+        Make sure to include the origin adjustment code that I added on Mac to keep truncation-rtl.html passing.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::updateScrollbars):
+
+2010-12-01  David Hyatt  <hyatt@apple.com>
+
         Reviewed by Dan Bernstein.
 
         https://bugs.webkit.org/show_bug.cgi?id=46645
index 424c4d7..ab9ee8a 100644 (file)
@@ -451,11 +451,15 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
             newHasHorizontalScrollbar = false;
 
         if (hasHorizontalScrollbar != newHasHorizontalScrollbar) {
+            if (m_scrollOrigin.y() && !newHasHorizontalScrollbar)
+                m_scrollOrigin.setY(m_scrollOrigin.y() - m_horizontalScrollbar->height());
             setHasHorizontalScrollbar(newHasHorizontalScrollbar);
             sendContentResizedNotification = true;
         }
 
         if (hasVerticalScrollbar != newHasVerticalScrollbar) {
+            if (m_scrollOrigin.x() && !newHasVerticalScrollbar)
+                m_scrollOrigin.setX(m_scrollOrigin.x() - m_verticalScrollbar->width());
             setHasVerticalScrollbar(newHasVerticalScrollbar);
             sendContentResizedNotification = true;
         }