Title: [281443] trunk
Revision
281443
Author
cdu...@apple.com
Date
2021-08-23 07:50:46 -0700 (Mon, 23 Aug 2021)

Log Message

HTMLStyleElement should be able to fire the load event more than once
https://bugs.webkit.org/show_bug.cgi?id=228975

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing. This test was already passing in both Firefox and Chrome.

* web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt:

Source/WebCore:

HTMLStyleElement should be able to fire the load event more than once. WebKit has a flag
preventing the load event to fire more than once but this behavior is not present in the
HTML specification and doesn't match other browsers.

No new tests, rebaselined existing test.

* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
* html/HTMLStyleElement.h:

LayoutTests:

Unskip test that is no longer timing out.

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281442 => 281443)


--- trunk/LayoutTests/ChangeLog	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/LayoutTests/ChangeLog	2021-08-23 14:50:46 UTC (rev 281443)
@@ -1,3 +1,14 @@
+2021-08-23  Chris Dumez  <cdu...@apple.com>
+
+        HTMLStyleElement should be able to fire the load event more than once
+        https://bugs.webkit.org/show_bug.cgi?id=228975
+
+        Reviewed by Youenn Fablet.
+
+        Unskip test that is no longer timing out.
+
+        * TestExpectations:
+
 2021-08-23  Xan Lopez  <x...@igalia.com>
 
         Skip failing test on 32bit (ARMv7/MIPS)

Modified: trunk/LayoutTests/TestExpectations (281442 => 281443)


--- trunk/LayoutTests/TestExpectations	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/LayoutTests/TestExpectations	2021-08-23 14:50:46 UTC (rev 281443)
@@ -540,7 +540,6 @@
 imported/w3c/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-order.html [ Skip ]
 imported/w3c/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-positive.html [ Skip ]
 imported/w3c/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/focus-tabindex-zero.html [ Skip ]
-imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event.html [ Skip ]
 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/loop-from-ended.tentative.html [ Skip ]
 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/src_object_blob.html [ Skip ]
 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-cue-rendering-empty-cue.html [ Skip ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (281442 => 281443)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-08-23 14:50:46 UTC (rev 281443)
@@ -1,3 +1,14 @@
+2021-08-23  Chris Dumez  <cdu...@apple.com>
+
+        HTMLStyleElement should be able to fire the load event more than once
+        https://bugs.webkit.org/show_bug.cgi?id=228975
+
+        Reviewed by Youenn Fablet.
+
+        Rebaseline WPT test that is now passing. This test was already passing in both Firefox and Chrome.
+
+        * web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt:
+
 2021-08-22  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Control characters (Unicode category Cc) should be rendered visibly

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt (281442 => 281443)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-style-element/style_load_event-expected.txt	2021-08-23 14:50:46 UTC (rev 281443)
@@ -1,5 +1,3 @@
 
-Harness Error (TIMEOUT), message = null
+PASS style load event should fire when textContent changed
 
-TIMEOUT style load event should fire when textContent changed Test timed out
-

Modified: trunk/Source/WebCore/ChangeLog (281442 => 281443)


--- trunk/Source/WebCore/ChangeLog	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/Source/WebCore/ChangeLog	2021-08-23 14:50:46 UTC (rev 281443)
@@ -1,3 +1,20 @@
+2021-08-23  Chris Dumez  <cdu...@apple.com>
+
+        HTMLStyleElement should be able to fire the load event more than once
+        https://bugs.webkit.org/show_bug.cgi?id=228975
+
+        Reviewed by Youenn Fablet.
+
+        HTMLStyleElement should be able to fire the load event more than once. WebKit has a flag
+        preventing the load event to fire more than once but this behavior is not present in the
+        HTML specification and doesn't match other browsers.
+
+        No new tests, rebaselined existing test.
+
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
+        * html/HTMLStyleElement.h:
+
 2021-08-23  Alicia Boya GarcĂ­a  <ab...@igalia.com>
 
         [MSE][GStreamer] Implement multi-track support

Modified: trunk/Source/WebCore/html/HTMLStyleElement.cpp (281442 => 281443)


--- trunk/Source/WebCore/html/HTMLStyleElement.cpp	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/Source/WebCore/html/HTMLStyleElement.cpp	2021-08-23 14:50:46 UTC (rev 281443)
@@ -139,11 +139,8 @@
 
 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred)
 {
-    if (m_firedLoad)
-        return;
     m_loadedSheet = !errorOccurred;
     styleLoadEventSender().dispatchEventSoon(*this);
-    m_firedLoad = true;
 }
 
 void HTMLStyleElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const

Modified: trunk/Source/WebCore/html/HTMLStyleElement.h (281442 => 281443)


--- trunk/Source/WebCore/html/HTMLStyleElement.h	2021-08-23 14:32:41 UTC (rev 281442)
+++ trunk/Source/WebCore/html/HTMLStyleElement.h	2021-08-23 14:50:46 UTC (rev 281443)
@@ -68,7 +68,6 @@
     void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
 
     InlineStyleSheetOwner m_styleSheetOwner;
-    bool m_firedLoad { false };
     bool m_loadedSheet { false };
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to