Ignore:
Timestamp:
Jul 26, 2021, 11:42:22 AM (4 years ago)
Author:
Chris Dumez
Message:

XML documents end up with a unique origin in WebKit only
https://bugs.webkit.org/show_bug.cgi?id=228254

Reviewed by Darin Adler.

Source/WebCore:

XML documents end up with a unique origin in WebKit only. They have a regular origin in Blink and Firefox.
This patch is aligning our behavior with other browsers.

Test: http/tests/misc/xml-document-origin.html

  • xml/XMLTreeViewer.cpp:

(WebCore::XMLTreeViewer::transformDocumentToTreeView):

LayoutTests:

Add layout test coverage.

  • http/tests/misc/xml-document-origin-expected.txt: Added.
  • http/tests/misc/xml-document-origin.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/xml/XMLTreeViewer.cpp

    r253519 r280300  
    5454void XMLTreeViewer::transformDocumentToTreeView()
    5555{
    56     m_document.setSecurityOriginPolicy(SecurityOriginPolicy::create(SecurityOrigin::createUnique()));
    57 
    5856    String scriptString = StringImpl::createWithoutCopying(XMLViewer_js, sizeof(XMLViewer_js));
    5957    m_document.frame()->script().evaluateIgnoringException(ScriptSourceCode(scriptString));
Note: See TracChangeset for help on using the changeset viewer.