Skip to content
This repository was archived by the owner on Jun 7, 2018. It is now read-only.

Commit 6d2ddc9

Browse files
committed
Fix references to current browsing context and active document
As described in #183, the active document of a browsing context need not be same-origin with the code calling the constructors/methods. This patch fixes this to refer instead to the document of the current global object.
1 parent ababd6f commit 6d2ddc9

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Overview.bs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ urlPrefix: http://www.ecma-international.org/ecma-262/6.0/#sec-; type: dfn; spec
7777
text: [[Get]]; url: ordinary-object-internal-methods-and-internal-slots-get-p-receiver
7878
urlPrefix: https://html.spec.whatwg.org/multipage/browsers.html; type: dfn; spec: html
7979
text: active document
80+
text: document associated with a window; url: concept-document-window
8081
text: an entry with persisted user state
8182
text: browsing context
8283
text: session history entry
@@ -592,7 +593,7 @@ when its <a>time value</a> is <a>unresolved</a>.
592593
<h4 id="document-timelines">Document timelines</h4>
593594

594595
A <dfn>document timeline</dfn> is a type of <a>timeline</a> that is associated
595-
with a document.
596+
with a {{Document}}.
596597

597598
The <a>time values</a> of a <a>document timeline</a> are calculated
598599
as a fixed offset from the <a>global clock</a> such that the <a>zero
@@ -603,13 +604,13 @@ signed delta known as the <dfn>origin time</dfn>.
603604
Prior to establishing the <code>navigationStart</code> moment, the <a>document
604605
timeline</a> is <a lt="inactive timeline">inactive</a>.
605606

606-
A <a>document timeline</a> that is associated with a document which is not
607+
A <a>document timeline</a> that is associated with a {{Document}} which is not
607608
an <a>active document</a> is also considered to be
608609
<a lt="inactive timeline">inactive</a>.
609610

610611
<h4 id="the-documents-default-timeline">The default document timeline</h4>
611612

612-
Each <a>document</a> has a <a>document timeline</a> called the <dfn>default
613+
Each {{Document}} has a <a>document timeline</a> called the <dfn>default
613614
document timeline</dfn>.
614615
The <a>default document timeline</a> is unique to each document and persists for
615616
the lifetime of the document including calls to <a>document.open()</a> [[!HTML]].
@@ -2581,9 +2582,8 @@ Note: While the time spaces themselves are not bounded, Web
25812582

25822583
In addition to these time spaces we can also refer to the
25832584
<em>document time space</em> which is time space of the <a>time
2584-
values</a> of the <a>default document timeline</a> of the <a
2585-
href="http://www.w3.org/TR/html5/browsers.html#active-document">active
2586-
document</a>.
2585+
values</a> of the <a>default document timeline</a> of the
2586+
{{Document}} of the <a>current global object</a>
25872587

25882588
</div>
25892589

@@ -4728,7 +4728,7 @@ interface AnimationTimeline {
47284728
<h3 id="the-documenttimeline-interface">The <code>DocumentTimeline</code> interface</h3>
47294729

47304730
<a>Document timelines</a>, including the <a>default document
4731-
timeline</a> are represented in the Web Animations API by the
4731+
timeline</a>, are represented in the Web Animations API by the
47324732
{{DocumentTimeline}} interface.
47334733

47344734
<pre class="idl">
@@ -4748,16 +4748,18 @@ interface DocumentTimeline : AnimationTimeline {
47484748
milliseconds relative to <a
47494749
href="http://www.w3.org/TR/navigation-timing/#dom-performancetiming-navigationstart">
47504750
<code>navigationStart</code></a> moment [[!NAVIGATION-TIMING]] of
4751-
the <a>active document</a> for the current <a>browsing context</a>.
4751+
the document with which the timeline is associated.
47524752

47534753
</div>
47544754

47554755
<div class='constructors'>
47564756

47574757
: <dfn constructor for=DocumentTimeline
47584758
lt="DocumentTimeline(options)">DocumentTimeline (options)</dfn>
4759-
:: Creates a new {{DocumentTimeline}} object associated with the <a>active
4760-
document</a> of the current <a>browsing context</a>.
4759+
:: Creates a new {{DocumentTimeline}}.
4760+
The {{Document}} with which the timeline is associated is the
4761+
{{Document}} <a lt="document associated with a window">associated</a>
4762+
with the {{Window}} that is the <a>current global object</a>.
47614763

47624764
<div class='parameters'>
47634765

@@ -4811,8 +4813,9 @@ interface Animation : EventTarget {
48114813
2. Run the procedure to <a>set the timeline of an animation</a> on
48124814
<var>animation</var> passing <var>timeline</var> as the <var>new
48134815
timeline</var> or, if a <var>timeline</var> argument is not provided,
4814-
passing the <a>default document timeline</a> of the <a>active
4815-
document</a>.
4816+
passing the <a>default document timeline</a> of the {{Document}}
4817+
<a lt="document associated with a window">associated</a> with the
4818+
{{Window}} that is the <a>current global object</a>.
48164819
3. Run the procedure to <a>set the target effect of an animation</a> on
48174820
<var>animation</var> passing <var>source</var> as the <var>new
48184821
effect</var>.
@@ -4830,7 +4833,8 @@ interface Animation : EventTarget {
48304833
:: An optional value which, if provided, specifies the <a>timeline</a>
48314834
with which to associate the newly-created <a>animation</a>.
48324835
If not provided, the <a>default document timeline</a> of the
4833-
<a>active document</a> is used.
4836+
{{Document}} <a lt="document associated with a window">associated</a>
4837+
with the {{Window}} that is the <a>current global object</a> is used.
48344838

48354839
</div>
48364840

0 commit comments

Comments
 (0)