Changeset 202380 in webkit
- Timestamp:
- Jun 23, 2016 9:35:17 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r202297 r202380 1 2016-06-23 John Wilander <wilander@apple.com> 2 3 Enable window.open() for existing versions of Secret Society 4 https://bugs.webkit.org/show_bug.cgi?id=159049 5 <rdar://problem/26528349> 6 7 Reviewed by Andy Estes. 8 9 The Secret Society Hidden Mystery app has a broken version check treating iOS 10 10 as iOS 1 on iPads. Therefore it believes it can use window.open() in a tap 11 handler. We should allow the existing versions of the app to do this to not break 12 them. 13 14 * wtf/spi/darwin/dyldSPI.h: 15 Added DYLD_IOS_VERSION_10_0. 16 1 17 2016-06-21 Said Abou-Hallawa <sabouhallawa@apple,com> 2 18 -
trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h
r200866 r202380 38 38 #define DYLD_IOS_VERSION_7_0 0x00070000 39 39 #define DYLD_IOS_VERSION_9_0 0x00090000 40 #define DYLD_IOS_VERSION_10_0 0x000A0000 40 41 41 42 #endif -
trunk/Source/WebCore/ChangeLog
r202379 r202380 1 2016-06-23 John Wilander <wilander@apple.com> 2 3 Enable window.open() for existing versions of Secret Society 4 https://bugs.webkit.org/show_bug.cgi?id=159049 5 <rdar://problem/26528349> 6 7 Reviewed by Andy Estes. 8 9 The Secret Society Hidden Mystery app has a broken version check treating iOS 10 10 as iOS 1 on iPads. Therefore it believes it can use window.open() in a tap 11 handler. We should allow the existing versions of the app to do this to not break 12 them. 13 14 No new tests. Tested manually in the app. 15 16 * page/DOMWindow.cpp: 17 (WebCore::DOMWindow::allowPopUp): 18 Now checks with Settings whether it should allow a popup even though it is 19 not processing a user gesture. 20 * page/Settings.in: 21 Added setting allowWindowOpenWithoutUserGesture. 22 * platform/RuntimeApplicationChecks.h: 23 * platform/RuntimeApplicationChecks.mm: 24 (WebCore::IOSApplication::isTheSecretSocietyHiddenMystery): 25 Added. 26 1 27 2016-06-23 Chris Dumez <cdumez@apple.com> 2 28 -
trunk/Source/WebCore/page/DOMWindow.cpp
r202242 r202380 359 359 { 360 360 ASSERT(firstFrame); 361 362 if (ScriptController::processingUserGesture()) 361 362 auto& settings = firstFrame->settings(); 363 364 if (ScriptController::processingUserGesture() || settings.allowWindowOpenWithoutUserGesture()) 363 365 return true; 364 366 365 return firstFrame->settings().javaScriptCanOpenWindowsAutomatically();367 return settings.javaScriptCanOpenWindowsAutomatically(); 366 368 } 367 369 -
trunk/Source/WebCore/page/Settings.in
r201759 r202380 265 265 allowContentSecurityPolicySourceStarToMatchAnyProtocol initial=false 266 266 267 allowWindowOpenWithoutUserGesture initial=false 268 267 269 selectionPaintingWithoutSelectionGapsEnabled initial=false 268 270 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r202017 r202380 76 76 WEBCORE_EXPORT bool isQuora(); 77 77 WEBCORE_EXPORT bool isXtraMath(); 78 WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery(); 78 79 79 80 } // IOSApplication -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm
r202017 r202380 254 254 } 255 255 256 bool IOSApplication::isTheSecretSocietyHiddenMystery() 257 { 258 static bool isTheSecretSocietyHiddenMystery = applicationBundleIsEqualTo("com.g5e.secretsociety"); 259 return isTheSecretSocietyHiddenMystery; 260 } 261 256 262 #endif 257 263 -
trunk/Source/WebKit/mac/ChangeLog
r202346 r202380 1 2016-06-23 John Wilander <wilander@apple.com> 2 3 Enable window.open() for existing versions of Secret Society app 4 https://bugs.webkit.org/show_bug.cgi?id=159049 5 <rdar://problem/26528349> 6 7 Reviewed by Andy Estes. 8 9 The Secret Society Hidden Mystery app has a broken version check treating iOS 10 10 as iOS 1 on iPads. Therefore it believes it can use window.open() in a tap 11 handler. We should allow the existing versions of the app to do this to not break 12 them. 13 14 * WebView/WebView.mm: 15 (shouldAllowWindowOpenWithoutUserGesture): 16 Added. 17 (shouldConvertInvalidURLsToBlank): 18 Changed hex number to constant DYLD_IOS_VERSION_10_0. 19 1 20 2016-06-22 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r202346 r202380 877 877 } 878 878 879 static bool shouldAllowWindowOpenWithoutUserGesture() 880 { 881 #if PLATFORM(IOS) 882 static bool shouldAllowWindowOpenWithoutUserGesture = IOSApplication::isTheSecretSocietyHiddenMystery() && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0; 883 return shouldAllowWindowOpenWithoutUserGesture; 884 #else 885 return false; 886 #endif 887 } 888 879 889 static bool shouldConvertInvalidURLsToBlank() 880 890 { 881 891 #if PLATFORM(IOS) 882 static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= 0x000A0000;892 static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_10_0; 883 893 #elif PLATFORM(MAC) 884 894 static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= 0x000A0C00; … … 2542 2552 2543 2553 settings.setAllowContentSecurityPolicySourceStarToMatchAnyProtocol(shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol()); 2554 2555 settings.setAllowWindowOpenWithoutUserGesture(shouldAllowWindowOpenWithoutUserGesture()); 2544 2556 2545 2557 settings.setShouldConvertInvalidURLsToBlank(shouldConvertInvalidURLsToBlank());
Note: See TracChangeset
for help on using the changeset viewer.