Diff
Modified: trunk/Source/WebCore/ChangeLog (103420 => 103421)
--- trunk/Source/WebCore/ChangeLog 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/ChangeLog 2011-12-21 19:41:12 UTC (rev 103421)
@@ -1,5 +1,29 @@
2011-12-21 Anders Carlsson <[email protected]>
+ Get rid of ScrollableAreaClient
+ https://bugs.webkit.org/show_bug.cgi?id=75021
+
+ Reviewed by Sam Weinig.
+
+ The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and
+ ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects
+ all the different responsibilities it currently has.
+
+ * WebCore.exp.in:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ * page/ScrollingCoordinator.cpp:
+ * page/ScrollingCoordinator.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::ScrollView):
+ * platform/ScrollView.h:
+ * platform/ScrollableArea.cpp:
+ (WebCore::ScrollableArea::ScrollableArea):
+ * platform/ScrollableArea.h:
+ * platform/ScrollableAreaClient.h: Removed.
+
+2011-12-21 Anders Carlsson <[email protected]>
+
Don't recreate scrollbar layers whenever the frame view size changes
https://bugs.webkit.org/show_bug.cgi?id=75018
Modified: trunk/Source/WebCore/WebCore.exp.in (103420 => 103421)
--- trunk/Source/WebCore/WebCore.exp.in 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-12-21 19:41:12 UTC (rev 103421)
@@ -379,7 +379,7 @@
__ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE
__ZN7WebCore14ScrollableArea29willRemoveHorizontalScrollbarEPNS_9ScrollbarE
__ZN7WebCore14ScrollableArea6scrollENS_15ScrollDirectionENS_17ScrollGranularityEf
-__ZN7WebCore14ScrollableAreaC2EPNS_20ScrollableAreaClientE
+__ZN7WebCore14ScrollableAreaC2Ev
__ZN7WebCore14ScrollableAreaD2Ev
__ZN7WebCore14ScrollbarTheme5themeEv
__ZN7WebCore14SecurityOrigin12isolatedCopyEv
Modified: trunk/Source/WebCore/page/FrameView.cpp (103420 => 103421)
--- trunk/Source/WebCore/page/FrameView.cpp 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/page/FrameView.cpp 2011-12-21 19:41:12 UTC (rev 103421)
@@ -124,23 +124,8 @@
return view->frame() ? view->frame()->contentRenderer() : 0;
}
-static inline ScrollableAreaClient* scrollableAreaClient(Frame* frame)
-{
-#if ENABLE(THREADED_SCROLLING)
- if (Page* page = frame ? frame->page() : 0) {
- if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
- return scrollingCoordinator->scrollableAreaClientForFrame(frame);
- }
-#else
- UNUSED_PARAM(frame);
-#endif
-
- return 0;
-}
-
FrameView::FrameView(Frame* frame)
- : ScrollView(scrollableAreaClient(frame))
- , m_frame(frame)
+ : m_frame(frame)
, m_canHaveScrollbars(true)
, m_slowRepaintObjectCount(0)
, m_fixedObjectCount(0)
Modified: trunk/Source/WebCore/page/ScrollingCoordinator.cpp (103420 => 103421)
--- trunk/Source/WebCore/page/ScrollingCoordinator.cpp 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.cpp 2011-12-21 19:41:12 UTC (rev 103421)
@@ -56,12 +56,6 @@
ASSERT(!m_page);
}
-ScrollableAreaClient* ScrollingCoordinator::scrollableAreaClientForFrame(Frame*)
-{
- // FIXME: Implement.
- return 0;
-}
-
void ScrollingCoordinator::pageDestroyed()
{
ASSERT(m_page);
Modified: trunk/Source/WebCore/page/ScrollingCoordinator.h (103420 => 103421)
--- trunk/Source/WebCore/page/ScrollingCoordinator.h 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.h 2011-12-21 19:41:12 UTC (rev 103421)
@@ -44,7 +44,6 @@
class GraphicsLayer;
class Page;
class PlatformWheelEvent;
-class ScrollableAreaClient;
#if ENABLE(GESTURE_EVENTS)
class PlatformGestureEvent;
@@ -57,9 +56,6 @@
void pageDestroyed();
- // Return a scrollable area client for the given frame.
- ScrollableAreaClient* scrollableAreaClientForFrame(Frame*);
-
// Should be called whenever the scroll layer for the given frame changes.
void setFrameScrollLayer(Frame*, const GraphicsLayer* scrollLayer);
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (103420 => 103421)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2011-12-21 19:41:12 UTC (rev 103421)
@@ -41,9 +41,8 @@
namespace WebCore {
-ScrollView::ScrollView(ScrollableAreaClient *client)
- : ScrollableArea(client)
- , m_horizontalScrollbarMode(ScrollbarAuto)
+ScrollView::ScrollView()
+ : m_horizontalScrollbarMode(ScrollbarAuto)
, m_verticalScrollbarMode(ScrollbarAuto)
, m_horizontalScrollbarLock(false)
, m_verticalScrollbarLock(false)
Modified: trunk/Source/WebCore/platform/ScrollView.h (103420 => 103421)
--- trunk/Source/WebCore/platform/ScrollView.h 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/platform/ScrollView.h 2011-12-21 19:41:12 UTC (rev 103421)
@@ -293,7 +293,7 @@
void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRect);
protected:
- ScrollView(ScrollableAreaClient* = 0);
+ ScrollView();
virtual void repaintContentRectangle(const IntRect&, bool now = false);
virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (103420 => 103421)
--- trunk/Source/WebCore/platform/ScrollableArea.cpp 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp 2011-12-21 19:41:12 UTC (rev 103421)
@@ -42,16 +42,14 @@
namespace WebCore {
-ScrollableArea::ScrollableArea(ScrollableAreaClient* client)
- : m_client(client)
- , m_constrainsScrollingToContentEdge(true)
+ScrollableArea::ScrollableArea()
+ : m_constrainsScrollingToContentEdge(true)
, m_inLiveResize(false)
, m_verticalScrollElasticity(ScrollElasticityNone)
, m_horizontalScrollElasticity(ScrollElasticityNone)
, m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault)
, m_scrollOriginChanged(false)
{
- // FIXME: If no client was supplied, create a default one.
}
ScrollableArea::~ScrollableArea()
Modified: trunk/Source/WebCore/platform/ScrollableArea.h (103420 => 103421)
--- trunk/Source/WebCore/platform/ScrollableArea.h 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/platform/ScrollableArea.h 2011-12-21 19:41:12 UTC (rev 103421)
@@ -36,7 +36,6 @@
class PlatformGestureEvent;
class PlatformWheelEvent;
class ScrollAnimator;
-class ScrollableAreaClient;
#if USE(ACCELERATED_COMPOSITING)
class GraphicsLayer;
#endif
@@ -175,7 +174,7 @@
void setScrollOffsetFromInternals(const IntPoint&);
protected:
- explicit ScrollableArea(ScrollableAreaClient* = 0);
+ ScrollableArea();
virtual ~ScrollableArea();
void setScrollOrigin(const IntPoint&);
@@ -199,8 +198,6 @@
bool hasLayerForScrollCorner() const;
private:
- ScrollableAreaClient* m_client;
-
// NOTE: Only called from the ScrollAnimator.
friend class ScrollAnimator;
void setScrollOffsetFromAnimation(const IntPoint&);
Deleted: trunk/Source/WebCore/platform/ScrollableAreaClient.h (103420 => 103421)
--- trunk/Source/WebCore/platform/ScrollableAreaClient.h 2011-12-21 19:32:10 UTC (rev 103420)
+++ trunk/Source/WebCore/platform/ScrollableAreaClient.h 2011-12-21 19:41:12 UTC (rev 103421)
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScrollableAreaClient_h
-#define ScrollableAreaClient_h
-
-namespace WebCore {
-
-class Scrollbar;
-
-class ScrollableAreaClient {
-public:
- virtual ~ScrollableAreaClient() { }
-
-protected:
- ScrollableAreaClient() { }
-};
-
-} // namespace WebCore
-
-#endif // ScrollableAreaClient_h