Changeset 284758 in webkit
- Timestamp:
- Oct 24, 2021 9:01:14 AM (9 months ago)
- Location:
- trunk
- Files:
-
- 5 added
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-lexical-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-lexical.html (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical-expected.txt (modified) (1 diff)
-
LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html (modified) (1 diff)
-
LayoutTests/http/tests/security/resources/parent-document-open.html (added)
-
LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-entry-document-incumbent-frame.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window-expected.txt (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.js (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/bindings/js/JSDOMWindowBase.cpp (modified) (1 diff)
-
Source/WebCore/bindings/js/JSDOMWindowBase.h (modified) (1 diff)
-
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (modified) (1 diff)
-
Source/WebCore/bindings/scripts/IDLAttributes.json (modified) (1 diff)
-
Source/WebCore/dom/Document+HTML.idl (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (8 diffs)
-
Source/WebCore/dom/Document.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r284754 r284758 1 2021-10-24 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 document.open() and friends use incorrect document as a source for reseted document's URL 4 https://bugs.webkit.org/show_bug.cgi?id=230131 5 6 Reviewed by Chris Dumez. 7 8 * http/tests/security/aboutBlank/security-context-grandchildren-lexical.html: 9 * http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html: 10 * http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html: 11 Tweak javascript: URLs to evaluate as `undefined` so the tests could be run in Firefox. 12 13 * http/tests/security/aboutBlank/security-context-grandchildren-lexical-expected.txt: 14 * http/tests/security/aboutBlank/security-context-grandchildren-write-lexical-expected.txt: 15 * http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical-expected.txt: 16 Align expectations with Blink and Gecko. 17 18 * http/tests/security/resources/parent-document-open.html: Added. 19 * http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml: 20 The test relied on behavior that wasn't spec-compliant, causing timeouts once document.open() is fixed. 21 This patch preserves the test semantics of calling document.open() with iframe's global object. 22 Similar Blink bug: crbug.com/579493. 23 1 24 2021-10-23 Rob Buis <rbuis@igalia.com> 2 25 -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-lexical-expected.txt
r280491 r284758 12 12 --- After document.open() --- 13 13 * "about:blank" 14 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html16 document.cookie = cookie= resources; cookie=parent14 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 16 document.cookie = cookie=parent 17 17 * "" 18 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html20 document.cookie = cookie= resources; cookie=parent18 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 20 document.cookie = cookie=parent 21 21 --- After document.close() --- 22 22 * "about:blank" 23 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html25 document.cookie = cookie= resources; cookie=parent23 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 25 document.cookie = cookie=parent 26 26 * "" 27 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html29 document.cookie = cookie= resources; cookie=parent27 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-lexical.html 29 document.cookie = cookie=parent 30 30 --- Test ends --- -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-lexical.html
r120174 r284758 27 27 "window.myclose = function(i) { frames[i].document.close(); };" + 28 28 "parent.log('Helpers loaded!\\n');" + 29 "parent.setTimeout('continueTest()', 10); ";29 "parent.setTimeout('continueTest()', 10); undefined;"; 30 30 } 31 31 -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical-expected.txt
r280491 r284758 12 12 --- After document.open() --- 13 13 * "about:blank" 14 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html16 document.cookie = cookie= resources; cookie=parent14 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 16 document.cookie = cookie=parent 17 17 * "" 18 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html20 document.cookie = cookie= resources; cookie=parent18 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 20 document.cookie = cookie=parent 21 21 --- After document.close() --- 22 22 * "about:blank" 23 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html25 document.cookie = cookie= resources; cookie=parent23 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 25 document.cookie = cookie=parent 26 26 * "" 27 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html29 document.cookie = cookie= resources; cookie=parent27 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-write-lexical.html 29 document.cookie = cookie=parent 30 30 --- Test ends --- -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
r120174 r284758 27 27 "window.myclose = function(i) { frames[i].document.close(); };" + 28 28 "parent.log('Helpers loaded!\\n');" + 29 "parent.setTimeout('continueTest()', 10); ";29 "parent.setTimeout('continueTest()', 10); undefined;"; 30 30 } 31 31 -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical-expected.txt
r280491 r284758 12 12 --- After document.open() --- 13 13 * "about:blank" 14 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html16 document.cookie = cookie= resources; cookie=parent14 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 15 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 16 document.cookie = cookie=parent 17 17 * "" 18 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html20 document.cookie = cookie= resources; cookie=parent18 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 19 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 20 document.cookie = cookie=parent 21 21 --- After document.close() --- 22 22 * "about:blank" 23 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html25 document.cookie = cookie= resources; cookie=parent23 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 24 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 25 document.cookie = cookie=parent 26 26 * "" 27 document.URL = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/ resources/iframe-with-about-blank-children.html29 document.cookie = cookie= resources; cookie=parent27 document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 28 document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 29 document.cookie = cookie=parent 30 30 --- Test ends --- -
trunk/LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
r120174 r284758 27 27 "window.myclose = function(i) { frames[i].document.close(); };" + 28 28 "parent.log('Helpers loaded!\\n');" + 29 "parent.setTimeout('continueTest()', 10); ";29 "parent.setTimeout('continueTest()', 10); undefined;"; 30 30 } 31 31 -
trunk/LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
r282103 r284758 18 18 victim.src = "http://localhost:8080/security/resources/innocent-victim.html"; 19 19 victim.onload = function() { wnd.eval("location = '" + location + "'"); } 20 } else if ( location != "about:blank") {20 } else if (!location.href.includes("parent-document-open.html")) { 21 21 url = location.href; 22 blank = document.body.appendChild(document.createElement("iframe")); 23 blank.contentWindow.eval("parent.document.open()"); 22 var parentDocOpen = document.createElement("iframe"); 23 parentDocOpen.src = "resources/parent-document-open.html"; 24 document.body.append(parentDocOpen); 25 setTimeout(() => { 24 26 location = "javascript:(\"\x3C?xml-stylesheet type='text/xsl' href='" + url + "'?\x3E\x3Croot/\x3E\")"; 27 }, 150); 25 28 } else { 26 29 try { -
trunk/LayoutTests/imported/w3c/ChangeLog
r284752 r284758 1 2021-10-24 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 document.open() and friends use incorrect document as a source for reseted document's URL 4 https://bugs.webkit.org/show_bug.cgi?id=230131 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub-expected.txt: 9 * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/url-entry-document-incumbent-frame.html: Added. 10 * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window-expected.txt: Added. 11 * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.html: Added. 12 * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.js: Added. 13 1 14 2021-10-23 Cameron McCormack <heycam@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-same-origin-domain.sub-expected.txt
r264035 r284758 1 1 2 FAIL It should not be possible to open same origin-domain (but not same origin) documents. assert_throws_dom: Opening a same origin-domain (but not same origin) document doesn't throw. function "function open() { 3 [native code] 4 }" did not throw 5 FAIL It should not be possible to implicitly open same origin-domain (but not same origin) documents. assert_throws_dom: Implicitly opening a same origin-domain (but not same origin) document doesn't throw. function "function write() { 6 [native code] 7 }" did not throw 2 PASS It should not be possible to open same origin-domain (but not same origin) documents. 3 PASS It should not be possible to implicitly open same origin-domain (but not same origin) documents. 8 4 -
trunk/Source/WebCore/ChangeLog
r284755 r284758 1 2021-10-24 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 document.open() and friends use incorrect document as a source for reseted document's URL 4 https://bugs.webkit.org/show_bug.cgi?id=230131 5 6 Reviewed by Chris Dumez. 7 8 With this patch, Document's open() / write() / writeln() methods receive entry global 9 object's document [1] as an argument, which is used to perform same-origin security check 10 and to set the URL of reseted document from. Aligns WebKit with Blink and Gecko. 11 12 Instead of maintaining consistency with FirstWindow, EntryDocument is named to match 13 the spec and because it's not always the "first" (topmost) document, but rather a document 14 of closest <script> or inline event handler. 15 16 ResponsibleDocument is removed because it's now unused and, in terms of implementation, 17 a poor man's IncumbentWindow. Also, the spec describes different concept by that name [2]. 18 19 [1] https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#opening-the-input-stream:entry-global-object 20 [2] https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document 21 22 Tests: http/tests/security/aboutBlank/security-context-grandchildren-lexical.html 23 http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html 24 http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html 25 imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/url-entry-document-sync-call.window.html 26 27 * bindings/js/JSDOMWindowBase.cpp: 28 (WebCore::responsibleDocument): Deleted. 29 * bindings/js/JSDOMWindowBase.h: 30 * bindings/scripts/CodeGeneratorJS.pm: 31 (GenerateCallWith): 32 * bindings/scripts/IDLAttributes.json: 33 * dom/Document+HTML.idl: 34 * dom/Document.cpp: 35 (WebCore::Document::open): 36 (WebCore::Document::write): 37 (WebCore::Document::writeln): 38 * dom/Document.h: 39 1 40 2021-10-24 Rob Buis <rbuis@igalia.com> 2 41 -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r284516 r284758 338 338 } 339 339 340 Document* responsibleDocument(VM& vm, CallFrame& callFrame)341 {342 CallerFunctor functor;343 callFrame.iterate(vm, functor);344 auto* callerFrame = functor.callerFrame();345 if (!callerFrame)346 return nullptr;347 return asJSDOMWindow(callerFrame->lexicalGlobalObject(vm))->wrapped().document();348 }349 350 340 void JSDOMWindowBase::fireFrameClearedWatchpointsForWindow(DOMWindow* window) 351 341 { -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h
r284080 r284758 132 132 DOMWindow& legacyActiveDOMWindowForAccessor(JSC::JSGlobalObject&); 133 133 134 // FIXME: This should probably be removed in favor of one of the other DOMWindow accessors. It is intended135 // to provide the document specfied as the 'responsible document' in the algorithm for document.open()136 // (https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-open-steps steps 4137 // and 23 and https://html.spec.whatwg.org/multipage/webappapis.html#responsible-document). It is only138 // used by JSDocument.139 Document* responsibleDocument(JSC::VM&, JSC::CallFrame&);140 141 134 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r284241 r284758 5966 5966 push(@callWithArgs, "*incumbentDocument"); 5967 5967 } 5968 if ($codeGenerator->ExtendedAttributeContains($callWith, " ResponsibleDocument")) {5968 if ($codeGenerator->ExtendedAttributeContains($callWith, "EntryDocument")) { 5969 5969 AddToImplIncludes("DOMWindow.h"); 5970 5970 AddToImplIncludes("JSDOMWindowBase.h"); 5971 push(@callWithArgs, " responsibleDocument(${globalObject}->vm(), $callFrameReference)");5971 push(@callWithArgs, "firstDOMWindow(*$globalObject).document()"); 5972 5972 } 5973 5973 if ($codeGenerator->ExtendedAttributeContains($callWith, "ActiveWindow")) { -
trunk/Source/WebCore/bindings/scripts/IDLAttributes.json
r284241 r284758 52 52 "CallWith": { 53 53 "contextsAllowed": ["attribute", "operation"], 54 "values": ["Document", "ExecState", "ScriptExecutionContext", "GlobalObject", "ActiveWindow", "FirstWindow", " ResponsibleDocument", "World", "PropertyName"],54 "values": ["Document", "ExecState", "ScriptExecutionContext", "GlobalObject", "ActiveWindow", "FirstWindow", "EntryDocument", "World", "PropertyName"], 55 55 "supportsConjunction": true 56 56 }, -
trunk/Source/WebCore/dom/Document+HTML.idl
r274832 r284758 59 59 // that the caller document matches those semantics. It is possible we should replace it with 60 60 // the existing 'incumbent document' concept. 61 [CEReactions, CallWith= ResponsibleDocument, ImplementedAs=openForBindings] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored.61 [CEReactions, CallWith=EntryDocument, ImplementedAs=openForBindings] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored. 62 62 [CallWith=ActiveWindow&FirstWindow, ImplementedAs=openForBindings] WindowProxy open(USVString url, DOMString name, DOMString features); 63 63 [CEReactions, ImplementedAs=closeForBindings] undefined close(); 64 [CEReactions, CallWith= ResponsibleDocument] undefined write(DOMString... text);65 [CEReactions, CallWith= ResponsibleDocument] undefined writeln(DOMString... text);64 [CEReactions, CallWith=EntryDocument] undefined write(DOMString... text); 65 [CEReactions, CallWith=EntryDocument] undefined writeln(DOMString... text); 66 66 67 67 // user interaction -
trunk/Source/WebCore/dom/Document.cpp
r284693 r284758 2918 2918 } 2919 2919 2920 ExceptionOr<Document&> Document::openForBindings(Document* responsibleDocument, const String&, const String&)2920 ExceptionOr<Document&> Document::openForBindings(Document* entryDocument, const String&, const String&) 2921 2921 { 2922 2922 if (!isHTMLDocument() || m_throwOnDynamicMarkupInsertionCount) 2923 2923 return Exception { InvalidStateError }; 2924 2924 2925 auto result = open( responsibleDocument);2925 auto result = open(entryDocument); 2926 2926 if (UNLIKELY(result.hasException())) 2927 2927 return result.releaseException(); … … 2930 2930 } 2931 2931 2932 ExceptionOr<void> Document::open(Document* responsibleDocument)2933 { 2934 if ( responsibleDocument && !responsibleDocument->securityOrigin().isSameOriginAs(securityOrigin()))2932 ExceptionOr<void> Document::open(Document* entryDocument) 2933 { 2934 if (entryDocument && !entryDocument->securityOrigin().isSameOriginAs(securityOrigin())) 2935 2935 return Exception { SecurityError }; 2936 2936 … … 2961 2961 removeAllEventListeners(); 2962 2962 2963 if ( responsibleDocument && isFullyActive()) {2964 auto newURL = responsibleDocument->url();2965 if ( responsibleDocument != this)2963 if (entryDocument && isFullyActive()) { 2964 auto newURL = entryDocument->url(); 2965 if (entryDocument != this) 2966 2966 newURL.removeFragmentIdentifier(); 2967 2967 setURL(newURL); 2968 auto newCookieURL = responsibleDocument->cookieURL();2969 if ( responsibleDocument != this)2968 auto newCookieURL = entryDocument->cookieURL(); 2969 if (entryDocument != this) 2970 2970 newCookieURL.removeFragmentIdentifier(); 2971 2971 setCookieURL(newCookieURL); 2972 setSecurityOriginPolicy( responsibleDocument->securityOriginPolicy());2972 setSecurityOriginPolicy(entryDocument->securityOriginPolicy()); 2973 2973 } 2974 2974 … … 3309 3309 } 3310 3310 3311 ExceptionOr<void> Document::write(Document* responsibleDocument, SegmentedString&& text)3311 ExceptionOr<void> Document::write(Document* entryDocument, SegmentedString&& text) 3312 3312 { 3313 3313 if (m_activeParserWasAborted) … … 3327 3327 3328 3328 if (!hasInsertionPoint) { 3329 auto result = open( responsibleDocument);3329 auto result = open(entryDocument); 3330 3330 if (UNLIKELY(result.hasException())) 3331 3331 return result.releaseException(); … … 3337 3337 } 3338 3338 3339 ExceptionOr<void> Document::write(Document* responsibleDocument, Vector<String>&& strings)3339 ExceptionOr<void> Document::write(Document* entryDocument, Vector<String>&& strings) 3340 3340 { 3341 3341 if (!isHTMLDocument() || m_throwOnDynamicMarkupInsertionCount) … … 3346 3346 text.append(WTFMove(string)); 3347 3347 3348 return write( responsibleDocument, WTFMove(text));3349 } 3350 3351 ExceptionOr<void> Document::writeln(Document* responsibleDocument, Vector<String>&& strings)3348 return write(entryDocument, WTFMove(text)); 3349 } 3350 3351 ExceptionOr<void> Document::writeln(Document* entryDocument, Vector<String>&& strings) 3352 3352 { 3353 3353 if (!isHTMLDocument() || m_throwOnDynamicMarkupInsertionCount) … … 3359 3359 3360 3360 text.append("\n"_s); 3361 return write( responsibleDocument, WTFMove(text));3361 return write(entryDocument, WTFMove(text)); 3362 3362 } 3363 3363 -
trunk/Source/WebCore/dom/Document.h
r284528 r284758 669 669 670 670 WEBCORE_EXPORT ExceptionOr<RefPtr<WindowProxy>> openForBindings(DOMWindow& activeWindow, DOMWindow& firstDOMWindow, const String& url, const AtomString& name, const String& features); 671 WEBCORE_EXPORT ExceptionOr<Document&> openForBindings(Document* responsibleDocument, const String&, const String&);671 WEBCORE_EXPORT ExceptionOr<Document&> openForBindings(Document* entryDocument, const String&, const String&); 672 672 673 673 // FIXME: We should rename this at some point and give back the name 'open' to the HTML specified ones. 674 WEBCORE_EXPORT ExceptionOr<void> open(Document* responsibleDocument = nullptr);674 WEBCORE_EXPORT ExceptionOr<void> open(Document* entryDocument = nullptr); 675 675 void implicitOpen(); 676 676 … … 688 688 void cancelParsing(); 689 689 690 ExceptionOr<void> write(Document* responsibleDocument, SegmentedString&&);691 WEBCORE_EXPORT ExceptionOr<void> write(Document* responsibleDocument, Vector<String>&&);692 WEBCORE_EXPORT ExceptionOr<void> writeln(Document* responsibleDocument, Vector<String>&&);690 ExceptionOr<void> write(Document* entryDocument, SegmentedString&&); 691 WEBCORE_EXPORT ExceptionOr<void> write(Document* entryDocument, Vector<String>&&); 692 WEBCORE_EXPORT ExceptionOr<void> writeln(Document* entryDocument, Vector<String>&&); 693 693 694 694 bool wellFormed() const { return m_wellFormed; }
Note: See TracChangeset
for help on using the changeset viewer.