Title: [173484] trunk/Source/WebCore
- Revision
- 173484
- Author
- [email protected]
- Date
- 2014-09-10 13:40:29 -0700 (Wed, 10 Sep 2014)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=136650
Rubber-banding in the DOM view of the WebInspector is really jumpy
-and corresponding-
rdar://problem/18166043
Reviewed by Darin Adler.
This patch implements the ScrollableArea virtual function isRubberBandInProgress()
for RenderLayer, and then uses that to determine whether to clamp the scroll
position in updateScrollInfoAfterLayout().
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isRubberBandInProgress):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173483 => 173484)
--- trunk/Source/WebCore/ChangeLog 2014-09-10 20:34:48 UTC (rev 173483)
+++ trunk/Source/WebCore/ChangeLog 2014-09-10 20:40:29 UTC (rev 173484)
@@ -1,3 +1,20 @@
+2014-09-10 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=136650
+ Rubber-banding in the DOM view of the WebInspector is really jumpy
+ -and corresponding-
+ rdar://problem/18166043
+
+ Reviewed by Darin Adler.
+
+ This patch implements the ScrollableArea virtual function isRubberBandInProgress()
+ for RenderLayer, and then uses that to determine whether to clamp the scroll
+ position in updateScrollInfoAfterLayout().
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::isRubberBandInProgress):
+ (WebCore::RenderLayer::updateScrollInfoAfterLayout):
+ * rendering/RenderLayer.h:
+
2014-09-10 Tim Horton <[email protected]>
Remove a workaround in frameIsCompleteAtIndex for a problem that was fixed in Lion
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (173483 => 173484)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-09-10 20:34:48 UTC (rev 173483)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-09-10 20:40:29 UTC (rev 173484)
@@ -1384,6 +1384,19 @@
return renderer().absoluteBoundingBoxRect();
}
+bool RenderLayer::isRubberBandInProgress() const
+{
+#if ENABLE(RUBBER_BANDING)
+ if (!scrollsOverflow())
+ return false;
+
+ if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
+ return scrollAnimator->isRubberBandInProgress();
+#endif
+
+ return false;
+}
+
bool RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
{
Page* page = renderer().frame().page();
@@ -3324,7 +3337,7 @@
computeScrollDimensions();
- if (box->style().overflowX() != OMARQUEE) {
+ if (box->style().overflowX() != OMARQUEE && !isRubberBandInProgress()) {
// Layout may cause us to be at an invalid scroll position. In this case we need
// to pull our scroll offsets back to the max (or push them up to the min).
IntSize clampedScrollOffset = clampScrollOffset(scrollOffset());
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (173483 => 173484)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2014-09-10 20:34:48 UTC (rev 173483)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2014-09-10 20:40:29 UTC (rev 173484)
@@ -1075,6 +1075,7 @@
virtual bool isHandlingWheelEvent() const override;
virtual bool shouldSuspendScrollAnimations() const override;
virtual IntRect scrollableAreaBoundingBox() const override;
+ virtual bool isRubberBandInProgress() const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes