Title: [284894] trunk
- Revision
- 284894
- Author
- [email protected]
- Date
- 2021-10-26 14:07:13 -0700 (Tue, 26 Oct 2021)
Log Message
html/semantics/embedded-content/the-img-element/adoption.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=232320
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline WPT test that is now passing.
* web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt:
Source/WebCore:
When an <img> moves to a new document, we're supposed to update the image's data.
In HTMLImageElement::didMoveToNewDocument(), we would call HTMLPictureElement::sourcesChanged()
if the <img> element has a parent <picture> element, which would update the image's data.
However, in the absence of a parent <picture> element, we would do nothing. This patch calls
selectImageSource() when the <img> element as a src / srcset attribute to make sure the
image data gets updated.
No new tests, rebaselined existing test.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::didMoveToNewDocument):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (284893 => 284894)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-26 20:54:19 UTC (rev 284893)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-26 21:07:13 UTC (rev 284894)
@@ -1,5 +1,16 @@
2021-10-26 Chris Dumez <[email protected]>
+ html/semantics/embedded-content/the-img-element/adoption.html is timing out
+ https://bugs.webkit.org/show_bug.cgi?id=232320
+
+ Reviewed by Darin Adler.
+
+ Rebaseline WPT test that is now passing.
+
+ * web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt:
+
+2021-10-26 Chris Dumez <[email protected]>
+
<link> elements should be able to fire more than one load / error event
https://bugs.webkit.org/show_bug.cgi?id=232309
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt (284893 => 284894)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt 2021-10-26 20:54:19 UTC (rev 284893)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt 2021-10-26 21:07:13 UTC (rev 284894)
@@ -1,13 +1,11 @@
-Harness Error (TIMEOUT), message = null
-
-TIMEOUT img (src only) Test timed out
+PASS img (src only)
PASS img (src only), parent is picture
PASS img (src only), previous sibling is source
-TIMEOUT img (srcset 1 cand) Test timed out
+PASS img (srcset 1 cand)
PASS img (srcset 1 cand), parent is picture
PASS img (srcset 1 cand), previous sibling is source
-FAIL adopt a cloned img in template assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "/images/green-1x1.png"
+PASS adopt a cloned img in template
PASS adoption is from appendChild
Modified: trunk/Source/WebCore/ChangeLog (284893 => 284894)
--- trunk/Source/WebCore/ChangeLog 2021-10-26 20:54:19 UTC (rev 284893)
+++ trunk/Source/WebCore/ChangeLog 2021-10-26 21:07:13 UTC (rev 284894)
@@ -1,3 +1,22 @@
+2021-10-26 Chris Dumez <[email protected]>
+
+ html/semantics/embedded-content/the-img-element/adoption.html is timing out
+ https://bugs.webkit.org/show_bug.cgi?id=232320
+
+ Reviewed by Darin Adler.
+
+ When an <img> moves to a new document, we're supposed to update the image's data.
+ In HTMLImageElement::didMoveToNewDocument(), we would call HTMLPictureElement::sourcesChanged()
+ if the <img> element has a parent <picture> element, which would update the image's data.
+ However, in the absence of a parent <picture> element, we would do nothing. This patch calls
+ selectImageSource() when the <img> element as a src / srcset attribute to make sure the
+ image data gets updated.
+
+ No new tests, rebaselined existing test.
+
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::didMoveToNewDocument):
+
2021-10-26 Tim Horton <[email protected]>
DisplayList::Recorder's clipBounds() becomes empty if a flip is applied to the CTM
Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (284893 => 284894)
--- trunk/Source/WebCore/html/HTMLImageElement.cpp 2021-10-26 20:54:19 UTC (rev 284893)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp 2021-10-26 21:07:13 UTC (rev 284894)
@@ -683,6 +683,8 @@
HTMLElement::didMoveToNewDocument(oldDocument, newDocument);
if (RefPtr element = pictureElement())
element->sourcesChanged();
+ else if (hasAttribute(srcAttr) || hasAttribute(srcsetAttr))
+ selectImageSource(RelevantMutation::Yes);
}
bool HTMLImageElement::isServerMap() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes