Changeset 284667 in webkit
- Timestamp:
- Oct 21, 2021 10:05:42 PM (9 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/picture/picture-inside-template-expected.txt (added)
-
LayoutTests/fast/picture/picture-inside-template.html (added)
-
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)
-
Source/WebCore/html/HTMLPictureElement.cpp (modified) (1 diff)
-
Source/WebCore/html/HTMLPictureElement.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r284665 r284667 1 2021-10-21 Cathie Chen <cathiechen@igalia.com> 2 3 The intrisic size of picture image inside a template is always zero 4 https://bugs.webkit.org/show_bug.cgi?id=227682 5 6 Reviewed by Darin Adler. 7 8 * fast/picture/picture-inside-template-expected.txt: Added. 9 * fast/picture/picture-inside-template.html: Added. 10 1 11 2021-10-21 Gabriel Nava Marino <gnavamarino@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/ChangeLog
r284652 r284667 1 2021-10-21 Cathie Chen <cathiechen@igalia.com> 2 3 The intrisic size of picture image inside a template is always zero 4 https://bugs.webkit.org/show_bug.cgi?id=227682 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt: 9 1 10 2021-10-21 Sihui Liu <sihui_liu@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/adoption-expected.txt
r267646 r284667 3 3 4 4 TIMEOUT img (src only) Test timed out 5 TIMEOUT img (src only), parent is picture Test timed out 6 TIMEOUT img (src only), previous sibling is source Test timed out 5 PASS img (src only), parent is picture 6 PASS img (src only), previous sibling is source 7 7 TIMEOUT img (srcset 1 cand) Test timed out 8 TIMEOUT img (srcset 1 cand), parent is picture Test timed out 9 TIMEOUT img (srcset 1 cand), previous sibling is source Test timed out 8 PASS img (srcset 1 cand), parent is picture 9 PASS img (srcset 1 cand), previous sibling is source 10 10 FAIL adopt a cloned img in template assert_equals: expected "http://localhost:8800/images/green-1x1.png" but got "/images/green-1x1.png" 11 11 PASS adoption is from appendChild -
trunk/Source/WebCore/ChangeLog
r284665 r284667 1 2021-10-21 Cathie Chen <cathiechen@igalia.com> 2 3 The intrisic size of picture image inside a template is always zero 4 https://bugs.webkit.org/show_bug.cgi?id=227682 5 6 Reviewed by Darin Adler. 7 8 When the picture element is inside a template element, it belongs to a template document which does not 9 have frame or RenderView, this would affect the source selection and size calculation. Though it calls 10 sourcesChanged to adjust the source in HTMLPictureElement::didMoveToNewDocument, but at this point 11 the image element is still inside the template document, so it does not help with this scenario. To 12 fix it, call sourcesChanged in HTMLImageElement::didMoveToNewDocument instead. 13 14 Test: fast/picture/picture-inside-template.html 15 16 * html/HTMLImageElement.cpp: 17 (WebCore::HTMLImageElement::didMoveToNewDocument): 18 * html/HTMLPictureElement.cpp: 19 (WebCore::HTMLPictureElement::didMoveToNewDocument): Deleted. 20 * html/HTMLPictureElement.h: 21 1 22 2021-10-21 Gabriel Nava Marino <gnavamarino@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r284093 r284667 682 682 m_imageLoader->elementDidMoveToNewDocument(oldDocument); 683 683 HTMLElement::didMoveToNewDocument(oldDocument, newDocument); 684 if (RefPtr element = pictureElement()) 685 element->sourcesChanged(); 684 686 } 685 687 -
trunk/Source/WebCore/html/HTMLPictureElement.cpp
r279108 r284667 48 48 } 49 49 50 void HTMLPictureElement::didMoveToNewDocument(Document& oldDocument, Document& newDocument)51 {52 HTMLElement::didMoveToNewDocument(oldDocument, newDocument);53 sourcesChanged();54 }55 56 50 Ref<HTMLPictureElement> HTMLPictureElement::create(const QualifiedName& tagName, Document& document) 57 51 { -
trunk/Source/WebCore/html/HTMLPictureElement.h
r279108 r284667 45 45 private: 46 46 HTMLPictureElement(const QualifiedName&, Document&); 47 48 void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final;49 47 }; 50 48
Note: See TracChangeset
for help on using the changeset viewer.