Title: [219283] trunk/Source
Revision
219283
Author
beid...@apple.com
Date
2017-07-09 14:26:15 -0700 (Sun, 09 Jul 2017)

Log Message

Remove some obsolete WebKitVersionChecks.
https://bugs.webkit.org/show_bug.cgi?id=174294

Reviewed by Dan Bernstein.

Source/WebCore:

No new tests (No change to testable behavior)

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::dispatchErrorEvent):

* page/Settings.in:

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isOkCupid): Deleted.
(WebCore::IOSApplication::isFacebook): Deleted.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::layoutOverflowRectForPropagation):

Source/WebKit/ios:

* WebView/WebPDFViewIOS.mm:
(-[WebPDFView drawPage:]):

Source/WebKit/mac:

* Misc/WebKitVersionChecks.h:

* WebView/WebHTMLView.mm:
(-[WebHTMLView hitTest:]):

* WebView/WebView.mm:
(shouldRespectPriorityInCSSAttributeSetters):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):
(shouldTransformsAffectOverflow): Deleted.
(shouldDispatchJavaScriptWindowOnErrorEvents): Deleted.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219282 => 219283)


--- trunk/Source/WebCore/ChangeLog	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/ChangeLog	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1,3 +1,25 @@
+2017-07-09  Brady Eidson  <beid...@apple.com>
+
+        Remove some obsolete WebKitVersionChecks.
+        https://bugs.webkit.org/show_bug.cgi?id=174294
+
+        Reviewed by Dan Bernstein.
+
+        No new tests (No change to testable behavior)
+
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore::ScriptExecutionContext::dispatchErrorEvent):
+        
+        * page/Settings.in:
+        
+        * platform/RuntimeApplicationChecks.h:
+        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+        (WebCore::IOSApplication::isOkCupid): Deleted.
+        (WebCore::IOSApplication::isFacebook): Deleted.
+        
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::layoutOverflowRectForPropagation):
+
 2017-07-08  Brady Eidson  <beid...@apple.com>
 
         Remove some obsolete RuntimeApplicationChecks.

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (219282 => 219283)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2017-07-09 21:26:15 UTC (rev 219283)
@@ -417,13 +417,6 @@
     if (!target)
         return false;
 
-#if PLATFORM(IOS)
-    if (target->toDOMWindow() && is<Document>(*this)) {
-        if (!downcast<Document>(*this).settings().shouldDispatchJavaScriptWindowOnErrorEvents())
-            return false;
-    }
-#endif
-
     String message = errorMessage;
     int line = lineNumber;
     int column = columnNumber;

Modified: trunk/Source/WebCore/page/Settings.in (219282 => 219283)


--- trunk/Source/WebCore/page/Settings.in	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/page/Settings.in	2017-07-09 21:26:15 UTC (rev 219283)
@@ -224,8 +224,6 @@
 standalone initial=false
 telephoneNumberParsingEnabled initial=false
 mediaDataLoadsAutomatically initial=defaultMediaDataLoadsAutomatically
-shouldTransformsAffectOverflow initial=true
-shouldDispatchJavaScriptWindowOnErrorEvents initial=false
 alwaysUseAcceleratedOverflowScroll initial=false
 imageControlsEnabled initial=false, conditional=SERVICE_CONTROLS
 

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (219282 => 219283)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-07-09 21:26:15 UTC (rev 219283)
@@ -71,8 +71,6 @@
 bool isDumpRenderTree();
 bool isMobileStore();
 WEBCORE_EXPORT bool isWebApp();
-WEBCORE_EXPORT bool isOkCupid();
-WEBCORE_EXPORT bool isFacebook();
 WEBCORE_EXPORT bool isWebProcess();
 bool isIBooks();
 WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery();

Modified: trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (219282 => 219283)


--- trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm	2017-07-09 21:26:15 UTC (rev 219283)
@@ -204,18 +204,6 @@
     return isWebApp;
 }
 
-bool IOSApplication::isOkCupid()
-{
-    static bool isOkCupid = applicationBundleIsEqualTo("com.okcupid.app");
-    return isOkCupid;
-}
-
-bool IOSApplication::isFacebook()
-{
-    static bool isFacebook = applicationBundleIsEqualTo("com.facebook.Facebook");
-    return isFacebook;
-}
-
 // FIXME: this needs to be changed when the WebProcess is changed to an XPC service.
 bool IOSApplication::isWebProcess()
 {

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (219282 => 219283)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2017-07-09 21:26:15 UTC (rev 219283)
@@ -4841,11 +4841,7 @@
         rect.unite(layoutOverflowRect());
 
     bool hasTransform = this->hasTransform();
-#if PLATFORM(IOS)
-    if (isInFlowPositioned() || (hasTransform && settings().shouldTransformsAffectOverflow())) {
-#else
     if (isInFlowPositioned() || hasTransform) {
-#endif
         // If we are relatively positioned or if we have a transform, then we have to convert
         // this rectangle into physical coordinates, apply relative positioning and transforms
         // to it, and then convert it back.

Modified: trunk/Source/WebKit/ios/ChangeLog (219282 => 219283)


--- trunk/Source/WebKit/ios/ChangeLog	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/ios/ChangeLog	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1,3 +1,13 @@
+2017-07-09  Brady Eidson  <beid...@apple.com>
+
+        Remove some obsolete WebKitVersionChecks.
+        https://bugs.webkit.org/show_bug.cgi?id=174294
+
+        Reviewed by Dan Bernstein.
+
+        * WebView/WebPDFViewIOS.mm:
+        (-[WebPDFView drawPage:]):
+
 2017-07-05  Don Olmstead  <don.olmst...@sony.com>
 
         [WTF] Move SoftLinking.h into WTF

Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm (219282 => 219283)


--- trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm	2017-07-09 21:26:15 UTC (rev 219283)
@@ -122,8 +122,7 @@
     
     // Draw page.
     CGContextSaveGState(context);
-    CGFloat height = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_FLIPPED_SHADOWS) ? 2.0f : -2.0f;
-    CGContextSetShadowWithColor(context, CGSizeMake(0.0f, height), 3.0f, [[self class] shadowColor]);
+    CGContextSetShadowWithColor(context, CGSizeMake(0.0f, 2.0f), 3.0f, [[self class] shadowColor]);
     CGContextSetFillColorWithColor(context, cachedCGColor(Color::white));
     CGContextFillRect(context, pageRect);
     CGContextRestoreGState(context);    

Modified: trunk/Source/WebKit/mac/ChangeLog (219282 => 219283)


--- trunk/Source/WebKit/mac/ChangeLog	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1,3 +1,22 @@
+2017-07-09  Brady Eidson  <beid...@apple.com>
+
+        Remove some obsolete WebKitVersionChecks.
+        https://bugs.webkit.org/show_bug.cgi?id=174294
+
+        Reviewed by Dan Bernstein.
+
+        * Misc/WebKitVersionChecks.h:
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView hitTest:]):
+
+        * WebView/WebView.mm:
+        (shouldRespectPriorityInCSSAttributeSetters):
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+        (-[WebView _preferencesChanged:]):
+        (shouldTransformsAffectOverflow): Deleted.
+        (shouldDispatchJavaScriptWindowOnErrorEvents): Deleted.
+
 2017-07-08  Brady Eidson  <beid...@apple.com>
 
         Remove some obsolete RuntimeApplicationChecks.

Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (219282 => 219283)


--- trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h	2017-07-09 21:26:15 UTC (rev 219283)
@@ -64,14 +64,6 @@
 #else
 // <rdar://problem/6627758> Need to implement WebKitLinkedOnOrAfter
 // Actually UIKit version numbers, since applications don't link against WebKit
-#define WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION 229 // iOS 2.0
-#define WEBKIT_FIRST_VERSION_WITH_MORE_STRICT_LOCAL_RESOURCE_SECURITY_RESTRICTION 818 // iOS 3.0
-#define WEBKIT_FIRST_VERSION_WITH_FLIPPED_SHADOWS 1100 // iOS 3.2
-#define WEBKIT_FIRST_VERSION_WITHOUT_MULTIPLE_IFRAME_TOUCH_EVENT_DISPATCH 1400 // iOS 4.2
-#define WEBKIT_FIRST_VERSION_WITH_CSS_TRANSFORMS_AFFECTING_OVERFLOW 1600 // iOS 5.0
-#define WEBKIT_FIRST_VERSION_WITH_WINDOW_ON_ERROR 1600 // iOS 5.0
-#define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 2239 // iOS 6.0
-#define WEBKIT_FIRST_VERSION_WITH_YOUTUBE_EMBED_IFRAME_TRANSFORM 2239 // iOS 6.0
 #define WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR 2665 // iOS 7.0
 #define WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES 2665 // iOS 7.0
 #define WEBKIT_FIRST_VERSION_WITH_INSECURE_CONTENT_BLOCKING 3454

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (219282 => 219283)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1924,21 +1924,7 @@
     if (_private->closed)
         return nil;
 
-#if PLATFORM(IOS)
-    // Preserve <rdar://problem/7992472> behavior for third party applications. See <rdar://problem/8463725>.
-    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_MULTIPLE_IFRAME_TOUCH_EVENT_DISPATCH)) {
-        WebEvent *event = [WAKWindow currentEvent];
-        if (event != NULL && event.type == WebEventMouseDown && [self mouse:point inRect:[self frame]])
-            return self;
-        NSView *view = [super hitTest:point];
-        
-        // Find the clicked document view
-        while (view && ![view conformsToProtocol:@protocol(WebDocumentView)])
-            view = [view superview];
-            
-        return view;
-    }
-#else
+#if !PLATFORM(IOS)
     BOOL captureHitsOnSubviews;
     if (forceNSViewHitTest)
         captureHitsOnSubviews = NO;

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (219282 => 219283)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1222,9 +1222,7 @@
 static bool shouldRespectPriorityInCSSAttributeSetters()
 {
 #if PLATFORM(IOS)
-    static bool isStanzaNeedingAttributeSetterQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY)
-        && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.lexcycle.stanza"];
-    return isStanzaNeedingAttributeSetterQuirk;
+    return false;
 #else
     static bool isIAdProducerNeedingAttributeSetterQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY)
         && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iAdProducer"];
@@ -1233,18 +1231,6 @@
 }
 
 #if PLATFORM(IOS)
-static bool shouldTransformsAffectOverflow()
-{
-    static bool shouldTransformsAffectOverflow = !IOSApplication::isOkCupid() || WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_TRANSFORMS_AFFECTING_OVERFLOW);
-    return shouldTransformsAffectOverflow;
-}
-
-static bool shouldDispatchJavaScriptWindowOnErrorEvents()
-{
-    static bool shouldDispatchJavaScriptWindowOnErrorEvents = !IOSApplication::isFacebook() || WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_WINDOW_ON_ERROR);
-    return shouldDispatchJavaScriptWindowOnErrorEvents;
-}
-
 static bool isInternalInstall()
 {
     static bool isInternal = MGGetBoolAnswer(kMGQAppleInternalInstallCapability);
@@ -1562,6 +1548,7 @@
 
     WebInstallMemoryPressureHandler();
 
+#if !PLATFORM(IOS)
     if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
         // Originally, we allowed all local loads.
         SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForAll);
@@ -1570,6 +1557,7 @@
         // with substitute data.
         SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
     }
+#endif
 
 #if PLATFORM(MAC)
     if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
@@ -2910,8 +2898,6 @@
 #if HAVE(AVKIT)
     settings.setAVKitEnabled([preferences avKitEnabled]);
 #endif
-    settings.setShouldTransformsAffectOverflow(shouldTransformsAffectOverflow());
-    settings.setShouldDispatchJavaScriptWindowOnErrorEvents(shouldDispatchJavaScriptWindowOnErrorEvents());
 
     settings.setPasswordEchoEnabled([preferences _allowPasswordEcho]);
     settings.setPasswordEchoDurationInSeconds([preferences _passwordEchoDuration]);

Modified: trunk/Source/WebKit2/ChangeLog (219282 => 219283)


--- trunk/Source/WebKit2/ChangeLog	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit2/ChangeLog	2017-07-09 21:26:15 UTC (rev 219283)
@@ -1,3 +1,13 @@
+2017-07-09  Brady Eidson  <beid...@apple.com>
+
+        Remove some obsolete WebKitVersionChecks.
+        https://bugs.webkit.org/show_bug.cgi?id=174294
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2017-07-08  Chris Dumez  <cdu...@apple.com>
 
         Simplify WebResourceLoadStatisticsStore / ResourceLoadStatisticsStore

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (219282 => 219283)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2017-07-09 20:19:47 UTC (rev 219282)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2017-07-09 21:26:15 UTC (rev 219283)
@@ -3271,8 +3271,6 @@
 
     settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
 
-    settings.setShouldDispatchJavaScriptWindowOnErrorEvents(true);
-
     auto userInterfaceDirectionPolicyCandidate = static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey()));
     if (userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::Content || userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::System)
         settings.setUserInterfaceDirectionPolicy(userInterfaceDirectionPolicyCandidate);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to