Bug 205995

Summary: <iframe> attributes should be processed on "srcdoc" attribute removal
Product: WebKit Reporter: Alexey Shvayka <ashvayka>
Component: WebCore JavaScriptAssignee: Alexey Shvayka <ashvayka>
Status: RESOLVED FIXED    
Severity: Trivial CC: cdumez, commit-queue, darin, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Alexey Shvayka 2020-01-09 03:07:01 PST
Per spec, "srcdoc" attribute of an <iframe> takes precedence over "src".
However, existing handling of "srcdoc" in HTMLFrameElementBase::parseAttribute does not check if the attribute was set or removed.
As a result, removal of "srcdoc" attribute navigates the <iframe> to "about:srcdoc" instead of URL in value of "src" attribute.

WHATWG HTML: https://html.spec.whatwg.org/multipage/iframe-embed-object.html#otherwise-steps-for-iframe-or-frame-elements
Comment 1 Alexey Shvayka 2020-01-09 03:20:50 PST
Created attachment 387212 [details]
Patch
Comment 2 WebKit Commit Bot 2020-01-13 23:54:36 PST
The commit-queue encountered the following flaky tests while processing attachment 387212 [details]:

editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org)
The commit-queue is continuing to process your patch.
Comment 3 WebKit Commit Bot 2020-01-13 23:55:06 PST
Comment on attachment 387212 [details]
Patch

Clearing flags on attachment: 387212

Committed r254498: <https://trac.webkit.org/changeset/254498>
Comment 4 WebKit Commit Bot 2020-01-13 23:55:08 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2020-01-13 23:56:15 PST
<rdar://problem/58559565>