Title: [117154] branches/safari-536-branch/Source/WebCore
Diff
Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog 2012-05-15 21:12:04 UTC (rev 117154)
@@ -1,5 +1,43 @@
2012-05-15 Lucas Forschler <[email protected]>
+ Merge 116830
+
+ 2012-05-11 Anders Carlsson <[email protected]>
+
+ Comcast website displays bottom of page when loaded
+ https://bugs.webkit.org/show_bug.cgi?id=86277
+ <rdar://problem/11426887>
+
+ Reviewed by Beth Dakin.
+
+ There were two bugs here. The first bug was that FrameView::setScrollPosition didn't end up calling into the scrolling coordinator
+ to update the scroll position. The second bug was that ScrollingTreeNodeMac::setScrollPosition didn't constrain the scroll position
+ to the edge of the page.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setScrollPosition):
+ Call requestScrollPositionUpdate.
+
+ * page/scrolling/ScrollingTree.cpp:
+ * page/scrolling/ScrollingTree.h:
+ Remove setMainFrameScrollPosition, it is not called by anyone.
+
+ * page/scrolling/mac/ScrollingTreeNodeMac.h:
+ * page/scrolling/mac/ScrollingTreeNodeMac.mm:
+ (WebCore::ScrollingTreeNodeMac::setScrollPosition):
+ Clamp to the page size and call setScrollPositionWithoutContentEdgeConstraints.
+
+ (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
+ Update the scroll layer position and call back to the main thread.
+
+ (WebCore::ScrollingTreeNodeMac::scrollBy):
+ Call setScrollPosition.
+
+ (WebCore::ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints):
+ Call setScrollPositionWithoutContentEdgeConstraints.
+
+2012-05-15 Lucas Forschler <[email protected]>
+
Merge 116824
2012-05-11 Anders Carlsson <[email protected]>
Modified: branches/safari-536-branch/Source/WebCore/page/FrameView.cpp (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/page/FrameView.cpp 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/page/FrameView.cpp 2012-05-15 21:12:04 UTC (rev 117154)
@@ -1704,6 +1704,10 @@
{
TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true);
m_maintainScrollPositionAnchor = 0;
+
+ if (requestScrollPositionUpdate(scrollPoint))
+ return;
+
ScrollView::setScrollPosition(scrollPoint);
}
Modified: branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp 2012-05-15 21:12:04 UTC (rev 117154)
@@ -97,13 +97,6 @@
m_rootNode->handleWheelEvent(wheelEvent);
}
-void ScrollingTree::setMainFrameScrollPosition(const IntPoint& scrollPosition)
-{
- ASSERT(ScrollingThread::isCurrentThread());
-
- m_rootNode->setScrollPosition(scrollPosition);
-}
-
static void derefScrollingCoordinator(ScrollingCoordinator* scrollingCoordinator)
{
ASSERT(isMainThread());
Modified: branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.h (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.h 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/page/scrolling/ScrollingTree.h 2012-05-15 21:12:04 UTC (rev 117154)
@@ -75,8 +75,6 @@
// Must be called from the scrolling thread. Handles the wheel event.
void handleWheelEvent(const PlatformWheelEvent&);
- void setMainFrameScrollPosition(const IntPoint&);
-
void invalidate();
void commitNewTreeState(PassOwnPtr<ScrollingTreeState>);
Modified: branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h 2012-05-15 21:12:04 UTC (rev 117154)
@@ -45,7 +45,6 @@
// ScrollingTreeNode member functions.
virtual void update(ScrollingTreeState*) OVERRIDE;
virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE;
- virtual void setScrollPosition(const IntPoint&) OVERRIDE;
// ScrollElasticityController member functions.
virtual bool allowsHorizontalStretching() OVERRIDE;
@@ -62,6 +61,9 @@
virtual void stopSnapRubberbandTimer() OVERRIDE;
IntPoint scrollPosition() const;
+ void setScrollPosition(const IntPoint&);
+ void setScrollPositionWithoutContentEdgeConstraints(const IntPoint&);
+
void setScrollLayerPosition(const IntPoint&);
IntPoint minimumScrollPosition() const;
Modified: branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm (117153 => 117154)
--- branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm 2012-05-15 21:10:13 UTC (rev 117153)
+++ branches/safari-536-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm 2012-05-15 21:12:04 UTC (rev 117154)
@@ -85,20 +85,6 @@
scrollingTree()->handleWheelEventPhase(wheelEvent.phase());
}
-void ScrollingTreeNodeMac::setScrollPosition(const IntPoint& scrollPosition)
-{
- updateMainFramePinState(scrollPosition);
-
- if (shouldUpdateScrollLayerPositionOnMainThread()) {
- m_probableMainThreadScrollPosition = scrollPosition;
- scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition);
- return;
- }
-
- setScrollLayerPosition(scrollPosition);
- scrollingTree()->updateMainFrameScrollPosition(scrollPosition);
-}
-
bool ScrollingTreeNodeMac::allowsHorizontalStretching()
{
switch (horizontalScrollElasticity()) {
@@ -240,6 +226,29 @@
return IntPoint(-scrollLayerPosition.x + scrollOrigin().x(), -scrollLayerPosition.y + scrollOrigin().y());
}
+void ScrollingTreeNodeMac::setScrollPosition(const IntPoint& scrollPosition)
+{
+ IntPoint newScrollPosition = scrollPosition;
+ newScrollPosition = newScrollPosition.shrunkTo(maximumScrollPosition());
+ newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition());
+
+ setScrollPositionWithoutContentEdgeConstraints(newScrollPosition);
+}
+
+void ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints(const IntPoint& scrollPosition)
+{
+ updateMainFramePinState(scrollPosition);
+
+ if (shouldUpdateScrollLayerPositionOnMainThread()) {
+ m_probableMainThreadScrollPosition = scrollPosition;
+ scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition);
+ return;
+ }
+
+ setScrollLayerPosition(scrollPosition);
+ scrollingTree()->updateMainFrameScrollPosition(scrollPosition);
+}
+
void ScrollingTreeNodeMac::setScrollLayerPosition(const IntPoint& position)
{
ASSERT(!shouldUpdateScrollLayerPositionOnMainThread());
@@ -263,16 +272,12 @@
void ScrollingTreeNodeMac::scrollBy(const IntSize& offset)
{
- IntPoint newScrollPosition = scrollPosition() + offset;
- newScrollPosition = newScrollPosition.shrunkTo(maximumScrollPosition());
- newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition());
-
- setScrollPosition(newScrollPosition);
+ setScrollPosition(scrollPosition() + offset);
}
void ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints(const IntSize& offset)
{
- setScrollPosition(scrollPosition() + offset);
+ setScrollPositionWithoutContentEdgeConstraints(scrollPosition() + offset);
}
void ScrollingTreeNodeMac::updateMainFramePinState(const IntPoint& scrollPosition)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes