Diff
Modified: trunk/Source/WebKit2/ChangeLog (198525 => 198526)
--- trunk/Source/WebKit2/ChangeLog 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/ChangeLog 2016-03-22 13:22:37 UTC (rev 198526)
@@ -1,3 +1,42 @@
+2016-03-22 Carlos Garcia Campos <[email protected]>
+
+ Remove unused display and scroll view methods from PageClient and WebPageProxy
+ https://bugs.webkit.org/show_bug.cgi?id=155744
+
+ Reviewed by Andreas Kling.
+
+ We have displayView(), canScrollView() and scrollView() that are
+ used by DrawingAreaProxyImpl which is only used by GTK+ port that
+ doesn't implement those methods.
+
+ * UIProcess/API/gtk/PageClientImpl.cpp:
+ (WebKit::PageClientImpl::displayView): Deleted.
+ (WebKit::PageClientImpl::scrollView): Deleted.
+ * UIProcess/API/gtk/PageClientImpl.h:
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Update the
+ whole view when scrolling, or the damage area otherwise.
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::displayView): Deleted.
+ (WebKit::WebPageProxy::canScrollView): Deleted.
+ (WebKit::WebPageProxy::scrollView): Deleted.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/efl/WebView.cpp:
+ (WebKit::WebView::displayView): Deleted.
+ (WebKit::WebView::scrollView): Deleted.
+ * UIProcess/efl/WebView.h:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::displayView): Deleted.
+ (WebKit::PageClientImpl::canScrollView): Deleted.
+ (WebKit::PageClientImpl::scrollView): Deleted.
+ * UIProcess/mac/PageClientImpl.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::displayView): Deleted.
+ (WebKit::PageClientImpl::canScrollView): Deleted.
+ (WebKit::PageClientImpl::scrollView): Deleted.
+
2016-03-22 Zan Dobersek <[email protected]>
[CoordinatedGraphics] Polish std::function<> usage in ThreadedCompositor, CoordinatedGraphicsScene
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp 2016-03-22 13:22:37 UTC (rev 198526)
@@ -67,16 +67,6 @@
gtk_widget_queue_draw_area(m_viewWidget, rect.x(), rect.y(), rect.width(), rect.height());
}
-void PageClientImpl::displayView()
-{
- notImplemented();
-}
-
-void PageClientImpl::scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& /* scrollOffset */)
-{
- setViewNeedsDisplay(scrollRect);
-}
-
void PageClientImpl::requestScroll(const WebCore::FloatPoint&, const WebCore::IntPoint&, bool)
{
notImplemented();
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -56,9 +56,6 @@
// PageClient
std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
void setViewNeedsDisplay(const WebCore::IntRect&) override;
- void displayView() override;
- bool canScrollView() override { return false; }
- void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) override;
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll) override;
WebCore::IntSize viewSize() override;
bool isViewWindowActive() override;
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2016-03-22 13:22:37 UTC (rev 198526)
@@ -228,21 +228,11 @@
m_backingStore = std::make_unique<BackingStore>(updateInfo.viewSize, updateInfo.deviceScaleFactor, m_webPageProxy);
m_backingStore->incorporateUpdate(updateInfo);
-
- bool shouldScroll = !updateInfo.scrollRect.isEmpty();
-
- if (shouldScroll)
- m_webPageProxy.scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
-
- if (shouldScroll && !m_webPageProxy.canScrollView())
+ if (updateInfo.scrollRect.isEmpty()) {
+ for (const auto& rect : updateInfo.updateRects)
+ m_webPageProxy.setViewNeedsDisplay(rect);
+ } else
m_webPageProxy.setViewNeedsDisplay(IntRect(IntPoint(), m_webPageProxy.viewSize()));
- else {
- for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
- m_webPageProxy.setViewNeedsDisplay(updateInfo.updateRects[i]);
- }
-
- if (shouldScroll)
- m_webPageProxy.displayView();
}
void DrawingAreaProxyImpl::backingStoreStateDidChange(RespondImmediatelyOrNot respondImmediatelyOrNot)
Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/PageClient.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -96,13 +96,6 @@
// Tell the view to invalidate the given rect. The rect is in view coordinates.
virtual void setViewNeedsDisplay(const WebCore::IntRect&) = 0;
- // Tell the view to immediately display its invalid rect.
- virtual void displayView() = 0;
-
- // Return true if scrollView() can copy bits in the view.
- virtual bool canScrollView() = 0;
- // Tell the view to scroll scrollRect by scrollOffset.
- virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
// Tell the view to scroll to the given position, and whether this was a programmatic scroll.
virtual void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll) = 0;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-03-22 13:22:37 UTC (rev 198526)
@@ -1324,21 +1324,6 @@
m_pageClient.setViewNeedsDisplay(rect);
}
-void WebPageProxy::displayView()
-{
- m_pageClient.displayView();
-}
-
-bool WebPageProxy::canScrollView()
-{
- return m_pageClient.canScrollView();
-}
-
-void WebPageProxy::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
-{
- m_pageClient.scrollView(scrollRect, scrollOffset);
-}
-
void WebPageProxy::requestScroll(const FloatPoint& scrollPosition, const IntPoint& scrollOrigin, bool isProgrammaticScroll)
{
m_pageClient.requestScroll(scrollPosition, scrollOrigin, isProgrammaticScroll);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -414,9 +414,6 @@
void restoreSelectionInFocusedEditableElement();
void setViewNeedsDisplay(const WebCore::IntRect&);
- void displayView();
- bool canScrollView();
- void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset); // FIXME: CoordinatedGraphics should use requestScroll().
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll);
void setDelegatesScrolling(bool delegatesScrolling) { m_delegatesScrolling = delegatesScrolling; }
Modified: trunk/Source/WebKit2/UIProcess/efl/WebView.cpp (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/efl/WebView.cpp 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/efl/WebView.cpp 2016-03-22 13:22:37 UTC (rev 198526)
@@ -414,16 +414,6 @@
m_client.viewNeedsDisplay(this, area);
}
-void WebView::displayView()
-{
- notImplemented();
-}
-
-void WebView::scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize&)
-{
- setViewNeedsDisplay(scrollRect);
-}
-
void WebView::requestScroll(const WebCore::FloatPoint&, const WebCore::IntPoint&, bool)
{
notImplemented();
Modified: trunk/Source/WebKit2/UIProcess/efl/WebView.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/efl/WebView.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/efl/WebView.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -156,10 +156,6 @@
void setViewNeedsDisplay(const WebCore::IntRect&) override;
- void displayView() override;
-
- bool canScrollView() override { return false; }
- void scrollView(const WebCore::IntRect&, const WebCore::IntSize&) override;
void requestScroll(const WebCore::FloatPoint&, const WebCore::IntPoint&, bool) override;
WebCore::IntSize viewSize() override;
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -51,9 +51,6 @@
// PageClient
std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
void setViewNeedsDisplay(const WebCore::IntRect&) override;
- void displayView() override;
- bool canScrollView() override;
- void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) override;
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll) override;
WebCore::IntSize viewSize() override;
bool isViewWindowActive() override;
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2016-03-22 13:22:37 UTC (rev 198526)
@@ -128,22 +128,6 @@
ASSERT_NOT_REACHED();
}
-void PageClientImpl::displayView()
-{
- ASSERT_NOT_REACHED();
-}
-
-bool PageClientImpl::canScrollView()
-{
- notImplemented();
- return false;
-}
-
-void PageClientImpl::scrollView(const IntRect&, const IntSize&)
-{
- ASSERT_NOT_REACHED();
-}
-
void PageClientImpl::requestScroll(const FloatPoint& scrollPosition, const IntPoint& scrollOrigin, bool isProgrammaticScroll)
{
UNUSED_PARAM(isProgrammaticScroll);
Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h 2016-03-22 13:22:37 UTC (rev 198526)
@@ -63,9 +63,6 @@
// PageClient
std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy() override;
void setViewNeedsDisplay(const WebCore::IntRect&) override;
- void displayView() override;
- bool canScrollView() override;
- void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) override;
void requestScroll(const WebCore::FloatPoint& scrollPosition, const WebCore::IntPoint& scrollOrigin, bool isProgrammaticScroll) override;
WebCore::IntSize viewSize() override;
Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (198525 => 198526)
--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2016-03-22 09:44:47 UTC (rev 198525)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2016-03-22 13:22:37 UTC (rev 198526)
@@ -120,21 +120,6 @@
ASSERT_NOT_REACHED();
}
-void PageClientImpl::displayView()
-{
- ASSERT_NOT_REACHED();
-}
-
-bool PageClientImpl::canScrollView()
-{
- return false;
-}
-
-void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
-{
- ASSERT_NOT_REACHED();
-}
-
void PageClientImpl::requestScroll(const FloatPoint& scrollPosition, const IntPoint& scrollOrigin, bool isProgrammaticScroll)
{
ASSERT_NOT_REACHED();