[Webkit-unassigned] [Bug 155056] AX: Force allow user zoom

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 9 13:34:44 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=155056

--- Comment #42 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 273458
  --> https://bugs.webkit.org/attachment.cgi?id=273458
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=273458&action=review

> Source/WebCore/page/ViewportConfiguration.h:93
> -    double maximumScale() const { return m_configuration.maximumScale; }
> +    double maximumScale() const { return m_forceAlwaysUserScalable ? forceAlwaysUserScalableMaximumScale : m_configuration.maximumScale; }

This solution doesn't prevent a page from saying minScale=10, maxScale=10 to avoid scalability.

Also, the various default configurations have maxScale=5. Why did you choose 10?

> Source/WebCore/testing/Internals.cpp:213
> +SOFT_LINK_LIBRARY(libAccessibility)
> +SOFT_LINK(libAccessibility, _AXSSetForceAllowWebScaling, void, (Boolean scalable), (scalable))

Can we just hard link?

> Source/WebCore/testing/Internals.cpp:3534
> +void Internals::setViewportForceAlwaysUserScalable(bool scalable)
> +{
> +#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
> +    _AXSSetForceAllowWebScaling(scalable);
> +#else
> +    UNUSED_PARAM(scalable);
> +#endif
> +}

You need to reset this at the end of every test that changes it. There's a mechanism to do that.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:131
> +    forceAlwaysUserScalable |= _AXSForceAllowWebScaling();

It's a shame that we have a WebPreference key or this, but you're bypassing that. Should we remove the key, or should the default value of that key be overridden by _AXSForceAllowWebScaling()?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:140
> +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
> +    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, forceAlwaysUserScalableChangedCallback, kAXSAllowForceWebScalingEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
> +#endif

This soft link of kAXSAllowForceWebScalingEnabledNotification is going to cause a performance hit for everyone on iOS. Can we just hard link?

Does the CFNotificationCenterAddObserver have to happen here in WebPage? Lots of other notifications happen in WKWebView. Does it have to happen right at platformInitialize time?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160309/41af3d09/attachment.html>


More information about the webkit-unassigned mailing list