Changeset 284894 in webkit
- Timestamp:
- Oct 26, 2021, 2:07:13 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLImageElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r284883 r284894 1 2021-10-26 Chris Dumez <cdumez@apple.com> 2 3 html/semantics/embedded-content/the-img-element/adoption.html is timing out 4 https://bugs.webkit.org/show_bug.cgi?id=232320 5 6 Reviewed by Darin Adler. 7 8 Rebaseline WPT test that is now passing. 9 10 * web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt: 11 1 12 2021-10-26 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt
r284667 r284894 1 1 2 Harness Error (TIMEOUT), message = null 3 4 TIMEOUT img (src only) Test timed out 2 PASS img (src only) 5 3 PASS img (src only), parent is picture 6 4 PASS img (src only), previous sibling is source 7 TIMEOUT img (srcset 1 cand) Test timed out 5 PASS img (srcset 1 cand) 8 6 PASS img (srcset 1 cand), parent is picture 9 7 PASS img (srcset 1 cand), previous sibling is source 10 FAIL adopt a cloned img in template assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "/images/green-1x1.png" 8 PASS adopt a cloned img in template 11 9 PASS adoption is from appendChild 12 10 -
trunk/Source/WebCore/ChangeLog
r284888 r284894 1 2021-10-26 Chris Dumez <cdumez@apple.com> 2 3 html/semantics/embedded-content/the-img-element/adoption.html is timing out 4 https://bugs.webkit.org/show_bug.cgi?id=232320 5 6 Reviewed by Darin Adler. 7 8 When an <img> moves to a new document, we're supposed to update the image's data. 9 In HTMLImageElement::didMoveToNewDocument(), we would call HTMLPictureElement::sourcesChanged() 10 if the <img> element has a parent <picture> element, which would update the image's data. 11 However, in the absence of a parent <picture> element, we would do nothing. This patch calls 12 selectImageSource() when the <img> element as a src / srcset attribute to make sure the 13 image data gets updated. 14 15 No new tests, rebaselined existing test. 16 17 * html/HTMLImageElement.cpp: 18 (WebCore::HTMLImageElement::didMoveToNewDocument): 19 1 20 2021-10-26 Tim Horton <timothy_horton@apple.com> 2 21 -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r284857 r284894 684 684 if (RefPtr element = pictureElement()) 685 685 element->sourcesChanged(); 686 else if (hasAttribute(srcAttr) || hasAttribute(srcsetAttr)) 687 selectImageSource(RelevantMutation::Yes); 686 688 } 687 689
Note:
See TracChangeset
for help on using the changeset viewer.