Issue metadata
Sign in to add a comment
|
document.open() may modify a document's URL even in bailout cases |
||||||||||||||||||||||||
Issue descriptionCurrent implementation does not check Step 6. and 7. of document open steps in accurate order, so Document's url is modified before checking them resulting in making side effect on ignoring opening operations. Document open steps of HTML standard: https://html.spec.whatwg.org/C/dynamic-markup-insertion.html#document-open-steps To solve this issue, it is needed to make new private or protected method Document::Open() that implements opening operation from step 8. Step 1. to step 7. will be checked in other methods, some Document::open() with different args.
,
Aug 21
,
Aug 21
,
Aug 22
I have found actual reproduction cases for this. See - https://chromium.googlesource.com/chromium/src/+/refs/changes/70/1182370/5/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-ignore-opens-during-unload.window.js - https://chromium.googlesource.com/chromium/src/+/refs/changes/70/1182370/5/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-synchronous-script.window.js Thus reopening. Fix is on the way.
,
Aug 22
,
Aug 23
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e28c32faf9874693a274912fd4b59ba1bee05425 commit e28c32faf9874693a274912fd4b59ba1bee05425 Author: Timothy Gu <timothygu@chromium.org> Date: Thu Aug 23 04:18:07 2018 Align Document::open() and close() further with the spec A few checks were moved from open() to open(Document*, ScriptState&) to conform to the order of execution laid out by the HTML Standard. Web Platform Tests were added to ensure the fixes stick. In particular, this ensures there is no side effects in a document.open() call that bailed early. Document::SetContent() is amended so that write() and close() are not called if open() bails out early. Comments were added for better correspondence with the specification. Bug: 866274, 875735 Change-Id: I14badd991bb723254f8889ba4073aff19126c7ba Reviewed-on: https://chromium-review.googlesource.com/1182370 Reviewed-by: Hayato Ito <hayato@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Timothy Gu <timothygu@chromium.org> Cr-Commit-Position: refs/heads/master@{#585394} [modify] https://crrev.com/e28c32faf9874693a274912fd4b59ba1bee05425/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-ignore-opens-during-unload.window.js [modify] https://crrev.com/e28c32faf9874693a274912fd4b59ba1bee05425/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/bailout-side-effects-synchronous-script.window.js [modify] https://crrev.com/e28c32faf9874693a274912fd4b59ba1bee05425/third_party/blink/renderer/core/dom/document.cc
,
Aug 23
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by timothygu@chromium.org
, Aug 21Components: Blink>HTML
Labels: Hotlist-Interop