Title: [273536] branches/safari-611-branch/Source/WebCore
Revision
273536
Author
[email protected]
Date
2021-02-25 18:52:02 -0800 (Thu, 25 Feb 2021)

Log Message

Cherry-pick r273442. rdar://problem/74753214

    Regression(r269481) Kugou Music: Can not leave "MV" category after selecting it
    https://bugs.webkit.org/show_bug.cgi?id=222380
    <rdar://74602294>

    Reviewed by Geoffrey Garen.

    The new behavior in r269481 aligns us with the specification and with Blink so I
    am adding a linked-on-after to maintain pre-r269481 behavior until Apps get
    rebuilt against the new SDK.

    * html/HTMLDocument.cpp:
    (WebCore::HTMLDocument::supportedPropertyNames const):
    * page/Quirks.cpp:
    (WebCore::Quirks::shouldOmitHTMLDocumentSupportedPropertyNames):
    * page/Quirks.h:
    * platform/cocoa/VersionChecks.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273442 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (273535 => 273536)


--- branches/safari-611-branch/Source/WebCore/ChangeLog	2021-02-26 02:51:58 UTC (rev 273535)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog	2021-02-26 02:52:02 UTC (rev 273536)
@@ -1,5 +1,47 @@
 2021-02-25  Russell Epstein  <[email protected]>
 
+        Cherry-pick r273442. rdar://problem/74753214
+
+    Regression(r269481) Kugou Music: Can not leave "MV" category after selecting it
+    https://bugs.webkit.org/show_bug.cgi?id=222380
+    <rdar://74602294>
+    
+    Reviewed by Geoffrey Garen.
+    
+    The new behavior in r269481 aligns us with the specification and with Blink so I
+    am adding a linked-on-after to maintain pre-r269481 behavior until Apps get
+    rebuilt against the new SDK.
+    
+    * html/HTMLDocument.cpp:
+    (WebCore::HTMLDocument::supportedPropertyNames const):
+    * page/Quirks.cpp:
+    (WebCore::Quirks::shouldOmitHTMLDocumentSupportedPropertyNames):
+    * page/Quirks.h:
+    * platform/cocoa/VersionChecks.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-24  Chris Dumez  <[email protected]>
+
+            Regression(r269481) Kugou Music: Can not leave "MV" category after selecting it
+            https://bugs.webkit.org/show_bug.cgi?id=222380
+            <rdar://74602294>
+
+            Reviewed by Geoffrey Garen.
+
+            The new behavior in r269481 aligns us with the specification and with Blink so I
+            am adding a linked-on-after to maintain pre-r269481 behavior until Apps get
+            rebuilt against the new SDK.
+
+            * html/HTMLDocument.cpp:
+            (WebCore::HTMLDocument::supportedPropertyNames const):
+            * page/Quirks.cpp:
+            (WebCore::Quirks::shouldOmitHTMLDocumentSupportedPropertyNames):
+            * page/Quirks.h:
+            * platform/cocoa/VersionChecks.h:
+
+2021-02-25  Russell Epstein  <[email protected]>
+
         Cherry-pick r273501. rdar://problem/74760623
 
     [Cocoa] Files from webmfiles.org do not play through MSE

Modified: branches/safari-611-branch/Source/WebCore/html/HTMLDocument.cpp (273535 => 273536)


--- branches/safari-611-branch/Source/WebCore/html/HTMLDocument.cpp	2021-02-26 02:51:58 UTC (rev 273535)
+++ branches/safari-611-branch/Source/WebCore/html/HTMLDocument.cpp	2021-02-26 02:52:02 UTC (rev 273536)
@@ -74,6 +74,7 @@
 #include "HTMLHtmlElement.h"
 #include "HTMLIFrameElement.h"
 #include "HTMLNames.h"
+#include "Quirks.h"
 #include "ScriptController.h"
 #include "StyleResolver.h"
 #include <wtf/IsoMallocInlines.h>
@@ -140,6 +141,9 @@
 
 Vector<AtomString> HTMLDocument::supportedPropertyNames() const
 {
+    if (Quirks::shouldOmitHTMLDocumentSupportedPropertyNames())
+        return { };
+
     auto properties = m_documentNamedItem.keys();
     // The specification says these should be sorted in document order but this would be expensive
     // and other browser engines do not comply with this part of the specification. For now, just

Modified: branches/safari-611-branch/Source/WebCore/page/Quirks.cpp (273535 => 273536)


--- branches/safari-611-branch/Source/WebCore/page/Quirks.cpp	2021-02-26 02:51:58 UTC (rev 273535)
+++ branches/safari-611-branch/Source/WebCore/page/Quirks.cpp	2021-02-26 02:52:02 UTC (rev 273536)
@@ -660,6 +660,16 @@
 #endif
 }
 
+bool Quirks::shouldOmitHTMLDocumentSupportedPropertyNames()
+{
+#if PLATFORM(COCOA)
+    static bool shouldOmitHTMLDocumentSupportedPropertyNames = !linkedOnOrAfter(SDKVersion::FirstWithHTMLDocumentSupportedPropertyNames);
+    return shouldOmitHTMLDocumentSupportedPropertyNames;
+#else
+    return false;
+#endif
+}
+
 bool Quirks::shouldSilenceWindowResizeEvents() const
 {
 #if PLATFORM(IOS)

Modified: branches/safari-611-branch/Source/WebCore/page/Quirks.h (273535 => 273536)


--- branches/safari-611-branch/Source/WebCore/page/Quirks.h	2021-02-26 02:51:58 UTC (rev 273535)
+++ branches/safari-611-branch/Source/WebCore/page/Quirks.h	2021-02-26 02:52:02 UTC (rev 273536)
@@ -144,6 +144,8 @@
     WEBCORE_EXPORT bool shouldBypassUserGestureRequirementForWebAuthn() const;
 #endif
 
+    static bool shouldOmitHTMLDocumentSupportedPropertyNames();
+
 private:
     bool needsQuirks() const;
 

Modified: branches/safari-611-branch/Source/WebCore/platform/cocoa/VersionChecks.h (273535 => 273536)


--- branches/safari-611-branch/Source/WebCore/platform/cocoa/VersionChecks.h	2021-02-26 02:51:58 UTC (rev 273535)
+++ branches/safari-611-branch/Source/WebCore/platform/cocoa/VersionChecks.h	2021-02-26 02:52:02 UTC (rev 273536)
@@ -65,6 +65,7 @@
     FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_IOS_VERSION_14_0,
     FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS,
     FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5,
+    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_IOS_VERSION_14_5,
     FirstThatObservesClassProperty = DYLD_IOS_VERSION_14_5,
     FirstWithoutWeChatScrollingQuirk = DYLD_IOS_VERSION_14_5,
 #elif PLATFORM(MAC)
@@ -85,6 +86,7 @@
     FirstWithInitializeWebKit2MainThreadAssertion = DYLD_MACOSX_VERSION_10_16,
     FirstWithWKWebsiteDataStoreInitReturningNil = DYLD_MACOSX_VERSION_10_16,
     FirstWithDataURLFragmentRemoval = DYLD_MACOSX_VERSION_11_3,
+    FirstWithHTMLDocumentSupportedPropertyNames = DYLD_MACOSX_VERSION_11_3,
 #endif
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to