Changeset 203075 in webkit
- Timestamp:
- Jul 11, 2016 12:08:24 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203074 r203075 1 2016-07-11 Nan Wang <n_wang@apple.com> 2 3 AX: WKWebView should have API to prevent pinch-to-zoom always being allowed 4 https://bugs.webkit.org/show_bug.cgi?id=158364 5 6 Reviewed by Anders Carlsson. 7 8 * fast/viewport/ios/force-always-user-scalable.html: 9 * fast/viewport/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html: 10 * fast/viewport/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html: 11 1 12 2016-07-11 Frederic Wang <fwang@igalia.com> 2 13 -
trunk/LayoutTests/fast/viewport/ios/force-always-user-scalable.html
r197986 r203075 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ ignoresViewportScaleLimits=true ] --> 2 2 <html> 3 3 <head> … … 28 28 description("This tests that after we set forceAlwaysUserScalable, maximum-scale will be ignored."); 29 29 30 window.internals.setViewportForceAlwaysUserScalable(true);31 30 if (window.testRunner) { 32 31 window.jsTestIsAsync = true; … … 45 44 debug("Maximum zoom scale was: " + result); 46 45 47 window.internals.setViewportForceAlwaysUserScalable(false);46 testRunner.setIgnoresViewportScaleLimits(false); 48 47 testRunner.runUIScript(uiScript2, function(result) { 49 48 debug("Maximum zoom scale was reset to: " + result); -
trunk/LayoutTests/fast/viewport/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html
r201294 r203075 21 21 description("This tests that even though force user scalable = true, we won't scale if a text field gets focus by default."); 22 22 23 window.internals.setViewportForceAlwaysUserScalable(true);24 23 if (window.testRunner) { 25 24 window.jsTestIsAsync = true; 25 testRunner.setIgnoresViewportScaleLimits(true); 26 26 } 27 27 … … 30 30 if (testRunner.runUIScript) { 31 31 var uiScript = document.getElementById('ui-script').text; 32 window.internals.setViewportForceAlwaysUserScalable(false);32 testRunner.setIgnoresViewportScaleLimits(false); 33 33 document.getElementById("textfield").focus(); 34 34 testRunner.runUIScript(document.getElementById('ui-script').text, function(result) { -
trunk/LayoutTests/fast/viewport/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html
r201294 r203075 21 21 description("This tests that when the author does not define a scale or width, that zooming in on focused nodes changes the scale."); 22 22 23 window.internals.setViewportForceAlwaysUserScalable(true);24 23 if (window.testRunner) { 25 24 window.jsTestIsAsync = true; 25 testRunner.setIgnoresViewportScaleLimits(true); 26 26 } 27 27 … … 30 30 if (testRunner.runUIScript) { 31 31 var uiScript = document.getElementById('ui-script').text; 32 window.internals.setViewportForceAlwaysUserScalable(false);32 testRunner.setIgnoresViewportScaleLimits(false); 33 33 document.getElementById("textfield").focus(); 34 34 testRunner.runUIScript(document.getElementById('ui-script').text, function(result) { -
trunk/Source/WebCore/ChangeLog
r203074 r203075 1 2016-07-11 Nan Wang <n_wang@apple.com> 2 3 AX: WKWebView should have API to prevent pinch-to-zoom always being allowed 4 https://bugs.webkit.org/show_bug.cgi?id=158364 5 6 Reviewed by Anders Carlsson. 7 8 Removed the internals settings for viewport force always user scalable. 9 10 Changes are covered in modified tests. 11 12 * testing/Internals.cpp: 13 (WebCore::Internals::resetToConsistentState): 14 (WebCore::Internals::Internals): 15 (WebCore::Internals::composedTreeAsText): 16 (WebCore::Internals::setLinkPreloadSupport): 17 (WebCore::Internals::setViewportForceAlwaysUserScalable): Deleted. 18 * testing/Internals.h: 19 * testing/Internals.idl: 20 1 21 2016-07-11 Frederic Wang <fwang@igalia.com> 2 22 -
trunk/Source/WebCore/testing/Internals.cpp
r202183 r203075 212 212 #endif 213 213 214 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000215 #if __has_include(<AccessibilitySupport.h>)216 #include <AccessibilitySupport.h>217 #else218 extern "C" {219 void _AXSSetForceAllowWebScaling(Boolean);220 }221 #endif222 #endif223 224 214 using JSC::CallData; 225 215 using JSC::CallType; … … 416 406 417 407 page.setShowAllPlugins(false); 418 419 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000420 _AXSSetForceAllowWebScaling(false);421 #endif422 408 } 423 409 … … 3289 3275 } 3290 3276 3291 void Internals::setViewportForceAlwaysUserScalable(bool scalable)3292 {3293 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 1000003294 _AXSSetForceAllowWebScaling(scalable);3295 #else3296 UNUSED_PARAM(scalable);3297 #endif3298 }3299 3300 3277 void Internals::setLinkPreloadSupport(bool enable) 3301 3278 { -
trunk/Source/WebCore/testing/Internals.h
r202183 r203075 470 470 String composedTreeAsText(Node&); 471 471 472 void setViewportForceAlwaysUserScalable(bool);473 472 void setLinkPreloadSupport(bool); 474 473 void setResourceTimingSupport(bool); -
trunk/Source/WebCore/testing/Internals.idl
r202183 r203075 447 447 DOMString composedTreeAsText(Node parent); 448 448 449 void setViewportForceAlwaysUserScalable(boolean scalable);450 449 void setLinkPreloadSupport(boolean scalable); 451 450 -
trunk/Source/WebKit2/ChangeLog
r203064 r203075 1 2016-07-11 Nan Wang <n_wang@apple.com> 2 3 AX: WKWebView should have API to prevent pinch-to-zoom always being allowed 4 https://bugs.webkit.org/show_bug.cgi?id=158364 5 6 Reviewed by Anders Carlsson. 7 8 Added a property in WKWebViewConfiguration so that developers can toggle the ignoring 9 viewport scale limits setting. 10 11 Changes are covered in modified tests. 12 13 * Shared/WebPageCreationParameters.cpp: 14 (WebKit::WebPageCreationParameters::encode): 15 (WebKit::WebPageCreationParameters::decode): 16 * Shared/WebPageCreationParameters.h: 17 * UIProcess/API/C/WKPage.cpp: 18 (WKPageSetResourceCachingDisabled): 19 (WKPageSetIgnoresViewportScaleLimits): 20 * UIProcess/API/C/WKPagePrivate.h: 21 * UIProcess/API/Cocoa/WKWebView.mm: 22 (shouldAllowPictureInPictureMediaPlayback): 23 (-[WKWebView _initializeWithConfiguration:]): 24 (-[WKWebView _navigationGestureDidEnd]): 25 (forceAlwaysUserScalableChangedCallback): Deleted. 26 (-[WKWebView _updateForceAlwaysUserScalable]): Deleted. 27 * UIProcess/API/Cocoa/WKWebViewConfiguration.h: 28 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: 29 (-[WKWebViewConfiguration init]): 30 (-[WKWebViewConfiguration encodeWithCoder:]): 31 (-[WKWebViewConfiguration initWithCoder:]): 32 (-[WKWebViewConfiguration copyWithZone:]): 33 * UIProcess/API/Cocoa/WKWebViewInternal.h: 34 * UIProcess/WebPageProxy.cpp: 35 (WebKit::WebPageProxy::creationParameters): 36 * UIProcess/WebPageProxy.h: 37 * UIProcess/ios/WebPageProxyIOS.mm: 38 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize): 39 (WebKit::WebPageProxy::setForceAlwaysUserScalable): 40 (WebKit::WebPageProxy::setMaximumUnobscuredSize): 41 (WebKit::WebPageProxy::updateForceAlwaysUserScalable): Deleted. 42 * WebProcess/WebPage/WebPage.cpp: 43 (WebKit::WebPage::updatePreferences): 44 * WebProcess/WebPage/WebPage.h: 45 * WebProcess/WebPage/WebPage.messages.in: 46 * WebProcess/WebPage/ios/WebPageIOS.mm: 47 (WebKit::WebPage::disableInspectorNodeSearch): 48 (WebKit::WebPage::setForceAlwaysUserScalable): 49 (WebKit::innerFrameQuad): 50 (WebKit::WebPage::updateForceAlwaysUserScalable): Deleted. 51 1 52 2016-07-08 Alex Christensen <achristensen@webkit.org> 2 53 -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp
r202129 r203075 84 84 encoder << availableScreenSize; 85 85 encoder << textAutosizingWidth; 86 encoder << ignoresViewportScaleLimits; 86 87 #endif 87 88 encoder << appleMailPaginationQuirkEnabled; … … 188 189 if (!decoder.decode(parameters.textAutosizingWidth)) 189 190 return false; 191 if (!decoder.decode(parameters.ignoresViewportScaleLimits)) 192 return false; 190 193 #endif 191 194 -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.h
r202183 r203075 132 132 WebCore::FloatSize availableScreenSize; 133 133 float textAutosizingWidth; 134 bool ignoresViewportScaleLimits; 134 135 #endif 135 136 bool appleMailPaginationQuirkEnabled; -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r202724 r203075 2745 2745 } 2746 2746 2747 void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits) 2748 { 2749 #if PLATFORM(IOS) 2750 toImpl(page)->setForceAlwaysUserScalable(ignoresViewportScaleLimits); 2751 #endif 2752 } 2753 2747 2754 #if ENABLE(NETSCAPE_PLUGIN_API) 2748 2755 -
trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
r202724 r203075 148 148 WK_EXPORT void WKPageRestoreFromSessionStateWithoutNavigation(WKPageRef page, WKTypeRef sessionState); 149 149 150 WK_EXPORT void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits); 151 150 152 #ifdef __cplusplus 151 153 } -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r203014 r203075 334 334 } 335 335 336 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000337 static void forceAlwaysUserScalableChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)338 {339 ASSERT(observer);340 WKWebView* webview = static_cast<WKWebView*>(observer);341 [webview _updateForceAlwaysUserScalable];342 }343 #endif344 345 336 #endif 346 337 … … 534 525 [center addObserver:self selector:@selector(_contentSizeCategoryDidChange:) name:UIContentSizeCategoryDidChangeNotification object:nil]; 535 526 _page->contentSizeCategoryDidChange([self _contentSizeCategory]); 536 537 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000538 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), forceAlwaysUserScalableChangedCallback, kAXSAllowForceWebScalingEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);539 #endif540 527 541 528 [[_configuration _contentProviderRegistry] addPage:*_page]; 529 _page->setForceAlwaysUserScalable([_configuration ignoresViewportScaleLimits]); 542 530 #endif 543 531 … … 2234 2222 _frozenVisibleContentRect = Nullopt; 2235 2223 _frozenUnobscuredContentRect = Nullopt; 2236 }2237 2238 - (void)_updateForceAlwaysUserScalable2239 {2240 _page->updateForceAlwaysUserScalable();2241 2224 } 2242 2225 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
r202789 r203075 183 183 @property (nonatomic) WKDataDetectorTypes dataDetectorTypes WK_API_AVAILABLE(ios(WK_IOS_TBA)); 184 184 185 /*! @abstract A Boolean value indicating whether the WKWebView should always allow scaling of the web page, regardless of author intent. 186 @discussion This will override the user-scalable property. 187 */ 188 @property (nonatomic) BOOL ignoresViewportScaleLimits WK_API_AVAILABLE(ios(WK_IOS_TBA)); 189 185 190 #else 186 191 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
r202444 r203075 145 145 else 146 146 _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAll; 147 _ignoresViewportScaleLimits = NO; 147 148 #else 148 149 _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeNone; … … 214 215 [coder encodeInteger:self.selectionGranularity forKey:@"selectionGranularity"]; 215 216 [coder encodeBool:self.allowsPictureInPictureMediaPlayback forKey:@"allowsPictureInPictureMediaPlayback"]; 217 [coder encodeBool:self.ignoresViewportScaleLimits forKey:@"ignoresViewportScaleLimits"]; 216 218 #else 217 219 [coder encodeInteger:self.userInterfaceDirectionPolicy forKey:@"userInterfaceDirectionPolicy"]; … … 240 242 self.selectionGranularity = static_cast<WKSelectionGranularity>([coder decodeIntegerForKey:@"selectionGranularity"]); 241 243 self.allowsPictureInPictureMediaPlayback = [coder decodeBoolForKey:@"allowsPictureInPictureMediaPlayback"]; 244 self.ignoresViewportScaleLimits = [coder decodeBoolForKey:@"ignoresViewportScaleLimits"]; 242 245 #else 243 246 auto userInterfaceDirectionPolicyCandidate = static_cast<WKUserInterfaceDirectionPolicy>([coder decodeIntegerForKey:@"userInterfaceDirectionPolicy"]); … … 290 293 configuration->_alwaysRunsAtForegroundPriority = _alwaysRunsAtForegroundPriority; 291 294 configuration->_selectionGranularity = self->_selectionGranularity; 295 configuration->_ignoresViewportScaleLimits = self->_ignoresViewportScaleLimits; 292 296 #endif 293 297 #if PLATFORM(MAC) -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
r202695 r203075 117 117 - (void)_navigationGestureDidEnd; 118 118 119 - (void)_updateForceAlwaysUserScalable;120 121 119 @property (nonatomic, readonly) BOOL _isBackground; 122 120 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r202894 r203075 5431 5431 parameters.textAutosizingWidth = textAutosizingWidth(); 5432 5432 parameters.mimeTypesWithCustomContentProviders = m_pageClient.mimeTypesWithCustomContentProviders(); 5433 parameters.ignoresViewportScaleLimits = m_forceAlwaysUserScalable; 5433 5434 #endif 5434 5435 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r202889 r203075 522 522 void getSelectionContext(std::function<void(const String&, const String&, const String&, CallbackBase::Error)>); 523 523 void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, std::function<void(const String&, CallbackBase::Error)>); 524 void updateForceAlwaysUserScalable();524 void setForceAlwaysUserScalable(bool); 525 525 #endif 526 526 #if ENABLE(DATA_DETECTION) … … 1856 1856 bool m_hasDeferredStartAssistingNode { false }; 1857 1857 std::unique_ptr<NodeAssistanceArguments> m_deferredNodeAssistanceArguments; 1858 bool m_forceAlwaysUserScalable { false }; 1858 1859 #endif 1859 1860 -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r202347 r203075 315 315 } 316 316 317 void WebPageProxy::updateForceAlwaysUserScalable() 318 { 319 m_process->send(Messages::WebPage::UpdateForceAlwaysUserScalable(), m_pageID); 317 void WebPageProxy::setForceAlwaysUserScalable(bool userScalable) 318 { 319 if (m_forceAlwaysUserScalable == userScalable) 320 return; 321 m_forceAlwaysUserScalable = userScalable; 322 m_process->send(Messages::WebPage::SetForceAlwaysUserScalable(userScalable), m_pageID); 320 323 } 321 324 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r202930 r203075 358 358 , m_useTestingViewportConfiguration(false) 359 359 , m_isInStableState(true) 360 , m_forceAlwaysUserScalable(parameters.ignoresViewportScaleLimits) 360 361 , m_oldestNonStableUpdateVisibleContentRectsTimestamp(std::chrono::milliseconds::zero()) 361 362 , m_estimatedLatency(std::chrono::milliseconds::zero()) … … 3197 3198 m_ignoreViewportScalingConstraints = store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey()); 3198 3199 m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints); 3199 m_forceAlwaysUserScalable = store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()); 3200 updateForceAlwaysUserScalable(); 3200 setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey())); 3201 3201 #endif 3202 3202 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r202889 r203075 580 580 void disableInspectorNodeSearch(); 581 581 582 void updateForceAlwaysUserScalable();582 void setForceAlwaysUserScalable(bool); 583 583 #endif 584 584 … … 1417 1417 bool m_useTestingViewportConfiguration; 1418 1418 bool m_isInStableState; 1419 bool m_forceAlwaysUserScalable { false };1419 bool m_forceAlwaysUserScalable; 1420 1420 std::chrono::milliseconds m_oldestNonStableUpdateVisibleContentRectsTimestamp; 1421 1421 std::chrono::milliseconds m_estimatedLatency; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r202889 r203075 98 98 SetAllowsMediaDocumentInlinePlayback(bool allows) 99 99 HandleTwoFingerTapAtPoint(WebCore::IntPoint point, uint64_t callbackID) 100 UpdateForceAlwaysUserScalable()100 SetForceAlwaysUserScalable(bool userScalable) 101 101 #endif 102 102 -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r202757 r203075 102 102 #import <wtf/TemporaryChange.h> 103 103 104 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000105 #if __has_include(<AccessibilitySupport.h>)106 #include <AccessibilitySupport.h>107 #else108 extern "C" {109 Boolean _AXSForceAllowWebScaling();110 }111 #endif112 #endif113 114 104 using namespace WebCore; 115 105 … … 804 794 } 805 795 806 void WebPage::updateForceAlwaysUserScalable() 807 { 808 bool forceAlwaysUserScalable = m_forceAlwaysUserScalable; 809 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 810 forceAlwaysUserScalable |= _AXSForceAllowWebScaling(); 811 #endif 812 m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalable); 796 void WebPage::setForceAlwaysUserScalable(bool userScalable) 797 { 798 m_forceAlwaysUserScalable = userScalable; 799 m_viewportConfiguration.setForceAlwaysUserScalable(userScalable); 813 800 } 814 801 -
trunk/Tools/ChangeLog
r203070 r203075 1 2016-07-11 Nan Wang <n_wang@apple.com> 2 3 AX: WKWebView should have API to prevent pinch-to-zoom always being allowed 4 https://bugs.webkit.org/show_bug.cgi?id=158364 5 6 Reviewed by Anders Carlsson. 7 8 Added a function in TestRunner so that we can toggle the ignoring viewport 9 scale limits setting. Also added a test option for that in order to change the 10 configuration of the webview in test. 11 12 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 13 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 14 (WTR::TestRunner::setNavigationGesturesEnabled): 15 (WTR::TestRunner::setIgnoresViewportScaleLimits): 16 (WTR::nextUIScriptCallbackID): 17 * WebKitTestRunner/InjectedBundle/TestRunner.h: 18 (WTR::TestRunner::shouldDecideNavigationPolicyAfterDelay): 19 * WebKitTestRunner/TestController.cpp: 20 (WTR::TestController::resetStateToConsistentValues): 21 (WTR::updateTestOptionsFromTestHeader): 22 (WTR::TestController::setNavigationGesturesEnabled): 23 (WTR::TestController::setIgnoresViewportScaleLimits): 24 (WTR::TestController::platformWillRunTest): 25 * WebKitTestRunner/TestController.h: 26 (WTR::TestController::setShouldDecideNavigationPolicyAfterDelay): 27 * WebKitTestRunner/TestInvocation.cpp: 28 (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): 29 * WebKitTestRunner/TestOptions.h: 30 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 31 (WTR::TestController::platformCreateWebView): 32 1 33 2016-07-11 Konstantin Tokarev <annulen@yandex.ru> 2 34 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r202511 r203075 80 80 void setShouldDecideNavigationPolicyAfterDelay(boolean value); 81 81 void setNavigationGesturesEnabled(boolean value); 82 void setIgnoresViewportScaleLimits(boolean value); 82 83 83 84 // Special DOM functions. -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r202728 r203075 988 988 } 989 989 990 void TestRunner::setIgnoresViewportScaleLimits(bool value) 991 { 992 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetIgnoresViewportScaleLimits")); 993 WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(value)); 994 WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get()); 995 } 996 990 997 static unsigned nextUIScriptCallbackID() 991 998 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r202728 r203075 309 309 void setShouldDecideNavigationPolicyAfterDelay(bool); 310 310 void setNavigationGesturesEnabled(bool); 311 void setIgnoresViewportScaleLimits(bool); 311 312 312 313 void runUIScript(JSStringRef script, JSValueRef callback); -
trunk/Tools/WebKitTestRunner/TestController.cpp
r202772 r203075 785 785 786 786 setNavigationGesturesEnabled(false); 787 788 setIgnoresViewportScaleLimits(options.ignoresViewportScaleLimits); 787 789 788 790 WKPageLoadURL(m_mainWebView->page(), blankURL()); … … 938 940 if (key == "needsSiteSpecificQuirks") 939 941 testOptions.needsSiteSpecificQuirks = parseBooleanTestHeaderValue(value); 942 if (key == "ignoresViewportScaleLimits") 943 testOptions.ignoresViewportScaleLimits = parseBooleanTestHeaderValue(value); 940 944 pairStart = pairEnd + 1; 941 945 } … … 2125 2129 } 2126 2130 2131 void TestController::setIgnoresViewportScaleLimits(bool ignoresViewportScaleLimits) 2132 { 2133 WKPageSetIgnoresViewportScaleLimits(m_mainWebView->page(), ignoresViewportScaleLimits); 2134 } 2135 2127 2136 #if !PLATFORM(COCOA) 2128 2137 void TestController::platformWillRunTest(const TestInvocation&) -
trunk/Tools/WebKitTestRunner/TestController.h
r202511 r203075 140 140 141 141 void setNavigationGesturesEnabled(bool value); 142 void setIgnoresViewportScaleLimits(bool); 142 143 143 144 private: -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r202532 r203075 648 648 return; 649 649 } 650 651 if (WKStringIsEqualToUTF8CString(messageName, "SetIgnoresViewportScaleLimits")) { 652 ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID()); 653 WKBooleanRef value = static_cast<WKBooleanRef>(messageBody); 654 TestController::singleton().setIgnoresViewportScaleLimits(WKBooleanGetValue(value)); 655 return; 656 } 650 657 651 658 if (WKStringIsEqualToUTF8CString(messageName, "RunUIProcessScript")) { -
trunk/Tools/WebKitTestRunner/TestOptions.h
r201904 r203075 42 42 bool useMockScrollbars { true }; 43 43 bool needsSiteSpecificQuirks { false }; 44 bool ignoresViewportScaleLimits { false }; 44 45 45 46 float deviceScaleFactor { 1 }; -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r200951 r203075 87 87 if (options.useDataDetection) 88 88 [copiedConfiguration setDataDetectorTypes:WKDataDetectorTypeAll]; 89 if (options.ignoresViewportScaleLimits) 90 [copiedConfiguration setIgnoresViewportScaleLimits:YES]; 89 91 #endif 90 92
Note: See TracChangeset
for help on using the changeset viewer.