- Revision
- 181986
- Author
- [email protected]
- Date
- 2015-03-25 17:03:44 -0700 (Wed, 25 Mar 2015)
Log Message
Add a preference to prevent "user-scalable=no" from having any effect
https://bugs.webkit.org/show_bug.cgi?id=143032
Reviewed by Sam Weinig.
* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference and push it to the ViewportConfiguration.
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::allowsUserScaling):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (181985 => 181986)
--- trunk/Source/WebCore/ChangeLog 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebCore/ChangeLog 2015-03-26 00:03:44 UTC (rev 181986)
@@ -1,3 +1,17 @@
+2015-03-25 Tim Horton <[email protected]>
+
+ Add a preference to prevent "user-scalable=no" from having any effect
+ https://bugs.webkit.org/show_bug.cgi?id=143032
+
+ Reviewed by Sam Weinig.
+
+ * page/ViewportConfiguration.cpp:
+ (WebCore::ViewportConfiguration::ViewportConfiguration):
+ (WebCore::ViewportConfiguration::allowsUserScaling):
+ * page/ViewportConfiguration.h:
+ (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
+ If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
+
2015-03-25 Dan Bernstein <[email protected]>
Another attempt to get the iOS EWS building again.
Modified: trunk/Source/WebCore/page/ViewportConfiguration.cpp (181985 => 181986)
--- trunk/Source/WebCore/page/ViewportConfiguration.cpp 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebCore/page/ViewportConfiguration.cpp 2015-03-26 00:03:44 UTC (rev 181986)
@@ -47,6 +47,7 @@
ViewportConfiguration::ViewportConfiguration()
: m_minimumLayoutSize(1024, 768)
, m_canIgnoreScalingConstraints(false)
+ , m_forceAlwaysUserScalable(false)
{
// Setup a reasonable default configuration to avoid computing infinite scale/sizes.
// Those are the original iPhone configuration.
@@ -178,7 +179,7 @@
bool ViewportConfiguration::allowsUserScaling() const
{
- return shouldIgnoreScalingConstraints() || m_configuration.allowsUserScaling;
+ return m_forceAlwaysUserScalable || shouldIgnoreScalingConstraints() || m_configuration.allowsUserScaling;
}
ViewportConfiguration::Parameters ViewportConfiguration::webpageParameters()
Modified: trunk/Source/WebCore/page/ViewportConfiguration.h (181985 => 181986)
--- trunk/Source/WebCore/page/ViewportConfiguration.h 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebCore/page/ViewportConfiguration.h 2015-03-26 00:03:44 UTC (rev 181986)
@@ -78,6 +78,7 @@
WEBCORE_EXPORT void setViewportArguments(const ViewportArguments&);
void setCanIgnoreScalingConstraints(bool canIgnoreScalingConstraints) { m_canIgnoreScalingConstraints = canIgnoreScalingConstraints; }
+ void setForceAlwaysUserScalable(bool forceAlwaysUserScalable) { m_forceAlwaysUserScalable = forceAlwaysUserScalable; }
WEBCORE_EXPORT IntSize layoutSize() const;
WEBCORE_EXPORT double initialScale() const;
@@ -113,6 +114,7 @@
ViewportArguments m_viewportArguments;
bool m_canIgnoreScalingConstraints;
+ bool m_forceAlwaysUserScalable;
};
} // namespace WebCore
Modified: trunk/Source/WebKit2/ChangeLog (181985 => 181986)
--- trunk/Source/WebKit2/ChangeLog 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebKit2/ChangeLog 2015-03-26 00:03:44 UTC (rev 181986)
@@ -1,3 +1,15 @@
+2015-03-25 Tim Horton <[email protected]>
+
+ Add a preference to prevent "user-scalable=no" from having any effect
+ https://bugs.webkit.org/show_bug.cgi?id=143032
+
+ Reviewed by Sam Weinig.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ Add a preference and push it to the ViewportConfiguration.
+
2015-03-25 Beth Dakin <[email protected]>
REGRESSION (r181660): Force click url preview doesn't have a TextIndicator in Mail
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (181985 => 181986)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2015-03-26 00:03:44 UTC (rev 181986)
@@ -230,6 +230,7 @@
macro(DeveloperExtrasEnabled, developerExtrasEnabled, Bool, bool, false) \
macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false) \
macro(IgnoreViewportScalingConstraints, ignoreViewportScalingConstraints, Bool, bool, true) \
+ macro(ForceAlwaysUserScalable, forceAlwaysUserScalable, Bool, bool, false) \
\
#define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (181985 => 181986)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-03-25 23:37:41 UTC (rev 181985)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-03-26 00:03:44 UTC (rev 181986)
@@ -2867,6 +2867,7 @@
#if PLATFORM(IOS)
m_viewportConfiguration.setCanIgnoreScalingConstraints(store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey()));
+ m_viewportConfiguration.setForceAlwaysUserScalable(store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
#endif
}