REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scroll...
authorxji@chromium.org <xji@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 23:22:37 +0000 (23:22 +0000)
committerxji@chromium.org <xji@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 23:22:37 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70395

Reviewed by Tony Chang.

Source/WebCore:

This patch fixes the problem in Mac and Chromium Mac.

The existing test fast/dom/rtl-scroll-to-leftmost-and-resize.html seems does not really work in Mac DRT
(the browswer window is not resized). It works in Chromium-Mac. And Chromium-Mac's code
is forked from Mac.

* platform/chromium/ScrollAnimatorChromiumMac.mm:
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):

LayoutTests:

The test still marks as FAIL in test_expectations because cg-mac might need rebase.

* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
* platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.mm

index b1e7c6ac75fbf620afc5a6c9c84759113143bd45..57e4cd3ac7f388c95ef26d40230b30d759f3d65c 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-18  Xiaomei Ji  <xji@chromium.org>
+
+        REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
+        https://bugs.webkit.org/show_bug.cgi?id=70395
+
+        Reviewed by Tony Chang.
+
+        The test still marks as FAIL in test_expectations because cg-mac might need rebase.
+
+        * platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png: Added.
+        * platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt: Added.
+
 2011-11-18  Martin Robinson  <mrobinson@igalia.com>
 
         REGRESSION (r99924): broke 2 pasteboard tests on GTK
diff --git a/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png b/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png
new file mode 100644 (file)
index 0000000..1c187be
Binary files /dev/null and b/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.png differ
diff --git a/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt b/LayoutTests/platform/chromium-mac/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt
new file mode 100644 (file)
index 0000000..fa39c40
--- /dev/null
@@ -0,0 +1,8 @@
+layer at (0,0) size 329x4018
+  RenderView at (0,0) size 329x573
+layer at (0,0) size 329x4018
+  RenderBlock {HTML} at (0,0) size 329x4018
+    RenderBody {BODY} at (8,8) size 313x4002
+      RenderBlock {DIV} at (-689,0) size 1002x4002 [border: (1px solid #FF0000)]
+        RenderText {#text} at (-491,1) size 1492x18
+          text run at (-491,1) width 1492: "BEGINddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddEND"
index 585d8d7b69262b15c5e384cc725a1c9283ee2236..e3bf909d66961c590c318ca6486e3bf8f38333f1 100644 (file)
@@ -1,3 +1,21 @@
+2011-11-18  Xiaomei Ji  <xji@chromium.org>
+
+        REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
+        https://bugs.webkit.org/show_bug.cgi?id=70395
+
+        Reviewed by Tony Chang.
+
+        This patch fixes the problem in Mac and Chromium Mac.
+   
+        The existing test fast/dom/rtl-scroll-to-leftmost-and-resize.html seems does not really work in Mac DRT
+        (the browswer window is not resized). It works in Chromium-Mac. And Chromium-Mac's code
+        is forked from Mac.
+
+        * platform/chromium/ScrollAnimatorChromiumMac.mm:
+        (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
+
 2011-11-18  Martin Robinson  <mrobinson@igalia.com>
 
         REGRESSION (r99924): broke 2 pasteboard tests on GTK
index ad18834b7f0bcb2cff85527e14364bcb497a8e9e..98c4f9d90e5a1065c9ef33acf488333310d060c9 100644 (file)
@@ -597,9 +597,6 @@ void ScrollAnimatorChromiumMac::immediateScrollToPoint(const FloatPoint& newPosi
 {
     FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
  
-    if (adjustedPosition.x() == m_currentPosX && adjustedPosition.y() == m_currentPosY)
-        return;
-    
     m_currentPosX = adjustedPosition.x();
     m_currentPosY = adjustedPosition.y();
     notifyPositionChanged();
index 41d8c6864e612e5c2def8772a7a5de8d46421c9b..3b872fc59897c6be36fc51019a57dde8ae3fd75f 100644 (file)
@@ -668,9 +668,6 @@ void ScrollAnimatorMac::immediateScrollToPoint(const FloatPoint& newPosition)
 {
     FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
  
-    if (adjustedPosition.x() == m_currentPosX && adjustedPosition.y() == m_currentPosY)
-        return;
-    
     m_currentPosX = adjustedPosition.x();
     m_currentPosY = adjustedPosition.y();
     notifyPositionChanged();