Changeset 254498 in webkit
- Timestamp:
- Jan 13, 2020 11:55:01 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r254486 r254498 1 2020-01-13 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 <iframe> attributes should be processed on "srcdoc" attribute removal 4 https://bugs.webkit.org/show_bug.cgi?id=205995 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes-expected.txt: 9 1 10 2020-01-13 Pablo Saavedra <psaavedra@igalia.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes-expected.txt
r253791 r254498 3 3 PASS Adding `srcdoc` attribute triggers attributes processing 4 4 PASS Setting `srcdoc` (via property) triggers attributes processing 5 FAIL Removing `srcdoc` attribute triggers attributes processing assert_equals: expected "blob:" but got "about:" 5 PASS Removing `srcdoc` attribute triggers attributes processing 6 6 -
trunk/Source/WebCore/ChangeLog
r254497 r254498 1 2020-01-13 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 <iframe> attributes should be processed on "srcdoc" attribute removal 4 https://bugs.webkit.org/show_bug.cgi?id=205995 5 6 Reviewed by Darin Adler. 7 8 Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes.html 9 10 Per spec, "srcdoc" attribute of an <iframe> takes precedence over "src" [1]. 11 Before this change, "srcdoc" handling in HTMLFrameElementBase::parseAttribute didn't check whether 12 the attribute was set or removed. As a result, removal of "srcdoc" attribute navigated the <iframe> 13 to "about:srcdoc" instead of URL in value of "src" attribute. 14 15 With this change, <iframe> attributes processing matches Chrome and Firefox. 16 17 [1] https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes 18 19 * html/HTMLFrameElementBase.cpp: 20 (WebCore::HTMLFrameElementBase::parseAttribute): 21 1 22 2020-01-13 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp
r254322 r254498 105 105 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const AtomString& value) 106 106 { 107 if (name == srcdocAttr) 108 setLocation("about:srcdoc"); 109 else if (name == srcAttr && !hasAttributeWithoutSynchronization(srcdocAttr)) 107 if (name == srcdocAttr) { 108 if (value.isNull()) { 109 const AtomString& srcValue = attributeWithoutSynchronization(srcAttr); 110 if (!srcValue.isNull()) 111 setLocation(stripLeadingAndTrailingHTMLSpaces(srcValue)); 112 } else 113 setLocation("about:srcdoc"); 114 } else if (name == srcAttr && !hasAttributeWithoutSynchronization(srcdocAttr)) 110 115 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); 111 116 else
Note: See TracChangeset
for help on using the changeset viewer.