| Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| index c75ad1e66edb10b4ce1ead1bd5a75bc752191696..6a2d1aa920f41557de44e479e66a826eba83f137 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "core/frame/VisualViewport.h"
|
|
|
| #include "core/dom/DOMNodeIds.h"
|
| +#include "core/dom/ViewportDescription.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| @@ -734,7 +735,8 @@ void VisualViewport::startTrackingPinchStats() {
|
| if (!document->url().protocolIsInHTTPFamily())
|
| return;
|
|
|
| - m_trackPinchZoomStatsForPage = !shouldDisableDesktopWorkarounds();
|
| + m_trackPinchZoomStatsForPage =
|
| + !document->viewportDescription().isSpecifiedByAuthor();
|
| }
|
|
|
| void VisualViewport::userDidChangeScale() {
|
| @@ -769,25 +771,6 @@ void VisualViewport::sendUMAMetrics() {
|
| m_trackPinchZoomStatsForPage = false;
|
| }
|
|
|
| -bool VisualViewport::shouldDisableDesktopWorkarounds() const {
|
| - if (!mainFrame() || !mainFrame()->view())
|
| - return false;
|
| -
|
| - if (!mainFrame()->settings()->viewportEnabled())
|
| - return false;
|
| -
|
| - // A document is considered adapted to small screen UAs if one of these holds:
|
| - // 1. The author specified viewport has a constrained width that is equal to
|
| - // the initial viewport width.
|
| - // 2. The author has disabled viewport zoom.
|
| - const PageScaleConstraints& constraints =
|
| - frameHost().pageScaleConstraintsSet().pageDefinedConstraints();
|
| -
|
| - return mainFrame()->view()->layoutSize().width() == m_size.width() ||
|
| - (constraints.minimumScale == constraints.maximumScale &&
|
| - constraints.minimumScale != -1);
|
| -}
|
| -
|
| CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline()
|
| const {
|
| ScrollingCoordinator* c = frameHost().page().scrollingCoordinator();
|
|
|