Bug 243385 - srcdoc iframes fail to clear when srcdoc attribute removed
Summary: srcdoc iframes fail to clear when srcdoc attribute removed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Ryosuke Niwa
URL: http://wpt.live/html/semantics/embedd...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-07-31 02:47 PDT by Ahmad Saleem
Modified: 2022-07-31 19:03 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-07-31 02:47:15 PDT
Hi Team,

As of right now, Safari is only browser to fail following WPT test:

https://wpt.fyi/results/html/semantics/embedded-content/the-iframe-element/srcdoc-attribute-reset.html?label=master&label=experimental&aligned&q=srcdoc-attribute-reset

Link to test - http://wpt.live/html/semantics/embedded-content/the-iframe-element/srcdoc-attribute-reset.html

While all other browser pass this test case, I tried to look into bug whether it is already reported or not but I was not able to find. Hence, I am raising this bug and just to bring to attention (if bug already exist, please mark it as duplicate).

This was fixed in Chrome in following - https://bugs.chromium.org/p/chromium/issues/detail?id=1233143

Thanks for continuous work in improving Webkit.. Keep going strong!
Comment 1 Ryosuke Niwa 2022-07-31 12:00:03 PDT
lol, this is because of the following code:

void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const AtomString& value)
{
    if (name == srcdocAttr) {
        if (value.isNull()) {
            const AtomString& srcValue = attributeWithoutSynchronization(srcAttr);
            if (!srcValue.isNull())
                setLocation(stripLeadingAndTrailingHTMLSpaces(srcValue));
        } else
Comment 2 Ryosuke Niwa 2022-07-31 12:07:37 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2889
Comment 3 Radar WebKit Bug Importer 2022-07-31 18:40:06 PDT
<rdar://problem/97885726>
Comment 4 EWS 2022-07-31 19:03:36 PDT
Committed 252991@main (e540252620c9): <https://commits.webkit.org/252991@main>

Reviewed commits have been landed. Closing PR #2889 and removing active labels.