Skip to content

Commit

Permalink
Remove the extra secure context check
Browse files Browse the repository at this point in the history
Remove the secure context check from abstract operations since
the Sensor interface has [SecureContext] attribute.

Fixes #314
  • Loading branch information
Mikhail Pozdnyakov committed Oct 16, 2017
1 parent 4e33f75 commit aaca8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 0 additions & 2 deletions index.bs
Expand Up @@ -1146,8 +1146,6 @@ Gets the {{DOMException}} object passed to {{SensorErrorEventInit}}.
: output
:: A {{Sensor}} object.

1. If the [=current settings object=] is not a [=secure context=], then:
1. [=Throw=] a {{SecurityError}} {{DOMException}}.
1. If the [=browsing context=] is not a [=top-level browsing context=], then:
1. [=Throw=] a {{SecurityError}} {{DOMException}}.
1. Let |sensor_instance| be a new {{Sensor}} object,
Expand Down
17 changes: 5 additions & 12 deletions index.html
Expand Up @@ -1183,7 +1183,7 @@
background-attachment: fixed;
}
</style>
<meta content="Bikeshed version 2d63ad75df4c3282ed7d8d3fb42b0c483a131ce1" name="generator">
<meta content="Bikeshed version ba473502a120361710488ab9b7f538b47858631e" name="generator">
<link href="https://www.w3.org/TR/generic-sensor/" rel="canonical">
<style>
emu-val {
Expand Down Expand Up @@ -1458,7 +1458,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Generic Sensor API</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-10-13">13 October 2017</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-10-16">16 October 2017</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
Expand Down Expand Up @@ -2390,17 +2390,11 @@ <h3 class="heading settled" data-dfn-type="dfn" data-export="" data-level="8.1"
<p>A <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor①⑦">Sensor</a></code> object.</p>
</dl>
<ol>
<li data-md="">
<p>If the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object" id="ref-for-current-settings-object">current settings object</a> is not a <a data-link-type="dfn" href="https://w3c.github.io/webappsec-secure-contexts/#secure-context" id="ref-for-secure-context①">secure context</a>, then:</p>
<ol>
<li data-md="">
<p><a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw" id="ref-for-dfn-throw">Throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror">SecurityError</a></code> <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException⑤">DOMException</a></code>.</p>
</ol>
<li data-md="">
<p>If the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context" id="ref-for-browsing-context⑧">browsing context</a> is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context" id="ref-for-top-level-browsing-context⑤">top-level browsing context</a>, then:</p>
<ol>
<li data-md="">
<p><a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw" id="ref-for-dfn-throw">Throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror">SecurityError</a></code> <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
<p><a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw" id="ref-for-dfn-throw">Throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror">SecurityError</a></code> <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
</ol>
<li data-md="">
<p>Let <var>sensor_instance</var> be a new <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor①⑧">Sensor</a></code> object,</p>
Expand Down Expand Up @@ -2527,7 +2521,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-level="8.5" dat
<li data-md="">
<p>Invoke <a data-link-type="dfn" href="#deactivate-a-sensor-object" id="ref-for-deactivate-a-sensor-object②">deactivate a sensor object</a> with <var>s</var> as argument.</p>
<li data-md="">
<p>let <var>e</var> be the result of <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-exception" id="ref-for-dfn-create-exception②">creating</a> a "<code class="idl"><a class="idl-code" data-link-type="exception" href="https://heycam.github.io/webidl/#notallowederror" id="ref-for-notallowederror①">NotAllowedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
<p>let <var>e</var> be the result of <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-exception" id="ref-for-dfn-create-exception②">creating</a> a "<code class="idl"><a class="idl-code" data-link-type="exception" href="https://heycam.github.io/webidl/#notallowederror" id="ref-for-notallowederror①">NotAllowedError</a></code>" <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
<li data-md="">
<p>Queue a task to run <a data-link-type="dfn" href="#notify-error" id="ref-for-notify-error②">notify error</a> with <var>e</var> and <var>s</var> as arguments.</p>
</ol>
Expand Down Expand Up @@ -2745,7 +2739,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-level="8.12" da
<dd data-md="">
<p><var>sensor_instance</var>, a <code class="idl"><a data-link-type="idl" href="#sensor" id="ref-for-sensor②⑦">Sensor</a></code> object.</p>
<dd data-md="">
<p><var>error</var>, a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
<p><var>error</var>, a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DOMException" id="ref-for-idl-DOMException">DOMException</a></code>.</p>
<dt data-md="">output
<dd data-md="">
<p>None</p>
Expand Down Expand Up @@ -3304,7 +3298,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler">EventHandler</a>
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a>
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context">browsing context</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object">current settings object</a>
<li><a href="https://html.spec.whatwg.org/multipage/interaction.html#currently-focused-area-of-a-top-level-browsing-context">currently focused area</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers">event handler</a>
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-event-type">event handler event type</a>
Expand Down

0 comments on commit aaca8b2

Please sign in to comment.