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

Snapshot the allowpaymentrequest attribute #2195

Merged
merged 4 commits into from
Jan 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -28485,7 +28485,9 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
has a <span>nested browsing context</span>, the user agent must <span data-x="parse a sandboxing
directive">parse the sandboxing directive</span> using the attribute's value as the
<var>input</var> and the <code>iframe</code> element's <span>nested browsing context</span>'s
<span><code>iframe</code> sandboxing flag set</span> as the output.</p>
<span><code>iframe</code> sandboxing flag set</span> as the output. If the <code>iframe</code> has
an <code data-x="attr-iframe-allowpaymentrequest">allowpaymentrequest</code> attribute, then set
Copy link
Member Author

@zcorpan zcorpan Dec 23, 2016

Choose a reason for hiding this comment

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

Hmm, I put this here because it was here in 9f6b91c but this doesn't make sense. It needs to be in https://html.spec.whatwg.org/#initialise-the-document-object I think.

edit: and https://html.spec.whatwg.org/#creating-a-new-browsing-context

the <var>allowpaymentrequest flag</var>.</p>

<p>When an <code>iframe</code> element's <code data-x="attr-iframe-sandbox">sandbox</code>
attribute is removed while it has a non-null <span>nested browsing context</span>, the user agent
Expand Down Expand Up @@ -28615,11 +28617,37 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> is a
<span>top-level browsing context</span>, then return true.</p></li>

<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has a
<span>browsing context container</span> that is an <code>iframe</code> element with an
<var>allowattribute</var> attribute specified, and whose <span>node document</span> is
<span>allowed to use</span> the feature indicated by <var>allowattribute</var>, then return
true.</p></li>
<li>
<p>If <var>allowattribute</var> is <code
data-x="attr-iframe-allowfullscreen">allowfullscreen</code> or <code
data-x="attr-iframe-allowusermedia">allowusermedia</code>, then follow these substeps:</p>

<ol>
<li><p>If <var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has
a <span>browsing context container</span> that is an <code>iframe</code> element with an
<var>allowattribute</var> attribute specified, and whose <span>node document</span> is
<span>allowed to use</span> the feature indicated by <var>allowattribute</var>, then return
true.</p></li>
</ol>

<p class="big-issue">This step is legacy behavior that should not be used for new features. If
possible this behavior will go away for the <code
Copy link
Member

Choose a reason for hiding this comment

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

We should remove allowusermedia from this message. I'll add a commit.

data-x="attr-iframe-allowfullscreen">allowfullscreen</code> and <code
data-x="attr-iframe-allowusermedia">allowusermedia</code> attributes as well, see <a
href="https://github.com/whatwg/html/issues/2143#issuecomment-265514585">issue 2143</a>.</p>
</li>

<li>
<p>Otherwise, follow these substeps:</p>

<ol>
<li><p>If <var>document</var> has the <var><var>allowattribute</var> flag</var> set, and
Copy link
Member Author

Choose a reason for hiding this comment

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

The nested var here is maybe a bit unclear? Any ideas? Adding "«" and "»" before/after with CSS helps I think...

Copy link
Member

Choose a reason for hiding this comment

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

Wasn't it <var>allow<var>attribute</var> flag</var> elsewhere? That was reasonbly clear I thought.

Copy link
Member Author

Choose a reason for hiding this comment

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

Where?

Copy link
Member

Choose a reason for hiding this comment

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

I guess I was misremembering. Some CSS solution is probably good; not sure I'd use those quotes though since we use them to denote Infra lists.

Copy link
Member Author

Choose a reason for hiding this comment

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

<var>document</var>'s <span data-x="concept-document-bc">browsing context</span> has a
<span>browsing context container</span> that is an <code>iframe</code> element whose
<span>node document</span> is <span>allowed to use</span> the feature indicated by
<var>allowattribute</var>, then return true.</p></li>
</ol>
</li>

<li><p>Return false.</p></li>
</ol>
Expand Down