RESOLVED FIXED Bug 139466
[iOS] Add setting to ignore viewport scaling constraints
https://bugs.webkit.org/show_bug.cgi?id=139466
Summary [iOS] Add setting to ignore viewport scaling constraints
Martin Hock
Reported 2014-12-09 17:24:53 PST
[iOS] Add viewport override preference
Attachments
patch (8.06 KB, patch)
2014-12-09 17:39 PST, Martin Hock
benjamin: review-
address comments (8.74 KB, patch)
2014-12-09 20:21 PST, Martin Hock
benjamin: review+
benjamin: commit-queue-
Martin Hock
Comment 1 2014-12-09 17:39:16 PST
Benjamin Poulain
Comment 2 2014-12-09 17:56:00 PST
Comment on attachment 242982 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=242982&action=review The name "Override" is too generic. What do you think of "ignoreViewportScalingConstraints"? > Source/WebCore/page/ViewportConfiguration.cpp:241 > - applyViewportArgument(m_configuration.minimumScale, m_viewportArguments.minZoom, minimumViewportArgumentsScaleFactor, maximumViewportArgumentsScaleFactor); > + applyViewportArgument(m_configuration.minimumScale, m_override ? minimumViewportArgumentsScaleFactor : m_viewportArguments.minZoom, minimumViewportArgumentsScaleFactor, maximumViewportArgumentsScaleFactor); I think I would leave the configuration unchanged, and modify minimumScale() instead. That will make it easier to reason about the viewport configuration. The state of m_configuration would still be correct, but we would report different values to the API. > Source/WebCore/page/ViewportConfiguration.cpp:260 > + if (m_override) > + m_configuration.allowsUserScaling = true; ditto
Martin Hock
Comment 3 2014-12-09 20:21:03 PST
Created attachment 242985 [details] address comments
Benjamin Poulain
Comment 4 2014-12-09 20:27:19 PST
Comment on attachment 242985 [details] address comments View in context: https://bugs.webkit.org/attachment.cgi?id=242985&action=review > Source/WebCore/page/ViewportConfiguration.h:80 > + void setIgnoreViewportScalingConstraints(bool ignoreViewportScalingConstraints) {m_ignoreViewportScalingConstraints = ignoreViewportScalingConstraints; } I wonder if for Viewport Configuration, this should be named "IgnoreScalingConstraints" since the Viewport is implied by the object. I let you decide the name. > Source/WebCore/page/ViewportConfiguration.h:111 > + bool m_ignoreViewportScalingConstraints; You should initialize this in the constructor.
Martin Hock
Comment 5 2014-12-10 15:42:11 PST
Note You need to log in before you can comment on or make changes to this bug.