WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155056
AX: Force allow user zoom
https://bugs.webkit.org/show_bug.cgi?id=155056
Summary
AX: Force allow user zoom
Nan Wang
Reported
2016-03-04 17:12:38 PST
We should plumb through the accessibility setting to WebKit in order to make user-scalable enable/disable on the fly.
Attachments
patch
(6.80 KB, patch)
2016-03-04 18:23 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(6.41 KB, patch)
2016-03-04 18:31 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(6.85 KB, patch)
2016-03-05 23:48 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.88 KB, patch)
2016-03-07 14:41 PST
,
Nan Wang
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(11.86 KB, patch)
2016-03-07 14:52 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
build fix patch
(11.72 KB, patch)
2016-03-07 16:07 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.55 KB, patch)
2016-03-07 16:33 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.57 KB, patch)
2016-03-07 17:31 PST
,
Nan Wang
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(11.61 KB, patch)
2016-03-07 17:37 PST
,
Nan Wang
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(11.62 KB, patch)
2016-03-07 17:59 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
Support the Internals setting on Mac
(11.70 KB, patch)
2016-03-07 22:38 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.42 KB, patch)
2016-03-09 12:10 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(11.36 KB, patch)
2016-03-09 12:20 PST
,
Nan Wang
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2
(888.48 KB, application/zip)
2016-03-09 13:16 PST
,
Build Bot
no flags
Details
patch
(22.01 KB, patch)
2016-03-10 14:28 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
build fix patch
(19.87 KB, patch)
2016-03-10 15:49 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(19.87 KB, patch)
2016-03-10 16:31 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
patch
(20.71 KB, patch)
2016-03-10 17:11 PST
,
Nan Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(16)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-03-04 17:13:23 PST
<
rdar://problem/24988193
>
Nan Wang
Comment 2
2016-03-04 18:23:13 PST
Created
attachment 273065
[details]
patch
Nan Wang
Comment 3
2016-03-04 18:31:27 PST
Created
attachment 273066
[details]
patch
chris fleizach
Comment 4
2016-03-05 11:09:59 PST
Comment on
attachment 273066
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273066&action=review
> Source/WebCore/ChangeLog:10 > + No new tests.
we should probably add a test that override force scale (which can be set with Settings in the layout test) also overrides max scale
> Source/WebCore/page/ViewportConfiguration.h:91 > + double maximumScale() const { return m_forceAlwaysUserScalable ? 10.0 : m_configuration.maximumScale; }
we should probably define this is a const double somewhere
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:214 > +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
#if PLATFORM(IOS) &&
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:215 > +#include <WebCore/SoftLinking.h>
i think you need another #if #if __has_include(<AccessibilitySupport.h>) #else extern "C" { Boolean _AXSForceAllowWebScaling(); CFStringRef kAXSAllowForceWebScalingEnabledNotification; } #endif so that this can be built by other people take a look at WeakObjCPtr.h
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:602 > + CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, 0, 0);
nullptr, nullptr
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2820 > + m_viewportConfiguration.setForceAlwaysUserScalable(_AXSForceAllowWebScaling());
it seems like this should also respect store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()); maybe this method should have all the logic and then updatePreferences below calls updateForceAlways..()
Nan Wang
Comment 5
2016-03-05 13:22:24 PST
Comment on
attachment 273066
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273066&action=review
Will address other comments.
>> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:214 >> +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > > #if PLATFORM(IOS) &&
the above includes are already in #if PLATFORM(IOS)
>> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2820 >> + m_viewportConfiguration.setForceAlwaysUserScalable(_AXSForceAllowWebScaling()); > > it seems like this should also respect > store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()); > > maybe this method should have all the logic and then updatePreferences below calls updateForceAlways..()
In this case we should cache store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()) somewhere? When we get a notification we don't have access to the store object.
Nan Wang
Comment 6
2016-03-05 23:48:27 PST
Created
attachment 273127
[details]
patch For the layout test setting, do you mean InternalSettings? I'm not sure if we should expose the ViewportConfiguration so that we can override the force scale? And we should make this a WebKit2 only test I guess.
WebKit Commit Bot
Comment 7
2016-03-05 23:50:21 PST
Attachment 273127
[details]
did not pass style-queue: ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:223: _AXSForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 8
2016-03-06 09:24:53 PST
Comment on
attachment 273127
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273127&action=review
> Source/WebCore/ChangeLog:9 > +
is it possible to make a test for this
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:224 > +CFStringRef kAXSAllowForceWebScalingEnabledNotification;
did you check can this be built for simulator when <AccessibilitySupport.h> is not available (essentially using the public SDK)
Nan Wang
Comment 9
2016-03-07 14:41:25 PST
Created
attachment 273215
[details]
patch Added a layout test. Also checked that without AccessibilitySupport.h we can still build for simulator.
WebKit Commit Bot
Comment 10
2016-03-07 14:42:12 PST
Attachment 273215
[details]
did not pass style-queue: ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:223: _AXSForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 11
2016-03-07 14:44:47 PST
Comment on
attachment 273215
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273215&action=review
> Source/WebCore/ChangeLog:8 > + Overridden the maximum scale factor when forceAlwaysUserScalable is true.
Overridden -> Overide
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:609 > +#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
seems like we don't need the PLATFORM(IOS) part
Nan Wang
Comment 12
2016-03-07 14:52:24 PST
Created
attachment 273216
[details]
patch addressed review comments
WebKit Commit Bot
Comment 13
2016-03-07 14:54:52 PST
Attachment 273216
[details]
did not pass style-queue: ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:223: _AXSForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Nan Wang
Comment 14
2016-03-07 14:59:20 PST
Build failures on gtk, working on it.
Nan Wang
Comment 15
2016-03-07 16:07:00 PST
Created
attachment 273234
[details]
build fix patch Build fix. Make ViewportConfiguration test only on iOS.
WebKit Commit Bot
Comment 16
2016-03-07 16:08:23 PST
Attachment 273234
[details]
did not pass style-queue: ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:223: _AXSForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 17
2016-03-07 16:15:08 PST
Comment on
attachment 273234
[details]
build fix patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273234&action=review
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:215 > +#if __has_include(<AccessibilitySupport.h>)
we might not need to do this difference because we can't use anything in the import directly. everything is a symbol that needs to be soft linked in
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:222 > +extern "C" {
does this compile and run? it seems like we still probably need to soft link libAX in this case
Nan Wang
Comment 18
2016-03-07 16:33:34 PST
Created
attachment 273237
[details]
patch review comments
Nan Wang
Comment 19
2016-03-07 17:31:16 PST
Created
attachment 273244
[details]
patch build fix
chris fleizach
Comment 20
2016-03-07 17:33:38 PST
Comment on
attachment 273244
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273244&action=review
> Source/WebCore/testing/Internals.cpp:3500 > +#if PLATFORM(IOS)
use UNUSED_PARAM(forceAlwaysUserScalableEnabled);
Nan Wang
Comment 21
2016-03-07 17:37:44 PST
Created
attachment 273246
[details]
patch review comments
Nan Wang
Comment 22
2016-03-07 17:59:56 PST
Created
attachment 273249
[details]
patch more build fix. Guess we still need "if PLATFORM(IOS)" in ~WebPage()
chris fleizach
Comment 23
2016-03-07 20:44:31 PST
Comment on
attachment 273249
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273249&action=review
> Source/WebCore/testing/Internals.cpp:3501 > + m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalableEnabled);
Is there a reason we need to make this stuff iOS only?
Nan Wang
Comment 24
2016-03-07 21:43:29 PST
Comment on
attachment 273249
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273249&action=review
>> Source/WebCore/testing/Internals.cpp:3501 >> + m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalableEnabled); > > Is there a reason we need to make this stuff iOS only?
Do we have user scalable feature on Mac? If yes I can add support for Mac too.
Nan Wang
Comment 25
2016-03-07 22:38:50 PST
Created
attachment 273273
[details]
Support the Internals setting on Mac
chris fleizach
Comment 26
2016-03-07 23:09:38 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac View in context:
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
> Source/WebCore/testing/Internals.cpp:3500 > +#if PLATFORM(IOS) || PLATFORM(MAC)
why not support this for all platforms?
Nan Wang
Comment 27
2016-03-07 23:41:02 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac View in context:
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
>> Source/WebCore/testing/Internals.cpp:3500 >> +#if PLATFORM(IOS) || PLATFORM(MAC) > > why not support this for all platforms?
Seems ViewportConfigutation is not supported on other platform. Got build failures in previous patches without this check.
WebKit Commit Bot
Comment 28
2016-03-08 08:13:03 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac Clearing flags on attachment: 273273 Committed
r197766
: <
http://trac.webkit.org/changeset/197766
>
WebKit Commit Bot
Comment 29
2016-03-08 08:13:09 PST
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 30
2016-03-08 12:25:17 PST
Why did this not get review from anyone who understands viewport scaling?
WebKit Commit Bot
Comment 31
2016-03-08 12:32:51 PST
Re-opened since this is blocked by
bug 155183
Simon Fraser (smfr)
Comment 32
2016-03-08 12:35:51 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac View in context:
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
> Source/WebCore/testing/Internals.h:481 > + void setViewportForceAlwaysUserScalable(bool); > + double viewportConfigurationMaximumScale();
I don't think you need this stuff here if you use UIScriptController tests.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:220 > +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > +#include <WebCore/SoftLinking.h> > +SOFT_LINK_LIBRARY(libAccessibility) > +SOFT_LINK(libAccessibility, _AXSForceAllowWebScaling, Boolean, (), ()) > +SOFT_LINK_CONSTANT(libAccessibility, kAXSAllowForceWebScalingEnabledNotification, CFStringRef) > +#define kAXSAllowForceWebScalingEnabledNotification getkAXSAllowForceWebScalingEnabledNotification() > +#endif
This is not a platform-specific file, and should not have this here.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:279 > +#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > +static void forceAlwaysUserScalableChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef) > +{ > + ASSERT(observer); > + static_cast<WebPage*>(observer)->updateForceAlwaysUserScalable(); > +} > +#endif
Ditto.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:569 > +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > + CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, forceAlwaysUserScalableChangedCallback, kAXSAllowForceWebScalingEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); > +#endif
Ditto.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:604 > +#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > + CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, nullptr, nullptr); > +#endif
Ditto.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2835 > +#if PLATFORM(IOS) > +void WebPage::updateForceAlwaysUserScalable() > +{ > + bool forceAlwaysUserScalableEnabled = m_forceAlwaysUserScalable; > +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 > + forceAlwaysUserScalableEnabled |= _AXSForceAllowWebScaling(); > +#endif > + m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalableEnabled); > +} > +#endif
Move to WebPageIOS.mm
> LayoutTests/ChangeLog:9 > + * accessibility/ios-simulator/force-user-scalable-expected.txt: Added. > + * accessibility/ios-simulator/force-user-scalable.html: Added.
I would prefer that these tests use UIScriptController to test that the view is actually zoomable. See tests under LayoutTests/fast/viewport/ios/
Simon Fraser (smfr)
Comment 33
2016-03-08 12:36:37 PST
Sorry, but I feel this patch did not have sufficient review or exposure from WebKit2 owners, and had significant problems, so I rolled it out.
Nan Wang
Comment 34
2016-03-08 18:48:54 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac View in context:
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
>> LayoutTests/ChangeLog:9 >> + * accessibility/ios-simulator/force-user-scalable.html: Added. > > I would prefer that these tests use UIScriptController to test that the view is actually zoomable. See tests under LayoutTests/fast/viewport/ios/
I've taken some look into this. Seems we have to expose a function to set the ViewportConfiguration in WebPage class so that UIScriptController can call that. However the TestController only has access to a WKPageRef. I guess I have to expose another function in WKPage to cast call the WebPage function? Correct me if I'm wrong. This seems to make things even more complicated.
Simon Fraser (smfr)
Comment 35
2016-03-08 19:27:38 PST
(In reply to
comment #34
)
> Comment on
attachment 273273
[details]
> Support the Internals setting on Mac > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
> > >> LayoutTests/ChangeLog:9 > >> + * accessibility/ios-simulator/force-user-scalable.html: Added. > > > > I would prefer that these tests use UIScriptController to test that the view is actually zoomable. See tests under LayoutTests/fast/viewport/ios/ > > I've taken some look into this. Seems we have to expose a function to set > the ViewportConfiguration in WebPage class so that UIScriptController can > call that. However the TestController only has access to a WKPageRef. I > guess I have to expose another function in WKPage to cast call the WebPage > function? Correct me if I'm wrong. This seems to make things even more > complicated.
If forceAlwaysUserScalable were a setting, you could set it via internals in a test. Then you'd have to synthesize a pinch-out to simulate zooming.
Nan Wang
Comment 36
2016-03-08 19:40:47 PST
Comment on
attachment 273273
[details]
Support the Internals setting on Mac View in context:
https://bugs.webkit.org/attachment.cgi?id=273273&action=review
>>>> LayoutTests/ChangeLog:9 >>>> + * accessibility/ios-simulator/force-user-scalable.html: Added. >>> >>> I would prefer that these tests use UIScriptController to test that the view is actually zoomable. See tests under LayoutTests/fast/viewport/ios/ >> >> I've taken some look into this. Seems we have to expose a function to set the ViewportConfiguration in WebPage class so that UIScriptController can call that. However the TestController only has access to a WKPageRef. I guess I have to expose another function in WKPage to cast call the WebPage function? Correct me if I'm wrong. This seems to make things even more complicated. > > If forceAlwaysUserScalable were a setting, you could set it via internals in a test. > > Then you'd have to synthesize a pinch-out to simulate zooming.
It's only a setting in ViewportConfiguration. So should I expose ViewportConfiguration in Internals and add that setting?
Simon Fraser (smfr)
Comment 37
2016-03-08 19:55:13 PST
(In reply to
comment #36
)
> It's only a setting in ViewportConfiguration. So should I expose > ViewportConfiguration in Internals and add that setting?
The issue here is that Internals is in WebCore, but the ViewportConfiguration lives in WebKit2. I don't think adding a ViewportConfiguration to Internals and just looking at maximumScale is a good way to test, though; that's just testing a small bit of code in ViewportConfiguration, but you really need to test that the user experience works. Can you programmatically change the answer given by _AXSForceAllowWebScaling() on a per-process basis?
Nan Wang
Comment 38
2016-03-09 12:10:58 PST
Created
attachment 273454
[details]
patch - Moved the SOFT_LINK code to WebPageIOS.mm - Added the test to make sure zooming is working correctly.
Nan Wang
Comment 39
2016-03-09 12:20:16 PST
Created
attachment 273458
[details]
patch Fixed conflicts.
Build Bot
Comment 40
2016-03-09 13:16:14 PST
Comment on
attachment 273458
[details]
patch
Attachment 273458
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/949774
New failing tests: accessibility/ios-simulator/force-always-user-scalable.html
Build Bot
Comment 41
2016-03-09 13:16:18 PST
Created
attachment 273465
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.10.5
Simon Fraser (smfr)
Comment 42
2016-03-09 13:34:44 PST
Comment on
attachment 273458
[details]
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?
Nan Wang
Comment 43
2016-03-10 14:27:52 PST
Comment on
attachment 273458
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273458&action=review
>> 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()?
The current implementation will also respect the WebPreference key result. I think once all the accessibility setting code were in we can decide to remove it or not.
Nan Wang
Comment 44
2016-03-10 14:28:54 PST
Created
attachment 273622
[details]
patch Review comments. - Hard linked the library - Moved notification code to WKWebView
Simon Fraser (smfr)
Comment 45
2016-03-10 14:43:58 PST
Comment on
attachment 273622
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273622&action=review
> Source/WebCore/WebCore.xcodeproj/project.pbxproj:32265 > + "OTHER_LDFLAGS[sdk=iphoneos*]" = ( > + "$(ASAN_OTHER_LDFLAGS)", > + "-lAccessibility", > + ); > + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( > + "$(ASAN_OTHER_LDFLAGS)", > + "-lAccessibility",
This needs to be done via the .xcconfig files.
> Source/WebCore/WebCore.xcodeproj/project.pbxproj:32277 > + "$(ASAN_OTHER_LDFLAGS)", > + "-lAccessibility", > + );
Ditto.
> Source/WebKit2/WebKit2.xcodeproj/project.pbxproj:9604 > + "OTHER_LDFLAGS[sdk=iphoneos*]" = ( > + "$(OTHER_LDFLAGS)", > + "-l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)", > + "-lAccessibility", > + ); > + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( > + "$(OTHER_LDFLAGS)", > + "-l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)", > + "-lAccessibility",
Also needs to move to xcconfig file.
Nan Wang
Comment 46
2016-03-10 15:49:34 PST
Created
attachment 273641
[details]
build fix patch Moved linker flags to xcconfig files.
WebKit Commit Bot
Comment 47
2016-03-10 15:51:49 PST
Attachment 273641
[details]
did not pass style-queue: ERROR: Source/WebCore/testing/Internals.cpp:215: _AXSSetForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 48
2016-03-10 16:09:41 PST
Comment on
attachment 273641
[details]
build fix patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273641&action=review
> Source/WebCore/testing/Internals.cpp:212 > +#include "AccessibilitySupport.h"
This should be <AccessibilitySupport.h>
> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:106 > +#include "AccessibilitySupport.h"
Ditto
Nan Wang
Comment 49
2016-03-10 16:31:55 PST
Created
attachment 273649
[details]
patch review comments
WebKit Commit Bot
Comment 50
2016-03-10 16:34:38 PST
Attachment 273649
[details]
did not pass style-queue: ERROR: Source/WebCore/testing/Internals.cpp:215: _AXSSetForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
chris fleizach
Comment 51
2016-03-10 16:38:41 PST
Comment on
attachment 273649
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273649&action=review
> LayoutTests/fast/viewport/ios/force-always-user-scalable.html:24 > + window.internals.setViewportForceAlwaysUserScalable(true);
We should also try setting this back to NO and then check th scale is back to the author specified value
Nan Wang
Comment 52
2016-03-10 17:11:48 PST
Created
attachment 273657
[details]
patch Updated test
WebKit Commit Bot
Comment 53
2016-03-10 17:12:48 PST
Attachment 273657
[details]
did not pass style-queue: ERROR: Source/WebCore/testing/Internals.cpp:215: _AXSSetForceAllowWebScaling is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 54
2016-03-10 17:56:20 PST
Comment on
attachment 273657
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273657&action=review
> Source/WebCore/Configurations/WebCoreTestSupport.xcconfig:53 > +OTHER_LDFLAGS[sdk=iphoneos*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility; > +OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility;
Is it OK to link with Accessibility all the way back to Monarch? We have open source builders on Monarch.
> Source/WebCore/page/ViewportConfiguration.cpp:194 > + if (m_forceAlwaysUserScalable) > + minimumScale = std::min(minimumScale, forceAlwaysUserScalableMinimumScale);
This worries me a bit because there are pages which load by default with scale > 1 (e.g. "width=200px" in the viewport meta tag), and you're going to cause them to shrink down.
chris fleizach
Comment 55
2016-03-10 17:57:26 PST
Comment on
attachment 273657
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273657&action=review
>> Source/WebCore/Configurations/WebCoreTestSupport.xcconfig:53 >> +OTHER_LDFLAGS[sdk=iphonesimulator*] = $(ASAN_OTHER_LDFLAGS) -lAccessibility; > > Is it OK to link with Accessibility all the way back to Monarch? We have open source builders on Monarch.
should be ok. that dylib has been there since 3.0
Nan Wang
Comment 56
2016-03-10 19:05:40 PST
Comment on
attachment 273657
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273657&action=review
>> Source/WebCore/page/ViewportConfiguration.cpp:194 >> + minimumScale = std::min(minimumScale, forceAlwaysUserScalableMinimumScale); > > This worries me a bit because there are pages which load by default with scale > 1 (e.g. "width=200px" in the viewport meta tag), and you're going to cause them to shrink down.
I've kept all the minimumScale calculation logic below the same. I suppose it would also respect the layout restrictions.
WebKit Commit Bot
Comment 57
2016-03-10 19:57:40 PST
Comment on
attachment 273657
[details]
patch Clearing flags on attachment: 273657 Committed
r197986
: <
http://trac.webkit.org/changeset/197986
>
WebKit Commit Bot
Comment 58
2016-03-10 19:57:48 PST
All reviewed patches have been landed. Closing bug.
David Kilzer (:ddkilzer)
Comment 59
2016-03-10 22:47:49 PST
(In reply to
comment #57
)
> Comment on
attachment 273657
[details]
> patch > > Clearing flags on attachment: 273657 > > Committed
r197986
: <
http://trac.webkit.org/changeset/197986
>
Build fix for Production builds: Committed
r197996
: <
http://trac.webkit.org/changeset/197996
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug