Changeset 246768 in webkit


Ignore:
Timestamp:
Jun 24, 2019 4:26:36 PM (5 years ago)
Author:
sihui_liu@apple.com
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:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246767 r246768  
     12019-06-24  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Remove WebSQL quirk for nytimes.com
     4        https://bugs.webkit.org/show_bug.cgi?id=199175
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Removed unused code.
     9
     10        * bindings/scripts/CodeGeneratorJS.pm:
     11        (GenerateRuntimeEnableConditionalString):
     12        * bindings/scripts/IDLAttributes.json:
     13        * page/Quirks.cpp:
     14        (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
     15        (WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
     16        * page/Quirks.h:
     17
    1182019-06-24  Brady Eidson  <beidson@apple.com>
    219
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r246714 r246768  
    37733773        AddToImplIncludes("RuntimeEnabledFeatures.h");
    37743774
    3775         if ($context->extendedAttributes->{EnabledByQuirk}) {
    3776             AddToImplIncludes("Document.h");
    3777             AddToImplIncludes("Quirks.h");
    3778            
    3779             assert("EnabledByQuirks can only be used by interfaces only exposed to the Window") if $interface->extendedAttributes->{Exposed} && $interface->extendedAttributes->{Exposed} ne "Window";
    3780    
    3781             my @quirkFlags = split(/&/, $context->extendedAttributes->{EnabledByQuirk});
    3782             my @runtimeFlags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
    3783             my @quirks;
    3784             my @runtimes;
    3785             foreach my $flag (@quirkFlags) {
    3786                 push(@quirks, "downcast<Document>(jsCast<JSDOMGlobalObject*>(" . $globalObjectPtr . ")->scriptExecutionContext())->quirks()." . ToMethodName($flag) . "Quirk()");
    3787             }
    3788             foreach my $flag (@runtimeFlags) {
    3789                 push(@runtimes, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
    3790             }
    3791             push(@conjuncts, "(" . join(" && ", @quirks) . " || " . join(" && ", @runtimes) .")");
    3792         } else {
    3793             my @flags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
    3794             foreach my $flag (@flags) {
    3795                 push(@conjuncts, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
    3796             }
     3775        my @flags = split(/&/, $context->extendedAttributes->{EnabledAtRuntime});
     3776        foreach my $flag (@flags) {
     3777            push(@conjuncts, "RuntimeEnabledFeatures::sharedFeatures()." . ToMethodName($flag) . "Enabled()");
    37973778        }
    37983779    }
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.json

    r246490 r246768  
    192192            "values": ["*"]
    193193        },
    194         "EnabledByQuirk": {
    195             "contextsAllowed": ["interface", "dictionary", "enum", "attribute", "operation", "constant"],
    196             "values": ["*"]
    197         },
    198194        "EnabledForContext": {
    199195            "contextsAllowed": ["attribute", "interface"]
  • trunk/Source/WebCore/page/Quirks.cpp

    r246444 r246768  
    170170}
    171171
    172 bool Quirks::hasWebSQLSupportQuirk() const
    173 {
    174     if (!needsQuirks())
    175         return false;
    176    
    177     if (m_hasWebSQLSupportQuirk)
    178         return m_hasWebSQLSupportQuirk.value();
    179    
    180     auto domain = m_document->securityOrigin().domain().convertToASCIILowercase();
    181    
    182     m_hasWebSQLSupportQuirk = domain == "bostonglobe.com"
    183         || domain.endsWith(".bostonglobe.com")
    184         || domain == "latimes.com"
    185         || domain.endsWith(".latimes.com")
    186         || domain == "washingtonpost.com"
    187         || domain.endsWith(".washingtonpost.com")
    188         || domain == "nytimes.com"
    189         || domain.endsWith(".nytimes.com");
    190    
    191     return m_hasWebSQLSupportQuirk.value();
    192 }
    193 
    194172bool Quirks::isTouchBarUpdateSupressedForHiddenContentEditable() const
    195173{
  • trunk/Source/WebCore/page/Quirks.h

    r246596 r246768  
    5050    bool shouldAutoplayForArbitraryUserGesture() const;
    5151    bool hasBrokenEncryptedMediaAPISupportQuirk() const;
    52     bool hasWebSQLSupportQuirk() const;
    5352#if ENABLE(TOUCH_EVENTS)
    5453    bool shouldDispatchSimulatedMouseEvents() const;
     
    7271
    7372    mutable Optional<bool> m_hasBrokenEncryptedMediaAPISupportQuirk;
    74     mutable Optional<bool> m_hasWebSQLSupportQuirk;
    7573#if PLATFORM(IOS_FAMILY)
    7674    mutable Optional<bool> m_needsGMailOverflowScrollQuirk;
Note: See TracChangeset for help on using the changeset viewer.