Bug 205995 - <iframe> attributes should be processed on "srcdoc" attribute removal
Summary: <iframe> attributes should be processed on "srcdoc" attribute removal
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Trivial
Assignee: Alexey Shvayka
Keywords: InRadar
Depends on:
Reported: 2020-01-09 03:07 PST by Alexey Shvayka
Modified: 2020-01-13 23:56 PST (History)
8 users (show)

See Also:

Patch (4.29 KB, patch)
2020-01-09 03:20 PST, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
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]

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