Title: [246768] trunk/Source/WebCore
Revision
246768
Author
[email protected]
Date
2019-06-24 16:26:36 -0700 (Mon, 24 Jun 2019)

Log Message

Remove WebSQL quirk for nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=199175

Reviewed by Geoffrey Garen.

Removed unused code.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateRuntimeEnableConditionalString):
* bindings/scripts/IDLAttributes.json:
* page/Quirks.cpp:
(WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
(WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
* page/Quirks.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246767 => 246768)


--- trunk/Source/WebCore/ChangeLog	2019-06-24 23:00:22 UTC (rev 246767)
+++ trunk/Source/WebCore/ChangeLog	2019-06-24 23:26:36 UTC (rev 246768)
@@ -1,3 +1,20 @@
+2019-06-24  Sihui Liu  <[email protected]>
+
+        Remove WebSQL quirk for nytimes.com
+        https://bugs.webkit.org/show_bug.cgi?id=199175
+
+        Reviewed by Geoffrey Garen.
+
+        Removed unused code.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateRuntimeEnableConditionalString):
+        * bindings/scripts/IDLAttributes.json:
+        * page/Quirks.cpp:
+        (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
+        (WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
+        * page/Quirks.h:
+
 2019-06-24  Brady Eidson  <[email protected]>
 
         Null deref in WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (246767 => 246768)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-06-24 23:00:22 UTC (rev 246767)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-06-24 23:26:36 UTC (rev 246768)
@@ -3772,28 +3772,9 @@
 
         AddToImplIncludes("RuntimeEnabledFeatures.h");
 
-        if ($context->extendedAttributes->{EnabledByQuirk}) {
-            AddToImplIncludes("Document.h");
-            AddToImplIncludes("Quirks.h");
-            
-            assert("EnabledByQuirks can only be used by interfaces only exposed to the Window") if $interface->extendedAttributes->{Exposed} && $interface->extendedAttributes->{Exposed} ne "Window";
-    
-            my @quirkFlags = split(/&/, $context->extendedAttributes->{EnabledByQuirk});
-            my @runtimeFlags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
-            my @quirks;
-            my @runtimes;
-            foreach my $flag (@quirkFlags) {
-                push(@quirks, "downcast<Document>(jsCast<JSDOMGlobalObject*>(" . $globalObjectPtr . ")->scriptExecutionContext())->quirks()." . ToMethodName($flag) . "Quirk()");
-            }
-            foreach my $flag (@runtimeFlags) {
-                push(@runtimes, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
-            }
-            push(@conjuncts, "(" . join(" && ", @quirks) . " || " . join(" && ", @runtimes) .")");
-        } else {
-            my @flags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
-            foreach my $flag (@flags) {
-                push(@conjuncts, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
-            }
+        my @flags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
+        foreach my $flag (@flags) {
+            push(@conjuncts, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
         }
     }
 

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (246767 => 246768)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2019-06-24 23:00:22 UTC (rev 246767)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2019-06-24 23:26:36 UTC (rev 246768)
@@ -191,10 +191,6 @@
             "contextsAllowed": ["interface", "dictionary", "enum", "attribute", "operation", "constant"],
             "values": ["*"]
         },
-        "EnabledByQuirk": {
-            "contextsAllowed": ["interface", "dictionary", "enum", "attribute", "operation", "constant"],
-            "values": ["*"]
-        },
         "EnabledForContext": {
             "contextsAllowed": ["attribute", "interface"]
         },

Modified: trunk/Source/WebCore/page/Quirks.cpp (246767 => 246768)


--- trunk/Source/WebCore/page/Quirks.cpp	2019-06-24 23:00:22 UTC (rev 246767)
+++ trunk/Source/WebCore/page/Quirks.cpp	2019-06-24 23:26:36 UTC (rev 246768)
@@ -169,28 +169,6 @@
     return m_hasBrokenEncryptedMediaAPISupportQuirk.value();
 }
 
-bool Quirks::hasWebSQLSupportQuirk() const
-{
-    if (!needsQuirks())
-        return false;
-    
-    if (m_hasWebSQLSupportQuirk)
-        return m_hasWebSQLSupportQuirk.value();
-    
-    auto domain = m_document->securityOrigin().domain().convertToASCIILowercase();
-    
-    m_hasWebSQLSupportQuirk = domain == "bostonglobe.com"
-        || domain.endsWith(".bostonglobe.com")
-        || domain == "latimes.com"
-        || domain.endsWith(".latimes.com")
-        || domain == "washingtonpost.com"
-        || domain.endsWith(".washingtonpost.com")
-        || domain == "nytimes.com"
-        || domain.endsWith(".nytimes.com");
-    
-    return m_hasWebSQLSupportQuirk.value();
-}
-
 bool Quirks::isTouchBarUpdateSupressedForHiddenContentEditable() const
 {
 #if PLATFORM(MAC)

Modified: trunk/Source/WebCore/page/Quirks.h (246767 => 246768)


--- trunk/Source/WebCore/page/Quirks.h	2019-06-24 23:00:22 UTC (rev 246767)
+++ trunk/Source/WebCore/page/Quirks.h	2019-06-24 23:26:36 UTC (rev 246768)
@@ -49,7 +49,6 @@
     bool needsPerDocumentAutoplayBehavior() const;
     bool shouldAutoplayForArbitraryUserGesture() const;
     bool hasBrokenEncryptedMediaAPISupportQuirk() const;
-    bool hasWebSQLSupportQuirk() const;
 #if ENABLE(TOUCH_EVENTS)
     bool shouldDispatchSimulatedMouseEvents() const;
     bool shouldDispatchSimulatedMouseEventsOnTarget(EventTarget*) const;
@@ -71,7 +70,6 @@
     WeakPtr<Document> m_document;
 
     mutable Optional<bool> m_hasBrokenEncryptedMediaAPISupportQuirk;
-    mutable Optional<bool> m_hasWebSQLSupportQuirk;
 #if PLATFORM(IOS_FAMILY)
     mutable Optional<bool> m_needsGMailOverflowScrollQuirk;
     mutable Optional<bool> m_needsYouTubeOverflowScrollQuirk;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to