Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge effective script origin into origin #925

Merged
merged 1 commit into from
Mar 30, 2016
Merged

Merge effective script origin into origin #925

merged 1 commit into from
Mar 30, 2016

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 23, 2016

This aligns our definition with that of contemporary implementations,
whose origin model makes a whole lot more sense.

Origins are shared across documents and have a single mutable field,
called domain. Then they have two comparison operations, "same
origin" and "same origin-domain". The latter is used where we used
to compare effective script origins.

This change also does away with the "other fields" notion of tuples.
Such extensions now need to be standardized.

This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27378.

@annevk annevk added the clarification Standard could be clearer label Mar 23, 2016
@domenic
Copy link
Member

domenic commented Mar 23, 2016

Can you rebase? Probably my script settings stuff conflicted.

@annevk
Copy link
Member Author

annevk commented Mar 23, 2016

Done.


<dl>
<dt>An <dfn data-export="" data-x="concept-origin-opaque-identifier">opaque identifier</dfn></dt>
<dd><p>An internal values, with no serialisation, for which the only meaningful operation is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/values/value

@@ -78161,16 +78160,6 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dl>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wherever the below says "globally unique identifier" should probably be changed to "opaque identifier" and linked. ("unique [opaque identifier]"?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A unique opaque origin. I like that. Maybe that solves https://www.w3.org/Bugs/Public/show_bug.cgi?id=28675. @SimonSapin, what do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(We decided elsewhere to rename "opaque identifier" to "opaque origin".)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Opaque origin" sounds good. It matches what I had ended up with previously:

pub enum Origin {
    /// A globally unique identifier
    Opaque(OpaqueOrigin),

    /// Consists of the URL's scheme, host and port
    Tuple(String, Host<String>, u16)
}

@annevk
Copy link
Member Author

annevk commented Mar 24, 2016

Addressed review and a major bug.

@annevk
Copy link
Member Author

annevk commented Mar 24, 2016

Mention https://www.w3.org/Bugs/Public/show_bug.cgi?id=28675 in the commit message.

<span>origin</span> that, through appropriate manipulation of the <code
data-x="dom-document-domain">document.domain</code> attribute, could be made to be <span>same
origin-domain</span> with other members of the group, but could not be made the same as members of
any other group. Each such group is a <dfn>unit of related similar-origin browsing
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add data-export="" here since this is being reformatted anyway.

<p class="example">The <span data-x="Unicode serialisation of an origin">Unicode
serialisation</span> of ("<code data-x="">https</code>", "<code
data-x="">xn--maraa-rta.example</code>", null, null) is "<code
data-x="">https://maraña.example</code>".</p>

<p>The <dfn>ASCII serialisation of an origin</dfn> is the string obtained by applying the
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add data-export="" here and above.

@annevk
Copy link
Member Author

annevk commented Mar 28, 2016

Ping.

change as well.</p>
<ol>
<li><p>If <var>origin</var> is an <span data-x="concept-origin-opaque">opaque origin</span>, then
return <span>origin</span>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var, not span

This aligns our definition with that of contemporary implementations,
whose origin model makes a whole lot more sense.

Origins are shared across documents and have a single mutable field,
called domain. Then they have two comparison operations, "same
origin" and "same origin-domain". The latter is used where we used
to compare effective script origins.

This change also does away with the "other fields" notion of tuples.
Such extensions now need to be standardized.

This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27378 and
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28675.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

Successfully merging this pull request may close these issues.

3 participants