Title: [124714] trunk/Source/WebCore
Revision
124714
Author
[email protected]
Date
2012-08-04 22:55:05 -0700 (Sat, 04 Aug 2012)

Log Message

<rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube)
https://bugs.webkit.org/show_bug.cgi?id=91348

Reviewed by Andy Estes.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollPositionChanged): Changed to call notifyContentAreaScrolled()
only if the scroll position after the change differs from what it was before the change.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollPosition): Added an override of this ScrollableArea function.
* rendering/RenderListBox.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124713 => 124714)


--- trunk/Source/WebCore/ChangeLog	2012-08-05 03:23:50 UTC (rev 124713)
+++ trunk/Source/WebCore/ChangeLog	2012-08-05 05:55:05 UTC (rev 124714)
@@ -1,3 +1,17 @@
+2012-08-04  Dan Bernstein  <[email protected]>
+
+        <rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube)
+        https://bugs.webkit.org/show_bug.cgi?id=91348
+
+        Reviewed by Andy Estes.
+
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::scrollPositionChanged): Changed to call notifyContentAreaScrolled()
+        only if the scroll position after the change differs from what it was before the change.
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::scrollPosition): Added an override of this ScrollableArea function.
+        * rendering/RenderListBox.h:
+
 2012-08-04  Ami Fischman  <[email protected]>
 
         HTMLMediaElement may fire the seeked event before currentTime reaches the seek time

Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (124713 => 124714)


--- trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-08-05 03:23:50 UTC (rev 124713)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-08-05 05:55:05 UTC (rev 124714)
@@ -142,6 +142,7 @@
 
 void ScrollableArea::scrollPositionChanged(const IntPoint& position)
 {
+    IntPoint oldPosition = scrollPosition();
     // Tell the derived class to scroll its contents.
     setScrollOffset(position);
 
@@ -168,7 +169,8 @@
             verticalScrollbar->invalidate();
     }
 
-    scrollAnimator()->notifyContentAreaScrolled();
+    if (scrollPosition() != oldPosition)
+        scrollAnimator()->notifyContentAreaScrolled();
 }
 
 bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent)

Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (124713 => 124714)


--- trunk/Source/WebCore/rendering/RenderListBox.cpp	2012-08-05 03:23:50 UTC (rev 124713)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp	2012-08-05 05:55:05 UTC (rev 124714)
@@ -627,6 +627,11 @@
     scrollTo(offset.y());
 }
 
+IntPoint RenderListBox::scrollPosition() const
+{
+    return IntPoint(0, m_indexOffset);
+}
+
 void RenderListBox::scrollTo(int newOffset)
 {
     if (newOffset == m_indexOffset)

Modified: trunk/Source/WebCore/rendering/RenderListBox.h (124713 => 124714)


--- trunk/Source/WebCore/rendering/RenderListBox.h	2012-08-05 03:23:50 UTC (rev 124713)
+++ trunk/Source/WebCore/rendering/RenderListBox.h	2012-08-05 05:55:05 UTC (rev 124714)
@@ -100,6 +100,7 @@
     virtual int scrollSize(ScrollbarOrientation) const;
     virtual int scrollPosition(Scrollbar*) const;
     virtual void setScrollOffset(const IntPoint&);
+    virtual IntPoint scrollPosition() const OVERRIDE;
     virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
     virtual bool isActive() const;
     virtual bool isScrollCornerVisible() const { return false; } // We don't support resize on list boxes yet. If we did these would have to change.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to