Bug 158987 - Move shouldInheritSecurityOriginFromOwner() from URL to Document
Summary: Move shouldInheritSecurityOriginFromOwner() from URL to Document
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 09:39 PDT by John Wilander
Modified: 2016-07-08 17:29 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.82 KB, patch)
2016-07-08 12:11 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2016-06-21 09:39:46 PDT
We should move shouldInheritSecurityOriginFromOwner from URL to SecurityOrigin to keep the URL class free of policy decisions and the notion of origins.
Comment 1 Daniel Bates 2016-07-08 12:10:51 PDT
I suggest that we move URL::shouldInheritSecurityOriginFromOwner() back to Document because it implements the origin inheritance policy for Document objects per section Origin of the HTML5 spec., <https://html.spec.whatwg.org/multipage/browsers.html#origin> (8 July 2016). This policy is only applicable to Documents.
Comment 2 Daniel Bates 2016-07-08 12:11:37 PDT
Created attachment 283186 [details]
Patch
Comment 3 Daniel Bates 2016-07-08 12:17:10 PDT
Although Darin Adler suggested that in comment 22, bug 158855 that we move shouldInheritSecurityOriginFromOwner() to SecurityOrigin.h, I choose to move it to Document because the policy shouldInheritSecurityOriginFromOwner() implements is only applicable to Document objects by <https://html.spec.whatwg.org/multipage/browsers.html#origin> and this function is only used in Document.cpp (as expected given that it is only applicable to Document objects).
Comment 4 Alex Christensen 2016-07-08 12:18:02 PDT
It definitely shouldn't be in URL
Comment 5 Daniel Bates 2016-07-08 17:29:04 PDT
Comment on attachment 283186 [details]
Patch

Clearing flags on attachment: 283186

Committed r203013: <http://trac.webkit.org/changeset/203013>
Comment 6 Daniel Bates 2016-07-08 17:29:09 PDT
All reviewed patches have been landed.  Closing bug.