Diff
Modified: trunk/Source/WebKit2/ChangeLog (160817 => 160818)
--- trunk/Source/WebKit2/ChangeLog 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/ChangeLog 2013-12-19 02:33:33 UTC (rev 160818)
@@ -1,3 +1,51 @@
+2013-12-18 Tim Horton <[email protected]>
+
+ WebKit2 View Gestures: Move WebProcess-side geometry collection into its own class
+ https://bugs.webkit.org/show_bug.cgi?id=125967
+
+ Reviewed by Anders Carlsson.
+
+ Move the messages dispatched by ViewGestureController that grab geometry
+ from the WebProcess out of the DrawingArea and into ViewGestureGeometryCollector.
+ This class will grow when smart magnification is implemented.
+
+ * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
+ * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ Remove BeginTransientZoom() message.
+
+ * DerivedSources.make:
+ * UIProcess/DrawingAreaProxy.h:
+
+ * UIProcess/mac/ViewGestureController.cpp:
+ (WebKit::ViewGestureController::didCollectGeometryForMagnificationGesture):
+ (WebKit::ViewGestureController::handleMagnificationGesture):
+ * UIProcess/mac/ViewGestureController.h:
+ * UIProcess/mac/ViewGestureController.messages.in:
+ Make use of ViewGestureGeometryCollector and rename didBeginTransientZoom to didCollectGeometryForMagnificationGesture.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add new files.
+
+ * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: Added.
+ (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
+ (WebKit::ViewGestureGeometryCollector::~ViewGestureGeometryCollector):
+ (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
+ * WebProcess/WebPage/ViewGestureGeometryCollector.h: Added.
+ * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in: Added.
+ Move the code to collect the visible content rect and return it to the ViewGestureController into its own class.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ * WebProcess/WebPage/WebPage.h:
+ Move m_pageID to the top of WebPage's initialization list so that
+ it can be safely used from other members' constructors.
+
+ Add a ViewGestureGeometryCollector member and construct it.
+
2013-12-18 Gustavo Noronha Silva <[email protected]>
Unreviewed cmake build fix for GTK+.
Modified: trunk/Source/WebKit2/DerivedSources.make (160817 => 160818)
--- trunk/Source/WebKit2/DerivedSources.make 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/DerivedSources.make 2013-12-19 02:33:33 UTC (rev 160818)
@@ -92,6 +92,7 @@
StorageAreaMap \
StorageManager \
ViewGestureController \
+ ViewGestureGeometryCollector \
WebApplicationCacheManager \
WebApplicationCacheManagerProxy \
WebConnection \
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -70,7 +70,6 @@
virtual void colorSpaceDidChange() { }
virtual void minimumLayoutSizeDidChange() { }
- virtual void beginTransientZoom() { }
virtual void adjustTransientZoom(double, WebCore::FloatPoint) { }
virtual void commitTransientZoom(double, WebCore::FloatPoint) { }
Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -50,7 +50,6 @@
virtual void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&) OVERRIDE;
virtual void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) OVERRIDE;
- virtual void beginTransientZoom() OVERRIDE;
virtual void adjustTransientZoom(double scale, WebCore::FloatPoint origin) OVERRIDE;
virtual void commitTransientZoom(double scale, WebCore::FloatPoint origin) OVERRIDE;
Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2013-12-19 02:33:33 UTC (rev 160818)
@@ -148,11 +148,6 @@
m_isWaitingForDidUpdateGeometry = true;
}
-void TiledCoreAnimationDrawingAreaProxy::beginTransientZoom()
-{
- m_webPageProxy->process().send(Messages::DrawingArea::BeginTransientZoom(), m_webPageProxy->pageID());
-}
-
void TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom(double scale, FloatPoint origin)
{
m_webPageProxy->process().send(Messages::DrawingArea::AdjustTransientZoom(scale, origin), m_webPageProxy->pageID());
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.cpp (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.cpp 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.cpp 2013-12-19 02:33:33 UTC (rev 160818)
@@ -27,6 +27,7 @@
#import "ViewGestureController.h"
#import "ViewGestureControllerMessages.h"
+#import "ViewGestureGeometryCollectorMessages.h"
#import "WebPageProxy.h"
#import "WebProcessProxy.h"
@@ -84,7 +85,7 @@
return scaledMagnificationOrigin;
}
-void ViewGestureController::didBeginTransientZoom(FloatRect visibleContentRect)
+void ViewGestureController::didCollectGeometryForMagnificationGesture(FloatRect visibleContentRect)
{
m_activeGestureType = ViewGestureType::Magnification;
m_visibleContentRect = visibleContentRect;
@@ -98,7 +99,8 @@
if (m_activeGestureType == ViewGestureType::None) {
// FIXME: We drop the first frame of the gesture on the floor, because we don't have the visible content bounds yet.
m_magnification = m_webPageProxy.pageScaleFactor();
- m_webPageProxy.drawingArea()->beginTransientZoom();
+ m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::CollectGeometryForMagnificationGesture(), m_webPageProxy.pageID());
+
return;
}
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -54,7 +54,7 @@
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
// Message handlers.
- void didBeginTransientZoom(WebCore::FloatRect visibleContentBounds);
+ void didCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds);
void endMagnificationGesture();
WebCore::FloatPoint scaledMagnificationOrigin(WebCore::FloatPoint origin, double scale);
Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in (160817 => 160818)
--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in 2013-12-19 02:33:33 UTC (rev 160818)
@@ -21,5 +21,5 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
messages -> ViewGestureController {
- DidBeginTransientZoom(WebCore::FloatRect visibleContentBounds)
+ DidCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds)
}
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (160817 => 160818)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2013-12-19 02:33:33 UTC (rev 160818)
@@ -382,6 +382,10 @@
2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */; };
2D47B56C1810714E003A3AEE /* RemoteLayerBackingStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */; };
2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */; };
+ 2D819B9D186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 2D819B9B186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in */; };
+ 2D819B9E18627EE9001F03D1 /* ViewGestureGeometryCollector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D819B99186275B3001F03D1 /* ViewGestureGeometryCollector.cpp */; };
+ 2D819BA11862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */; };
+ 2D819BA21862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */; };
2D870D1016234FFE000A3F20 /* PDFPlugin.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D870D0E1622B7F9000A3F20 /* PDFPlugin.mm */; };
2D8710161828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */; };
2D8710171828415D0018FA01 /* PlatformCALayerRemoteCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8710151828415D0018FA01 /* PlatformCALayerRemoteCustom.h */; };
@@ -1960,6 +1964,11 @@
2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPluginPasswordField.mm; path = PDF/PDFPluginPasswordField.mm; sourceTree = "<group>"; };
2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerBackingStore.mm; sourceTree = "<group>"; };
2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerBackingStore.h; sourceTree = "<group>"; };
+ 2D819B99186275B3001F03D1 /* ViewGestureGeometryCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewGestureGeometryCollector.cpp; sourceTree = "<group>"; };
+ 2D819B9A186275B3001F03D1 /* ViewGestureGeometryCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureGeometryCollector.h; sourceTree = "<group>"; };
+ 2D819B9B186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ViewGestureGeometryCollector.messages.in; sourceTree = "<group>"; };
+ 2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewGestureGeometryCollectorMessageReceiver.cpp; path = ViewGestureGeometryCollectorMessageReceiver.cpp; sourceTree = "<group>"; };
+ 2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewGestureGeometryCollectorMessages.h; path = ViewGestureGeometryCollectorMessages.h; sourceTree = "<group>"; };
2D870D0D1622B7F9000A3F20 /* PDFPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFPlugin.h; path = PDF/PDFPlugin.h; sourceTree = "<group>"; };
2D870D0E1622B7F9000A3F20 /* PDFPlugin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPlugin.mm; path = PDF/PDFPlugin.mm; sourceTree = "<group>"; };
2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformCALayerRemoteCustom.cpp; sourceTree = "<group>"; };
@@ -4509,6 +4518,9 @@
7CF47FF917275C57008ACB91 /* PageBanner.h */,
1A90C23612650717003E44D4 /* PageOverlay.cpp */,
1A90C23512650717003E44D4 /* PageOverlay.h */,
+ 2D819B99186275B3001F03D1 /* ViewGestureGeometryCollector.cpp */,
+ 2D819B9A186275B3001F03D1 /* ViewGestureGeometryCollector.h */,
+ 2D819B9B186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in */,
BC72B9F811E6476B001EB4EA /* WebBackForwardListProxy.cpp */,
BC72B9F911E6476B001EB4EA /* WebBackForwardListProxy.h */,
51871B59127CB89D00F76232 /* WebContextMenu.cpp */,
@@ -5485,6 +5497,8 @@
C0CE729D1247E71D00BC0EC4 /* Derived Sources */ = {
isa = PBXGroup;
children = (
+ 2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */,
+ 2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */,
512F58A012A883AD00629530 /* AuthenticationManagerMessageReceiver.cpp */,
512F58A112A883AD00629530 /* AuthenticationManagerMessages.h */,
E17AE2C216B9C63A001C42F1 /* com.apple.WebKit.NetworkProcess.sb */,
@@ -6026,6 +6040,7 @@
BCEE7D0E12846F69009827DA /* WebContextMessages.h in Headers */,
BCF4DE25168FA44800C94AFC /* WebContextSupplement.h in Headers */,
BCB0B0DC12305A2500B1341E /* WebContextUserMessageCoders.h in Headers */,
+ 2D819BA21862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h in Headers */,
330934501315B94D0097A7BC /* WebCookieManager.h in Headers */,
330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */,
330934561315B9750097A7BC /* WebCookieManagerProxy.h in Headers */,
@@ -6737,6 +6752,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 2D819B9D186275B3001F03D1 /* ViewGestureGeometryCollector.messages.in in Resources */,
E1D26A51175964D70095BFD1 /* WebContentProcess.xib in Resources */,
E133FD8A1423DD7F00FC7BFB /* WebKit.icns in Resources */,
);
@@ -7382,6 +7398,7 @@
51021E9C12B16788005C033C /* WebContextMenuClientMac.mm in Sources */,
512935D71288D19400A4B695 /* WebContextMenuItem.cpp in Sources */,
510FBB9A1288C95E00AFFDF4 /* WebContextMenuItemData.cpp in Sources */,
+ 2D819BA11862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp in Sources */,
51A84CE3127F386B00CA6EA4 /* WebContextMenuProxy.cpp in Sources */,
51ACBBA1127A8F2C00D203B9 /* WebContextMenuProxyMac.mm in Sources */,
BCEE7D0D12846F69009827DA /* WebContextMessageReceiver.cpp in Sources */,
@@ -7658,6 +7675,7 @@
512A9760180E031D0039A149 /* DatabaseProcessMessageReceiver.cpp in Sources */,
BC40760D124FF0270068F20A /* WKURLResponse.cpp in Sources */,
BC40762C124FF0400068F20A /* WKURLResponseNS.mm in Sources */,
+ 2D819B9E18627EE9001F03D1 /* ViewGestureGeometryCollector.cpp in Sources */,
F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */,
BC8699B6116AADAA002A925B /* WKView.mm in Sources */,
C5E1AFE816B20B67006CC1F2 /* WKWebArchive.cpp in Sources */,
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -127,7 +127,6 @@
virtual void setDeviceScaleFactor(float) { }
virtual void setColorSpace(const ColorSpaceData&) { }
- virtual void beginTransientZoom() { }
virtual void adjustTransientZoom(double scale, WebCore::FloatPoint origin) { }
virtual void commitTransientZoom(double scale, WebCore::FloatPoint origin) { }
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in 2013-12-19 02:33:33 UTC (rev 160818)
@@ -31,7 +31,6 @@
SetDeviceScaleFactor(float deviceScaleFactor)
SetColorSpace(WebKit::ColorSpaceData colorSpace)
- BeginTransientZoom()
AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
CommitTransientZoom(double scale, WebCore::FloatPoint origin)
#endif
Added: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (0 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp 2013-12-19 02:33:33 UTC (rev 160818)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 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.
+ */
+
+#include "config.h"
+#include "ViewGestureGeometryCollector.h"
+
+#include "ViewGestureControllerMessages.h"
+#include "ViewGestureGeometryCollectorMessages.h"
+#include "WebCoreArgumentCoders.h"
+#include "WebPage.h"
+#include "WebProcess.h"
+#include <WebCore/FrameView.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ViewGestureGeometryCollector::ViewGestureGeometryCollector(WebPage& webPage)
+ : m_webPage(webPage)
+{
+ WebProcess::shared().addMessageReceiver(Messages::ViewGestureGeometryCollector::messageReceiverName(), m_webPage.pageID(), *this);
+}
+
+ViewGestureGeometryCollector::~ViewGestureGeometryCollector()
+{
+ WebProcess::shared().removeMessageReceiver(Messages::ViewGestureGeometryCollector::messageReceiverName(), m_webPage.pageID());
+}
+
+void ViewGestureGeometryCollector::collectGeometryForMagnificationGesture()
+{
+ FloatRect visibleContentRect = m_webPage.mainFrameView()->visibleContentRect(ScrollableArea::IncludeScrollbars);
+ m_webPage.send(Messages::ViewGestureController::DidCollectGeometryForMagnificationGesture(visibleContentRect));
+}
+
+} // namespace WebKit
Added: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h (0 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 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 ViewGestureGeometryCollector_h
+#define ViewGestureGeometryCollector_h
+
+#include "MessageReceiver.h"
+
+namespace WebKit {
+
+class WebPage;
+
+class ViewGestureGeometryCollector : private CoreIPC::MessageReceiver {
+public:
+ ViewGestureGeometryCollector(WebPage&);
+ ~ViewGestureGeometryCollector();
+
+private:
+ // CoreIPC::MessageReceiver.
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
+
+ // Message handlers.
+ void collectGeometryForMagnificationGesture();
+
+ WebPage& m_webPage;
+};
+
+} // namespace WebKit
+
+#endif // ViewGestureGeometryCollector
Added: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in (0 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in 2013-12-19 02:33:33 UTC (rev 160818)
@@ -0,0 +1,27 @@
+# Copyright (C) 2013 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.
+
+messages -> ViewGestureGeometryCollector {
+
+CollectGeometryForMagnificationGesture()
+
+}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2013-12-19 02:33:33 UTC (rev 160818)
@@ -220,7 +220,8 @@
}
WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
- : m_viewSize(parameters.viewSize)
+ : m_pageID(pageID)
+ , m_viewSize(parameters.viewSize)
, m_hasSeenPlugin(false)
, m_useFixedLayout(false)
, m_drawsBackground(true)
@@ -245,6 +246,7 @@
, m_hasCachedWindowFrame(false)
, m_layerHostingMode(parameters.layerHostingMode)
, m_keyboardEventBeingInterpreted(0)
+ , m_viewGestureGeometryCollector(*this)
#elif PLATFORM(GTK)
, m_accessibilityObject(0)
#endif
@@ -257,7 +259,6 @@
#if ENABLE(GEOLOCATION)
, m_geolocationPermissionRequestManager(this)
#endif
- , m_pageID(pageID)
, m_canRunBeforeUnloadConfirmPanel(parameters.canRunBeforeUnloadConfirmPanel)
, m_canRunModal(parameters.canRunModal)
, m_isRunningModal(false)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -89,6 +89,7 @@
#if PLATFORM(MAC)
#include "DictionaryPopupInfo.h"
#include "LayerHostingContext.h"
+#include "ViewGestureGeometryCollector.h"
#include <wtf/RetainPtr.h>
OBJC_CLASS CALayer;
OBJC_CLASS NSDictionary;
@@ -859,6 +860,8 @@
void reportUsedFeatures();
+ uint64_t m_pageID;
+
OwnPtr<WebCore::Page> m_page;
RefPtr<WebFrame> m_mainFrame;
RefPtr<InjectedBundleBackForwardList> m_backForwardList;
@@ -932,6 +935,8 @@
WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
+ ViewGestureGeometryCollector m_viewGestureGeometryCollector;
+
#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
@@ -997,7 +1002,6 @@
#endif
SandboxExtensionTracker m_sandboxExtensionTracker;
- uint64_t m_pageID;
RefPtr<SandboxExtension> m_pendingDropSandboxExtension;
Vector<RefPtr<SandboxExtension>> m_pendingDropExtensionsForFileUpload;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2013-12-19 02:33:33 UTC (rev 160818)
@@ -104,7 +104,6 @@
virtual void setLayerHostingMode(uint32_t) OVERRIDE;
virtual void setColorSpace(const ColorSpaceData&) OVERRIDE;
- virtual void beginTransientZoom() OVERRIDE;
virtual void adjustTransientZoom(double scale, WebCore::FloatPoint origin) OVERRIDE;
virtual void commitTransientZoom(double scale, WebCore::FloatPoint origin) OVERRIDE;
void applyTransientZoomToPage(double scale, WebCore::FloatPoint origin);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (160817 => 160818)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2013-12-19 02:29:41 UTC (rev 160817)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2013-12-19 02:33:33 UTC (rev 160818)
@@ -701,12 +701,6 @@
return frameView && frameView->frame().isMainFrame();
}
-void TiledCoreAnimationDrawingArea::beginTransientZoom()
-{
- FloatRect visibleContentRect = m_webPage->mainFrameView()->visibleContentRect(ScrollableArea::IncludeScrollbars);
- m_webPage->send(Messages::ViewGestureController::DidBeginTransientZoom(visibleContentRect));
-}
-
void TiledCoreAnimationDrawingArea::adjustTransientZoom(double scale, FloatPoint origin)
{
// FIXME: Scrollbars should stay in-place and change height while zooming.