| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 9bc4335ce6d61d0e6cfa6575c8a292b7bff37569..5caafc3efc71ac86da0287102f0ed5e4c94a17e2 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -110,6 +110,7 @@
|
| #include "platform/UserGestureIndicator.h"
|
| #include "platform/exported/WebActiveGestureAnimation.h"
|
| #include "platform/fonts/FontCache.h"
|
| +#include "platform/geometry/FloatRect.h"
|
| #include "platform/graphics/Color.h"
|
| #include "platform/graphics/CompositorMutatorClient.h"
|
| #include "platform/graphics/FirstPaintInvalidationTracking.h"
|
| @@ -420,7 +421,6 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
|
| , m_doingDragAndDrop(false)
|
| , m_ignoreInputEvents(false)
|
| , m_compositorDeviceScaleFactorOverride(0)
|
| - , m_rootLayerScale(1)
|
| , m_suppressNextKeypressEvent(false)
|
| , m_imeAcceptEvents(true)
|
| , m_operationsAllowed(WebDragOperationNone)
|
| @@ -3844,17 +3844,19 @@ void WebViewImpl::setCompositorDeviceScaleFactorOverride(float deviceScaleFactor
|
| updateLayerTreeDeviceScaleFactor();
|
| }
|
|
|
| -void WebViewImpl::setRootLayerTransform(const WebSize& rootLayerOffset, float rootLayerScale)
|
| +void WebViewImpl::setRootLayerTransform(const TransformationMatrix& transform)
|
| {
|
| - if (m_rootLayerScale == rootLayerScale && m_rootLayerOffset == rootLayerOffset)
|
| + if (transform == m_rootLayerTransform)
|
| return;
|
| - m_rootLayerScale = rootLayerScale;
|
| - m_rootLayerOffset = rootLayerOffset;
|
| - if (mainFrameImpl())
|
| - mainFrameImpl()->setInputEventsTransformForEmulation(m_rootLayerOffset, m_rootLayerScale);
|
| + m_rootLayerTransform = transform;
|
| updateRootLayerTransform();
|
| }
|
|
|
| +TransformationMatrix WebViewImpl::getRootLayerTransformForTesting() const
|
| +{
|
| + return m_rootLayerTransform;
|
| +}
|
| +
|
| void WebViewImpl::enableDeviceEmulation(const WebDeviceEmulationParams& params)
|
| {
|
| m_devToolsEmulator->enableDeviceEmulation(params);
|
| @@ -4090,6 +4092,12 @@ void WebViewImpl::pageScaleFactorChanged()
|
| pageScaleConstraintsSet().setNeedsReset(false);
|
| updateLayerTreeViewport();
|
| m_client->pageScaleFactorChanged();
|
| + m_devToolsEmulator->mainFrameScrollOrScaleChanged();
|
| +}
|
| +
|
| +void WebViewImpl::mainFrameScrollOffsetChanged()
|
| +{
|
| + m_devToolsEmulator->mainFrameScrollOrScaleChanged();
|
| }
|
|
|
| bool WebViewImpl::useExternalPopupMenus()
|
| @@ -4420,12 +4428,8 @@ void WebViewImpl::updateLayerTreeDeviceScaleFactor()
|
|
|
| void WebViewImpl::updateRootLayerTransform()
|
| {
|
| - if (m_visualViewportContainerLayer) {
|
| - TransformationMatrix transform;
|
| - transform.translate(m_rootLayerOffset.width, m_rootLayerOffset.height);
|
| - transform = transform.scale(m_rootLayerScale);
|
| - m_visualViewportContainerLayer->setTransform(transform);
|
| - }
|
| + if (m_visualViewportContainerLayer)
|
| + m_visualViewportContainerLayer->setTransform(m_rootLayerTransform);
|
| }
|
|
|
| bool WebViewImpl::detectContentOnTouch(const GestureEventWithHitTestResults& targetedEvent)
|
|
|