Title: [90058] trunk/Source/WebCore
- Revision
- 90058
- Author
- [email protected]
- Date
- 2011-06-29 15:53:15 -0700 (Wed, 29 Jun 2011)
Log Message
2011-06-29 Anders Carlsson <[email protected]>
Reviewed by Simon Fraser.
RenderLayer::maximumScrollPosition() is wrong
https://bugs.webkit.org/show_bug.cgi?id=62667
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition):
(WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition):
Add these for good measure; they will be needed in an upcoming patch.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::maximumScrollPosition):
Subtract the visible content rect, including the scroll bars.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (90057 => 90058)
--- trunk/Source/WebCore/ChangeLog 2011-06-29 22:52:10 UTC (rev 90057)
+++ trunk/Source/WebCore/ChangeLog 2011-06-29 22:53:15 UTC (rev 90058)
@@ -1,3 +1,19 @@
+2011-06-29 Anders Carlsson <[email protected]>
+
+ Reviewed by Simon Fraser.
+
+ RenderLayer::maximumScrollPosition() is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=62667
+
+ * platform/ScrollableArea.h:
+ (WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition):
+ (WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition):
+ Add these for good measure; they will be needed in an upcoming patch.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::maximumScrollPosition):
+ Subtract the visible content rect, including the scroll bars.
+
2011-06-29 Brent Fulgham <[email protected]>
Speculative WinCE build correction after r90053.
Modified: trunk/Source/WebCore/platform/ScrollableArea.h (90057 => 90058)
--- trunk/Source/WebCore/platform/ScrollableArea.h 2011-06-29 22:52:10 UTC (rev 90057)
+++ trunk/Source/WebCore/platform/ScrollableArea.h 2011-06-29 22:53:15 UTC (rev 90058)
@@ -141,7 +141,9 @@
bool isHorizontalScrollerPinnedToMinimumPosition() const { return !horizontalScrollbar() || scrollPosition(horizontalScrollbar()) <= minimumScrollPosition().x(); }
bool isHorizontalScrollerPinnedToMaximumPosition() const { return !horizontalScrollbar() || scrollPosition(horizontalScrollbar()) >= maximumScrollPosition().x(); }
-
+ bool isVerticalScrollerPinnedToMinimumPosition() const { return !verticalScrollbar() || scrollPosition(verticalScrollbar()) <= minimumScrollPosition().y(); }
+ bool isVerticalScrollerPinnedToMaximumPosition() const { return !verticalScrollbar() || scrollPosition(verticalScrollbar()) >= maximumScrollPosition().y(); }
+
virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; }
virtual void disconnectFromPage() { }
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (90057 => 90058)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-06-29 22:52:10 UTC (rev 90057)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2011-06-29 22:53:15 UTC (rev 90058)
@@ -1653,7 +1653,7 @@
IntPoint RenderLayer::maximumScrollPosition() const
{
// FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
- return m_scrollOrigin + m_scrollSize;
+ return m_scrollOrigin + m_scrollSize - visibleContentRect(true).size();
}
IntRect RenderLayer::visibleContentRect(bool includeScrollbars) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes