Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index f683d8da5bf72dbf502816424c0d61f3372b599e..9cf0e2101e85d176d7b521ab4c8c5f0495486c38 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -4117,9 +4117,18 @@ void WebViewImpl::pointerLockMouseEvent(const WebInputEvent& event) |
bool WebViewImpl::shouldDisableDesktopWorkarounds() |
kenneth.r.christiansen
2013/08/29 13:35:55
If these are quirks, should we suffix the methods
rune
2013/08/29 13:57:53
You mean negate it and call it shouldApplyDesktopW
aelias_OOO_until_Jul13
2013/08/29 18:29:35
It's used to decide whether to trigger Chromium's
|
{ |
- ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewportArguments(); |
- return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.userZoom |
- || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != ViewportArguments::ValueAuto); |
+ if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled()) |
+ 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 = m_pageScaleConstraintsSet.pageDefinedConstraints(); |
+ |
+ return fixedLayoutSize().width == m_size.width |
+ || (constraints.minimumScale == constraints.maximumScale && constraints.minimumScale != -1); |
} |
} // namespace WebKit |