Diff
Modified: trunk/Source/WebKit2/ChangeLog (173162 => 173163)
--- trunk/Source/WebKit2/ChangeLog 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/ChangeLog 2014-09-01 23:04:12 UTC (rev 173163)
@@ -1,3 +1,52 @@
+2014-09-01 Tim Horton <[email protected]>
+
+ DrawingAreaProxy and friends can hold on to WebPageProxy by reference
+ https://bugs.webkit.org/show_bug.cgi?id=136440
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _createDrawingAreaProxy]):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::setExposedRect):
+ (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
+ * UIProcess/DrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
+ * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
+ * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
+ (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
+
2014-09-01 Gyuyoung Kim <[email protected]>
[CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2014-09-01 23:04:12 UTC (rev 173163)
@@ -2794,9 +2794,9 @@
- (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy
{
if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseRemoteLayerTreeDrawingArea"] boolValue])
- return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(_data->_page.get());
+ return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(*_data->_page);
- return std::make_unique<TiledCoreAnimationDrawingAreaProxy>(_data->_page.get());
+ return std::make_unique<TiledCoreAnimationDrawingAreaProxy>(*_data->_page);
}
- (BOOL)_isFocused
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp 2014-09-01 23:04:12 UTC (rev 173163)
@@ -35,20 +35,20 @@
namespace WebKit {
-DrawingAreaProxy::DrawingAreaProxy(DrawingAreaType type, WebPageProxy* webPageProxy)
+DrawingAreaProxy::DrawingAreaProxy(DrawingAreaType type, WebPageProxy& webPageProxy)
: m_type(type)
, m_webPageProxy(webPageProxy)
- , m_size(webPageProxy->viewSize())
+ , m_size(webPageProxy.viewSize())
#if PLATFORM(MAC)
, m_exposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::exposedRectChangedTimerFired)
#endif
{
- m_webPageProxy->process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy->pageID(), *this);
+ m_webPageProxy.process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
}
DrawingAreaProxy::~DrawingAreaProxy()
{
- m_webPageProxy->process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID());
+ m_webPageProxy.process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID());
}
void DrawingAreaProxy::setSize(const IntSize& size, const IntSize& layerPosition, const IntSize& scrollOffset)
@@ -65,7 +65,7 @@
#if PLATFORM(MAC)
void DrawingAreaProxy::setExposedRect(const FloatRect& exposedRect)
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
m_exposedRect = exposedRect;
@@ -76,13 +76,13 @@
void DrawingAreaProxy::exposedRectChangedTimerFired()
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
if (m_exposedRect == m_lastSentExposedRect)
return;
- m_webPageProxy->process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy.pageID());
m_lastSentExposedRect = m_exposedRect;
}
#endif // PLATFORM(MAC)
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h 2014-09-01 23:04:12 UTC (rev 173163)
@@ -91,10 +91,10 @@
virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); }
protected:
- explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy*);
+ explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy&);
DrawingAreaType m_type;
- WebPageProxy* m_webPageProxy;
+ WebPageProxy& m_webPageProxy;
WebCore::IntSize m_size;
WebCore::IntSize m_layerPosition;
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h 2014-09-01 23:04:12 UTC (rev 173163)
@@ -41,7 +41,7 @@
class RemoteLayerTreeDrawingAreaProxy : public DrawingAreaProxy {
public:
- explicit RemoteLayerTreeDrawingAreaProxy(WebPageProxy*);
+ explicit RemoteLayerTreeDrawingAreaProxy(WebPageProxy&);
virtual ~RemoteLayerTreeDrawingAreaProxy();
const RemoteLayerTreeHost& remoteLayerTreeHost() const { return m_remoteLayerTreeHost; }
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm 2014-09-01 23:04:12 UTC (rev 173163)
@@ -98,7 +98,7 @@
namespace WebKit {
-RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy(WebPageProxy* webPageProxy)
+RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy(WebPageProxy& webPageProxy)
: DrawingAreaProxy(DrawingAreaTypeRemoteLayerTree, webPageProxy)
, m_remoteLayerTreeHost(*this)
, m_isWaitingForDidUpdateGeometry(false)
@@ -115,16 +115,16 @@
IOSurfacePool::sharedPool().setPoolSize(0);
#endif
- m_webPageProxy->process().addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID(), *this);
+ m_webPageProxy.process().addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
- if (m_webPageProxy->preferences().tiledScrollingIndicatorVisible())
+ if (m_webPageProxy.preferences().tiledScrollingIndicatorVisible())
initializeDebugIndicator();
}
RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy()
{
m_callbacks.invalidate(CallbackBase::Error::OwnerWasInvalidated);
- m_webPageProxy->process().removeMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID());
+ m_webPageProxy.process().removeMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID());
#if PLATFORM(IOS)
[m_displayLinkHandler invalidate];
@@ -133,7 +133,7 @@
void RemoteLayerTreeDrawingAreaProxy::sizeDidChange()
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
if (m_isWaitingForDidUpdateGeometry)
@@ -144,7 +144,7 @@
void RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange()
{
- m_webPageProxy->process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy.deviceScaleFactor()), m_webPageProxy.pageID());
}
void RemoteLayerTreeDrawingAreaProxy::didUpdateGeometry()
@@ -162,10 +162,10 @@
FloatRect RemoteLayerTreeDrawingAreaProxy::scaledExposedRect() const
{
#if PLATFORM(IOS)
- return m_webPageProxy->exposedContentRect();
+ return m_webPageProxy.exposedContentRect();
#else
FloatRect scaledExposedRect = exposedRect();
- float scale = 1 / m_webPageProxy->pageScaleFactor();
+ float scale = 1 / m_webPageProxy.pageScaleFactor();
scaledExposedRect.scale(scale, scale);
return scaledExposedRect;
#endif
@@ -175,7 +175,7 @@
{
m_lastSentSize = m_size;
m_lastSentLayerPosition = m_layerPosition;
- m_webPageProxy->process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy.pageID());
m_isWaitingForDidUpdateGeometry = true;
}
@@ -198,28 +198,28 @@
}
if (m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction))
- m_webPageProxy->setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
+ m_webPageProxy.setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
#if ENABLE(ASYNC_SCROLLING)
RemoteScrollingCoordinatorProxy::RequestedScrollInfo requestedScrollInfo;
- m_webPageProxy->scrollingCoordinatorProxy()->updateScrollingTree(scrollingTreeTransaction, requestedScrollInfo);
+ m_webPageProxy.scrollingCoordinatorProxy()->updateScrollingTree(scrollingTreeTransaction, requestedScrollInfo);
#endif
- m_webPageProxy->didCommitLayerTree(layerTreeTransaction);
+ m_webPageProxy.didCommitLayerTree(layerTreeTransaction);
#if ENABLE(ASYNC_SCROLLING)
#if PLATFORM(IOS)
- if (m_webPageProxy->scrollingCoordinatorProxy()->hasFixedOrSticky()) {
+ if (m_webPageProxy.scrollingCoordinatorProxy()->hasFixedOrSticky()) {
// If we got a new layer for a fixed or sticky node, its position from the WebProcess is probably stale. We need to re-run the "viewport" changed logic to udpate it with our UI-side state.
- FloatRect customFixedPositionRect = m_webPageProxy->computeCustomFixedPositionRect(m_webPageProxy->unobscuredContentRect(), m_webPageProxy->displayedContentScale());
- m_webPageProxy->scrollingCoordinatorProxy()->viewportChangedViaDelegatedScrolling(m_webPageProxy->scrollingCoordinatorProxy()->rootScrollingNodeID(), customFixedPositionRect, m_webPageProxy->displayedContentScale());
+ FloatRect customFixedPositionRect = m_webPageProxy.computeCustomFixedPositionRect(m_webPageProxy.unobscuredContentRect(), m_webPageProxy.displayedContentScale());
+ m_webPageProxy.scrollingCoordinatorProxy()->viewportChangedViaDelegatedScrolling(m_webPageProxy.scrollingCoordinatorProxy()->rootScrollingNodeID(), customFixedPositionRect, m_webPageProxy.displayedContentScale());
}
#endif
// Handle requested scroll position updates from the scrolling tree transaction after didCommitLayerTree()
// has updated the view size based on the content size.
if (requestedScrollInfo.requestsScrollPositionUpdate)
- m_webPageProxy->requestScroll(requestedScrollInfo.requestedScrollPosition, requestedScrollInfo.requestIsProgrammaticScroll);
+ m_webPageProxy.requestScroll(requestedScrollInfo.requestedScrollPosition, requestedScrollInfo.requestIsProgrammaticScroll);
#endif // ENABLE(ASYNC_SCROLLING)
if (m_debugIndicatorLayerTreeHost) {
@@ -238,12 +238,12 @@
void RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart(uint64_t layerID, const String& key, double startTime)
{
- m_webPageProxy->process().send(Messages::DrawingArea::AcceleratedAnimationDidStart(layerID, key, startTime), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::AcceleratedAnimationDidStart(layerID, key, startTime), m_webPageProxy.pageID());
}
void RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd(uint64_t layerID, const String& key)
{
- m_webPageProxy->process().send(Messages::DrawingArea::AcceleratedAnimationDidEnd(layerID, key), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::AcceleratedAnimationDidEnd(layerID, key), m_webPageProxy.pageID());
}
static const float indicatorInset = 10;
@@ -258,15 +258,15 @@
FloatPoint RemoteLayerTreeDrawingAreaProxy::indicatorLocation() const
{
- if (m_webPageProxy->delegatesScrolling()) {
+ if (m_webPageProxy.delegatesScrolling()) {
#if PLATFORM(IOS)
- FloatPoint tiledMapLocation = m_webPageProxy->unobscuredContentRect().location();
- float absoluteInset = indicatorInset / m_webPageProxy->displayedContentScale();
+ FloatPoint tiledMapLocation = m_webPageProxy.unobscuredContentRect().location();
+ float absoluteInset = indicatorInset / m_webPageProxy.displayedContentScale();
tiledMapLocation += FloatSize(absoluteInset, absoluteInset);
#else
FloatPoint tiledMapLocation = exposedRect().location();
tiledMapLocation += FloatSize(indicatorInset, indicatorInset);
- float scale = 1 / m_webPageProxy->pageScaleFactor();;
+ float scale = 1 / m_webPageProxy.pageScaleFactor();;
tiledMapLocation.scale(scale, scale);
#endif
return tiledMapLocation;
@@ -286,7 +286,7 @@
float RemoteLayerTreeDrawingAreaProxy::indicatorScale(IntSize contentsSize) const
{
// Pick a good scale.
- IntSize viewSize = m_webPageProxy->viewSize();
+ IntSize viewSize = m_webPageProxy.viewSize();
float scale = 1;
if (!contentsSize.isEmpty()) {
@@ -311,7 +311,7 @@
[rootLayer addSublayer:m_tileMapHostLayer.get()];
// Pick a good scale.
- IntSize viewSize = m_webPageProxy->viewSize();
+ IntSize viewSize = m_webPageProxy.viewSize();
[m_tileMapHostLayer setBounds:FloatRect(FloatPoint(), contentsSize)];
[m_tileMapHostLayer setPosition:indicatorLocation()];
@@ -328,7 +328,7 @@
[m_exposedRectIndicatorLayer setBorderWidth:counterScaledBorder];
- if (m_webPageProxy->delegatesScrolling()) {
+ if (m_webPageProxy.delegatesScrolling()) {
FloatRect scaledExposedRect = this->scaledExposedRect();
[m_exposedRectIndicatorLayer setPosition:scaledExposedRect.location()];
[m_exposedRectIndicatorLayer setBounds:FloatRect(FloatPoint(), scaledExposedRect.size())];
@@ -375,17 +375,17 @@
void RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay(double)
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
// Waiting for CA to commit is insufficient, because the render server can still be
// using our backing store. We can improve this by waiting for the render server to commit
// if we find API to do so, but for now we will make extra buffers if need be.
- m_webPageProxy->process().send(Messages::DrawingArea::DidUpdate(), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::DidUpdate(), m_webPageProxy.pageID());
m_lastVisibleTransactionID = m_transactionIDForPendingCACommit;
- m_webPageProxy->didUpdateViewState();
+ m_webPageProxy.didUpdateViewState();
}
void RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState()
@@ -395,17 +395,17 @@
#else
auto viewStateUpdateTimeout = std::chrono::milliseconds(250);
#endif
- m_webPageProxy->process().connection()->waitForAndDispatchImmediately<Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree>(m_webPageProxy->pageID(), viewStateUpdateTimeout, InterruptWaitingIfSyncMessageArrives);
+ m_webPageProxy.process().connection()->waitForAndDispatchImmediately<Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree>(m_webPageProxy.pageID(), viewStateUpdateTimeout, InterruptWaitingIfSyncMessageArrives);
}
void RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)> callbackFunction)
{
- if (!m_webPageProxy->isValid()) {
+ if (!m_webPageProxy.isValid()) {
callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
return;
}
- m_webPageProxy->process().send(Messages::DrawingArea::AddTransactionCallbackID(m_callbacks.put(WTF::move(callbackFunction), nullptr)), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::AddTransactionCallbackID(m_callbacks.put(WTF::move(callbackFunction), nullptr)), m_webPageProxy.pageID());
}
void RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate()
Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2014-09-01 23:04:12 UTC (rev 173163)
@@ -34,7 +34,7 @@
class TiledCoreAnimationDrawingAreaProxy : public DrawingAreaProxy {
public:
- explicit TiledCoreAnimationDrawingAreaProxy(WebPageProxy*);
+ explicit TiledCoreAnimationDrawingAreaProxy(WebPageProxy&);
virtual ~TiledCoreAnimationDrawingAreaProxy();
private:
Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (173162 => 173163)
--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2014-09-01 21:15:21 UTC (rev 173162)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2014-09-01 23:04:12 UTC (rev 173163)
@@ -40,7 +40,7 @@
namespace WebKit {
-TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy(WebPageProxy* webPageProxy)
+TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy(WebPageProxy& webPageProxy)
: DrawingAreaProxy(DrawingAreaTypeTiledCoreAnimation, webPageProxy)
, m_isWaitingForDidUpdateGeometry(false)
{
@@ -52,12 +52,12 @@
void TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange()
{
- m_webPageProxy->process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy->deviceScaleFactor()), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy.deviceScaleFactor()), m_webPageProxy.pageID());
}
void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
// We only want one UpdateGeometry message in flight at once, so if we've already sent one but
@@ -73,20 +73,20 @@
if (!m_isWaitingForDidUpdateGeometry)
return;
- if (m_webPageProxy->process().state() != WebProcessProxy::State::Running)
+ if (m_webPageProxy.process().state() != WebProcessProxy::State::Running)
return;
- m_webPageProxy->process().connection()->waitForAndDispatchImmediately<Messages::DrawingAreaProxy::DidUpdateGeometry>(m_webPageProxy->pageID(), timeout);
+ m_webPageProxy.process().connection()->waitForAndDispatchImmediately<Messages::DrawingAreaProxy::DidUpdateGeometry>(m_webPageProxy.pageID(), timeout);
}
void TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange()
{
- m_webPageProxy->process().send(Messages::DrawingArea::SetColorSpace(m_webPageProxy->colorSpace()), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::SetColorSpace(m_webPageProxy.colorSpace()), m_webPageProxy.pageID());
}
void TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange()
{
- if (!m_webPageProxy->isValid())
+ if (!m_webPageProxy.isValid())
return;
// We only want one UpdateGeometry message in flight at once, so if we've already sent one but
@@ -99,7 +99,7 @@
void TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
{
- m_webPageProxy->enterAcceleratedCompositingMode(layerTreeContext);
+ m_webPageProxy.enterAcceleratedCompositingMode(layerTreeContext);
}
void TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&)
@@ -110,7 +110,7 @@
void TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
{
- m_webPageProxy->updateAcceleratedCompositingMode(layerTreeContext);
+ m_webPageProxy.updateAcceleratedCompositingMode(layerTreeContext);
}
void TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry()
@@ -119,7 +119,7 @@
m_isWaitingForDidUpdateGeometry = false;
- IntSize minimumLayoutSize = m_webPageProxy->minimumLayoutSize();
+ IntSize minimumLayoutSize = m_webPageProxy.minimumLayoutSize();
// If the WKView was resized while we were waiting for a DidUpdateGeometry reply from the web process,
// we need to resend the new size here.
@@ -130,34 +130,34 @@
void TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState()
{
auto viewStateUpdateTimeout = std::chrono::milliseconds(250);
- m_webPageProxy->process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateViewState>(m_webPageProxy->pageID(), viewStateUpdateTimeout, InterruptWaitingIfSyncMessageArrives);
+ m_webPageProxy.process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateViewState>(m_webPageProxy.pageID(), viewStateUpdateTimeout, InterruptWaitingIfSyncMessageArrives);
}
void TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange(const IntSize& newIntrinsicContentSize)
{
- if (m_webPageProxy->minimumLayoutSize().width() > 0)
- m_webPageProxy->intrinsicContentSizeDidChange(newIntrinsicContentSize);
+ if (m_webPageProxy.minimumLayoutSize().width() > 0)
+ m_webPageProxy.intrinsicContentSizeDidChange(newIntrinsicContentSize);
}
void TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry()
{
ASSERT(!m_isWaitingForDidUpdateGeometry);
- m_lastSentMinimumLayoutSize = m_webPageProxy->minimumLayoutSize();
+ m_lastSentMinimumLayoutSize = m_webPageProxy.minimumLayoutSize();
m_lastSentSize = m_size;
m_lastSentLayerPosition = m_layerPosition;
- m_webPageProxy->process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition), m_webPageProxy.pageID());
m_isWaitingForDidUpdateGeometry = true;
}
void TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom(double scale, FloatPoint origin)
{
- m_webPageProxy->process().send(Messages::DrawingArea::AdjustTransientZoom(scale, origin), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::AdjustTransientZoom(scale, origin), m_webPageProxy.pageID());
}
void TiledCoreAnimationDrawingAreaProxy::commitTransientZoom(double scale, FloatPoint origin)
{
- m_webPageProxy->process().send(Messages::DrawingArea::CommitTransientZoom(scale, origin), m_webPageProxy->pageID());
+ m_webPageProxy.process().send(Messages::DrawingArea::CommitTransientZoom(scale, origin), m_webPageProxy.pageID());
}
} // namespace WebKit