Title: [107438] trunk/Source/WebCore
- Revision
- 107438
- Author
- [email protected]
- Date
- 2012-02-10 14:01:16 -0800 (Fri, 10 Feb 2012)
Log Message
More ScrollableArea cleanup
https://bugs.webkit.org/show_bug.cgi?id=78383
Reviewed by Beth Dakin.
Get rid of setScrollOriginX and setScrollOriginY. Make ScrollableArea::setScrollOrigin private.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::setScrollOrigin):
* platform/ScrollableArea.h:
(ScrollableArea):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107437 => 107438)
--- trunk/Source/WebCore/ChangeLog 2012-02-10 21:52:45 UTC (rev 107437)
+++ trunk/Source/WebCore/ChangeLog 2012-02-10 22:01:16 UTC (rev 107438)
@@ -1,3 +1,19 @@
+2012-02-10 Anders Carlsson <[email protected]>
+
+ More ScrollableArea cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=78383
+
+ Reviewed by Beth Dakin.
+
+ Get rid of setScrollOriginX and setScrollOriginY. Make ScrollableArea::setScrollOrigin private.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars):
+ * platform/ScrollableArea.cpp:
+ (WebCore::ScrollableArea::setScrollOrigin):
+ * platform/ScrollableArea.h:
+ (ScrollableArea):
+
2012-02-10 Kentaro Hara <[email protected]>
Rename [JSCustomPrototypePutDelegate] to [JSCustomNamedGetterOnPrototype]
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (107437 => 107438)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2012-02-10 21:52:45 UTC (rev 107437)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2012-02-10 22:01:16 UTC (rev 107438)
@@ -500,7 +500,7 @@
if (hasHorizontalScrollbar != newHasHorizontalScrollbar && (hasHorizontalScrollbar || !avoidScrollbarCreation())) {
if (scrollOrigin().y() && !newHasHorizontalScrollbar)
- setScrollOriginY(scrollOrigin().y() - m_horizontalScrollbar->height());
+ ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x(), scrollOrigin().y() - m_horizontalScrollbar->height()));
if (m_horizontalScrollbar)
m_horizontalScrollbar->invalidate();
setHasHorizontalScrollbar(newHasHorizontalScrollbar);
@@ -509,7 +509,7 @@
if (hasVerticalScrollbar != newHasVerticalScrollbar && (hasVerticalScrollbar || !avoidScrollbarCreation())) {
if (scrollOrigin().x() && !newHasVerticalScrollbar)
- setScrollOriginX(scrollOrigin().x() - m_verticalScrollbar->width());
+ ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x() - m_verticalScrollbar->width(), scrollOrigin().y()));
if (m_verticalScrollbar)
m_verticalScrollbar->invalidate();
setHasVerticalScrollbar(newHasVerticalScrollbar);
Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (107437 => 107438)
--- trunk/Source/WebCore/platform/ScrollableArea.cpp 2012-02-10 21:52:45 UTC (rev 107437)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp 2012-02-10 22:01:16 UTC (rev 107438)
@@ -71,23 +71,7 @@
m_scrollOriginChanged = true;
}
}
-
-void ScrollableArea::setScrollOriginX(int x)
-{
- if (m_scrollOrigin.x() != x) {
- m_scrollOrigin.setX(x);
- m_scrollOriginChanged = true;
- }
-}
-void ScrollableArea::setScrollOriginY(int y)
-{
- if (m_scrollOrigin.y() != y) {
- m_scrollOrigin.setY(y);
- m_scrollOriginChanged = true;
- }
-}
-
bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier)
{
ScrollbarOrientation orientation;
Modified: trunk/Source/WebCore/platform/ScrollableArea.h (107437 => 107438)
--- trunk/Source/WebCore/platform/ScrollableArea.h 2012-02-10 21:52:45 UTC (rev 107437)
+++ trunk/Source/WebCore/platform/ScrollableArea.h 2012-02-10 22:01:16 UTC (rev 107438)
@@ -102,10 +102,6 @@
void invalidateScrollCorner(const IntRect&);
virtual void getTickmarks(Vector<IntRect>&) const { }
- // This function should be overriden by subclasses to perform the actual
- // scroll of the content.
- virtual void setScrollOffset(const IntPoint&) = 0;
-
// Convert points and rects between the scrollbar and its containing view.
// The client needs to implement these in order to be aware of layout effects
// like CSS transforms.
@@ -172,8 +168,6 @@
virtual ~ScrollableArea();
void setScrollOrigin(const IntPoint&);
- void setScrollOriginX(int);
- void setScrollOriginY(int);
void resetScrollOriginChanged() { m_scrollOriginChanged = false; }
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) = 0;
@@ -196,6 +190,10 @@
friend class ScrollAnimator;
void setScrollOffsetFromAnimation(const IntPoint&);
+ // This function should be overriden by subclasses to perform the actual
+ // scroll of the content.
+ virtual void setScrollOffset(const IntPoint&) = 0;
+
mutable OwnPtr<ScrollAnimator> m_scrollAnimator;
bool m_constrainsScrollingToContentEdge : 1;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes