Changeset 219283 in webkit


Ignore:
Timestamp:
Jul 9, 2017 2:26:15 PM (7 years ago)
Author:
beidson@apple.com
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):

Location:
trunk/Source
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r219280 r219283  
     12017-07-09  Brady Eidson  <beidson@apple.com>
     2
     3        Remove some obsolete WebKitVersionChecks.
     4        https://bugs.webkit.org/show_bug.cgi?id=174294
     5
     6        Reviewed by Dan Bernstein.
     7
     8        No new tests (No change to testable behavior)
     9
     10        * dom/ScriptExecutionContext.cpp:
     11        (WebCore::ScriptExecutionContext::dispatchErrorEvent):
     12       
     13        * page/Settings.in:
     14       
     15        * platform/RuntimeApplicationChecks.h:
     16        * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
     17        (WebCore::IOSApplication::isOkCupid): Deleted.
     18        (WebCore::IOSApplication::isFacebook): Deleted.
     19       
     20        * rendering/RenderBox.cpp:
     21        (WebCore::RenderBox::layoutOverflowRectForPropagation):
     22
    1232017-07-08  Brady Eidson  <beidson@apple.com>
    224
  • trunk/Source/WebCore/dom/ScriptExecutionContext.cpp

    r218794 r219283  
    418418        return false;
    419419
    420 #if PLATFORM(IOS)
    421     if (target->toDOMWindow() && is<Document>(*this)) {
    422         if (!downcast<Document>(*this).settings().shouldDispatchJavaScriptWindowOnErrorEvents())
    423             return false;
    424     }
    425 #endif
    426 
    427420    String message = errorMessage;
    428421    int line = lineNumber;
  • trunk/Source/WebCore/page/Settings.in

    r218662 r219283  
    225225telephoneNumberParsingEnabled initial=false
    226226mediaDataLoadsAutomatically initial=defaultMediaDataLoadsAutomatically
    227 shouldTransformsAffectOverflow initial=true
    228 shouldDispatchJavaScriptWindowOnErrorEvents initial=false
    229227alwaysUseAcceleratedOverflowScroll initial=false
    230228imageControlsEnabled initial=false, conditional=SERVICE_CONTROLS
  • trunk/Source/WebCore/platform/RuntimeApplicationChecks.h

    r219280 r219283  
    7272bool isMobileStore();
    7373WEBCORE_EXPORT bool isWebApp();
    74 WEBCORE_EXPORT bool isOkCupid();
    75 WEBCORE_EXPORT bool isFacebook();
    7674WEBCORE_EXPORT bool isWebProcess();
    7775bool isIBooks();
  • trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm

    r219280 r219283  
    205205}
    206206
    207 bool IOSApplication::isOkCupid()
    208 {
    209     static bool isOkCupid = applicationBundleIsEqualTo("com.okcupid.app");
    210     return isOkCupid;
    211 }
    212 
    213 bool IOSApplication::isFacebook()
    214 {
    215     static bool isFacebook = applicationBundleIsEqualTo("com.facebook.Facebook");
    216     return isFacebook;
    217 }
    218 
    219207// FIXME: this needs to be changed when the WebProcess is changed to an XPC service.
    220208bool IOSApplication::isWebProcess()
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r217943 r219283  
    48424842
    48434843    bool hasTransform = this->hasTransform();
    4844 #if PLATFORM(IOS)
    4845     if (isInFlowPositioned() || (hasTransform && settings().shouldTransformsAffectOverflow())) {
    4846 #else
    48474844    if (isInFlowPositioned() || hasTransform) {
    4848 #endif
    48494845        // If we are relatively positioned or if we have a transform, then we have to convert
    48504846        // this rectangle into physical coordinates, apply relative positioning and transforms
  • trunk/Source/WebKit/ios/ChangeLog

    r219191 r219283  
     12017-07-09  Brady Eidson  <beidson@apple.com>
     2
     3        Remove some obsolete WebKitVersionChecks.
     4        https://bugs.webkit.org/show_bug.cgi?id=174294
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * WebView/WebPDFViewIOS.mm:
     9        (-[WebPDFView drawPage:]):
     10
    1112017-07-05  Don Olmstead  <don.olmstead@sony.com>
    212
  • trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm

    r212880 r219283  
    123123    // Draw page.
    124124    CGContextSaveGState(context);
    125     CGFloat height = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_FLIPPED_SHADOWS) ? 2.0f : -2.0f;
    126     CGContextSetShadowWithColor(context, CGSizeMake(0.0f, height), 3.0f, [[self class] shadowColor]);
     125    CGContextSetShadowWithColor(context, CGSizeMake(0.0f, 2.0f), 3.0f, [[self class] shadowColor]);
    127126    CGContextSetFillColorWithColor(context, cachedCGColor(Color::white));
    128127    CGContextFillRect(context, pageRect);
  • trunk/Source/WebKit/mac/ChangeLog

    r219280 r219283  
     12017-07-09  Brady Eidson  <beidson@apple.com>
     2
     3        Remove some obsolete WebKitVersionChecks.
     4        https://bugs.webkit.org/show_bug.cgi?id=174294
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Misc/WebKitVersionChecks.h:
     9
     10        * WebView/WebHTMLView.mm:
     11        (-[WebHTMLView hitTest:]):
     12
     13        * WebView/WebView.mm:
     14        (shouldRespectPriorityInCSSAttributeSetters):
     15        (-[WebView _commonInitializationWithFrameName:groupName:]):
     16        (-[WebView _preferencesChanged:]):
     17        (shouldTransformsAffectOverflow): Deleted.
     18        (shouldDispatchJavaScriptWindowOnErrorEvents): Deleted.
     19
    1202017-07-08  Brady Eidson  <beidson@apple.com>
    221
  • trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h

    r219280 r219283  
    6565// <rdar://problem/6627758> Need to implement WebKitLinkedOnOrAfter
    6666// Actually UIKit version numbers, since applications don't link against WebKit
    67 #define WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION 229 // iOS 2.0
    68 #define WEBKIT_FIRST_VERSION_WITH_MORE_STRICT_LOCAL_RESOURCE_SECURITY_RESTRICTION 818 // iOS 3.0
    69 #define WEBKIT_FIRST_VERSION_WITH_FLIPPED_SHADOWS 1100 // iOS 3.2
    70 #define WEBKIT_FIRST_VERSION_WITHOUT_MULTIPLE_IFRAME_TOUCH_EVENT_DISPATCH 1400 // iOS 4.2
    71 #define WEBKIT_FIRST_VERSION_WITH_CSS_TRANSFORMS_AFFECTING_OVERFLOW 1600 // iOS 5.0
    72 #define WEBKIT_FIRST_VERSION_WITH_WINDOW_ON_ERROR 1600 // iOS 5.0
    73 #define WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY 2239 // iOS 6.0
    74 #define WEBKIT_FIRST_VERSION_WITH_YOUTUBE_EMBED_IFRAME_TRANSFORM 2239 // iOS 6.0
    7567#define WEBKIT_FIRST_VERSION_WITHOUT_LEGACY_BACKGROUNDSIZE_SHORTHAND_BEHAVIOR 2665 // iOS 7.0
    7668#define WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES 2665 // iOS 7.0
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r218880 r219283  
    19251925        return nil;
    19261926
    1927 #if PLATFORM(IOS)
    1928     // Preserve <rdar://problem/7992472> behavior for third party applications. See <rdar://problem/8463725>.
    1929     if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_MULTIPLE_IFRAME_TOUCH_EVENT_DISPATCH)) {
    1930         WebEvent *event = [WAKWindow currentEvent];
    1931         if (event != NULL && event.type == WebEventMouseDown && [self mouse:point inRect:[self frame]])
    1932             return self;
    1933         NSView *view = [super hitTest:point];
    1934        
    1935         // Find the clicked document view
    1936         while (view && ![view conformsToProtocol:@protocol(WebDocumentView)])
    1937             view = [view superview];
    1938            
    1939         return view;
    1940     }
    1941 #else
     1927#if !PLATFORM(IOS)
    19421928    BOOL captureHitsOnSubviews;
    19431929    if (forceNSViewHitTest)
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r219280 r219283  
    12231223{
    12241224#if PLATFORM(IOS)
    1225     static bool isStanzaNeedingAttributeSetterQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY)
    1226         && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.lexcycle.stanza"];
    1227     return isStanzaNeedingAttributeSetterQuirk;
     1225    return false;
    12281226#else
    12291227    static bool isIAdProducerNeedingAttributeSetterQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_ATTRIBUTE_SETTERS_IGNORING_PRIORITY)
     
    12341232
    12351233#if PLATFORM(IOS)
    1236 static bool shouldTransformsAffectOverflow()
    1237 {
    1238     static bool shouldTransformsAffectOverflow = !IOSApplication::isOkCupid() || WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CSS_TRANSFORMS_AFFECTING_OVERFLOW);
    1239     return shouldTransformsAffectOverflow;
    1240 }
    1241 
    1242 static bool shouldDispatchJavaScriptWindowOnErrorEvents()
    1243 {
    1244     static bool shouldDispatchJavaScriptWindowOnErrorEvents = !IOSApplication::isFacebook() || WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_WINDOW_ON_ERROR);
    1245     return shouldDispatchJavaScriptWindowOnErrorEvents;
    1246 }
    1247 
    12481234static bool isInternalInstall()
    12491235{
     
    15631549    WebInstallMemoryPressureHandler();
    15641550
     1551#if !PLATFORM(IOS)
    15651552    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
    15661553        // Originally, we allowed all local loads.
     
    15711558        SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
    15721559    }
     1560#endif
    15731561
    15741562#if PLATFORM(MAC)
     
    29112899    settings.setAVKitEnabled([preferences avKitEnabled]);
    29122900#endif
    2913     settings.setShouldTransformsAffectOverflow(shouldTransformsAffectOverflow());
    2914     settings.setShouldDispatchJavaScriptWindowOnErrorEvents(shouldDispatchJavaScriptWindowOnErrorEvents());
    29152901
    29162902    settings.setPasswordEchoEnabled([preferences _allowPasswordEcho]);
  • trunk/Source/WebKit2/ChangeLog

    r219277 r219283  
     12017-07-09  Brady Eidson  <beidson@apple.com>
     2
     3        Remove some obsolete WebKitVersionChecks.
     4        https://bugs.webkit.org/show_bug.cgi?id=174294
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * WebProcess/WebPage/WebPage.cpp:
     9        (WebKit::WebPage::updatePreferences):
     10
    1112017-07-08  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r219218 r219283  
    32723272    settings.setEnableInheritURIQueryComponent(store.getBoolValueForKey(WebPreferencesKey::enableInheritURIQueryComponentKey()));
    32733273
    3274     settings.setShouldDispatchJavaScriptWindowOnErrorEvents(true);
    3275 
    32763274    auto userInterfaceDirectionPolicyCandidate = static_cast<WebCore::UserInterfaceDirectionPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::userInterfaceDirectionPolicyKey()));
    32773275    if (userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::Content || userInterfaceDirectionPolicyCandidate == WebCore::UserInterfaceDirectionPolicy::System)
Note: See TracChangeset for help on using the changeset viewer.