Title: [111102] trunk/Source/WebCore
- Revision
- 111102
- Author
- [email protected]
- Date
- 2012-03-16 18:21:14 -0700 (Fri, 16 Mar 2012)
Log Message
REGRESSION (r110737): Height element changes on scrolled page causes failure
https://bugs.webkit.org/show_bug.cgi?id=81381
<rdar://problem/11066006>
Reviewed by Sam Weinig.
Limit the fix made in r110737 to check if there's a rubber-band gesture in progress and only ignore the range if that is the case.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::isRubberBandInProgress):
(ScrollAnimator):
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::isRubberBandInProgress):
(WebCore):
* platform/mac/ScrollElasticityController.h:
(ScrollElasticityController):
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::isRubberBandInProgress):
(WebCore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111101 => 111102)
--- trunk/Source/WebCore/ChangeLog 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/ChangeLog 2012-03-17 01:21:14 UTC (rev 111102)
@@ -1,3 +1,29 @@
+2012-03-16 Anders Carlsson <[email protected]>
+
+ REGRESSION (r110737): Height element changes on scrolled page causes failure
+ https://bugs.webkit.org/show_bug.cgi?id=81381
+ <rdar://problem/11066006>
+
+ Reviewed by Sam Weinig.
+
+ Limit the fix made in r110737 to check if there's a rubber-band gesture in progress and only ignore the range if that is the case.
+
+ * platform/ScrollAnimator.h:
+ (WebCore::ScrollAnimator::isRubberBandInProgress):
+ (ScrollAnimator):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+ * platform/mac/ScrollAnimatorMac.h:
+ (ScrollAnimatorMac):
+ * platform/mac/ScrollAnimatorMac.mm:
+ (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
+ (WebCore):
+ * platform/mac/ScrollElasticityController.h:
+ (ScrollElasticityController):
+ * platform/mac/ScrollElasticityController.mm:
+ (WebCore::ScrollElasticityController::isRubberBandInProgress):
+ (WebCore):
+
2012-03-16 Robert Kroeger <[email protected]>
GestureTapDown needs to pin in-progress flings
Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (111101 => 111102)
--- trunk/Source/WebCore/platform/ScrollAnimator.h 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h 2012-03-17 01:21:14 UTC (rev 111102)
@@ -92,6 +92,8 @@
virtual void notifyContentAreaScrolled() { }
+ virtual bool isRubberBandInProgress() const { return false; }
+
protected:
ScrollAnimator(ScrollableArea*);
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (111101 => 111102)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2012-03-17 01:21:14 UTC (rev 111102)
@@ -591,7 +591,8 @@
}
IntPoint adjustedScrollPosition = IntPoint(desiredOffset);
- if (overhangAmount().isZero())
+
+ if (!scrollAnimator()->isRubberBandInProgress())
adjustedScrollPosition = adjustScrollPositionWithinRange(adjustedScrollPosition);
if (adjustedScrollPosition != scrollPosition() || scrollOriginChanged()) {
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h (111101 => 111102)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2012-03-17 01:21:14 UTC (rev 111102)
@@ -120,6 +120,8 @@
void immediateScrollTo(const FloatPoint&);
+ virtual bool isRubberBandInProgress() const OVERRIDE;
+
#if ENABLE(RUBBER_BANDING)
/// ScrollElasticityControllerClient member functions.
virtual IntSize stretchAmount() OVERRIDE;
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (111101 => 111102)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2012-03-17 01:21:14 UTC (rev 111102)
@@ -645,6 +645,15 @@
notifyPositionChanged();
}
+bool ScrollAnimatorMac::isRubberBandInProgress() const
+{
+#if !ENABLE(RUBBER_BANDING)
+ return false;
+#else
+ return m_scrollElasticityController.isRubberBandInProgress();
+#endif
+}
+
void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition)
{
ASSERT(m_scrollAnimationHelper);
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.h (111101 => 111102)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.h 2012-03-17 01:21:14 UTC (rev 111102)
@@ -68,6 +68,8 @@
bool handleWheelEvent(const PlatformWheelEvent&);
void snapRubberBandTimerFired();
+ bool isRubberBandInProgress() const;
+
private:
void stopSnapRubberbandTimer();
void snapRubberBand();
Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (111101 => 111102)
--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-03-17 00:52:17 UTC (rev 111101)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm 2012-03-17 01:21:14 UTC (rev 111102)
@@ -367,6 +367,14 @@
}
}
+bool ScrollElasticityController::isRubberBandInProgress() const
+{
+ if (!m_inScrollGesture && !m_momentumScrollInProgress && !m_snapRubberbandTimerIsActive)
+ return false;
+
+ return !m_client->stretchAmount().isZero();
+}
+
void ScrollElasticityController::stopSnapRubberbandTimer()
{
m_client->stopSnapRubberbandTimer();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes