ScrollView::setFrameRect() calls contentsResized() even when the frame size is unchanged
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Mar 2012 22:42:44 +0000 (22:42 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Mar 2012 22:42:44 +0000 (22:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80047

Reviewed by Anders Carlsson.

* platform/ScrollView.cpp:
(WebCore::ScrollView::setFrameRect): Added a check that the new frame size differs from the
old one before calling contentsResized().

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

Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollView.cpp

index b1302788091ff90003ceee9fb2b8123f293f10ff..d93c93d9b1db0e09f02b24ae31c19d522ffa1db4 100644 (file)
@@ -1,3 +1,14 @@
+2012-03-01  Dan Bernstein  <mitz@apple.com>
+
+        ScrollView::setFrameRect() calls contentsResized() even when the frame size is unchanged
+        https://bugs.webkit.org/show_bug.cgi?id=80047
+
+        Reviewed by Anders Carlsson.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::setFrameRect): Added a check that the new frame size differs from the
+        old one before calling contentsResized().
+
 2012-03-01  James Robinson  <jamesr@chromium.org>
 
         [chromium] Move pageScaleDirty logic from LayerChromium to GraphicsLayerChromium
index 4d14805eff6232d4c63d0965cab639e2b4d70217..70c0d8a9afab9bfaecb14e6de11cc388f11cd76a 100644 (file)
@@ -844,8 +844,8 @@ void ScrollView::setFrameRect(const IntRect& newRect)
     frameRectsChanged();
 
     updateScrollbars(scrollOffset());
-    
-    if (!m_useFixedLayout)
+
+    if (!m_useFixedLayout && oldRect.size() != newRect.size())
         contentsResized();
 }