Skip to content

Commit

Permalink
Tie BarProp object lifetime to the Window object
Browse files Browse the repository at this point in the history
Also describe what happens when the browsing context is discarded.

Tests: web-platform-tests/wpt#15815.

Fixes #2579.
  • Loading branch information
annevk committed Mar 13, 2019
1 parent dafd8b1 commit 5a26b73
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -78443,8 +78443,7 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-personalbar">personalbar</span>;
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-scrollbars">scrollbars</span>;
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-statusbar">statusbar</span>;
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-toolbar">toolbar</span>;<!--
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-directories">directories</span>; // legacy (Gecko-only) -->
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-toolbar">toolbar</span>;
attribute DOMString <span data-x="dom-window-status">status</span>;
void <span data-x="dom-window-close">close</span>();
readonly attribute boolean <span data-x="dom-window-closed">closed</span>;
Expand Down Expand Up @@ -79203,7 +79202,6 @@ interface <dfn>BarProp</dfn> {
};</code></pre>

<dl class="domintro">

<dt><var>window</var> . <code subdfn data-x="dom-window-locationbar">locationbar</code> . <code subdfn data-x="dom-BarProp-visible">visible</code></dt>
<dd>
<p>Returns true if the location bar is visible; otherwise, returns false.</p>
Expand Down Expand Up @@ -79234,45 +79232,45 @@ interface <dfn>BarProp</dfn> {
<dd>
<p>Returns true if the toolbar is visible; otherwise, returns false.</p>
</dd>

</dl>

<div w-nodev>

<p>The <dfn data-x="dom-BarProp-visible">visible</dfn> attribute, on getting, must return either
true or a value determined by the user agent to most accurately represent the visibility state of
the user interface element that the object represents, as described below.</p>
<p>The <dfn data-x="dom-BarProp-visible">visible</dfn> attribute's getter must run these
steps:</p>

<p>The following <code>BarProp</code> objects exist for each <code>Document</code> object in a
<span>browsing context</span>. Some of the user interface elements represented by these objects
might have no equivalent in some user agents; for those user agents, except when otherwise
specified, the object must act as if it was present and visible (i.e. its <code
data-x="dom-BarProp-visible">visible</code> attribute must return true).</p>
<ol>
<li><p>If this <code>BarProp</code> object's <span>relevant global object</span>'s <span
data-x="window bc">browsing context</span> is null, then return false.

<dl>
<li><p>If the user agent does not have a user interface element that the object represents, as
described below, then return true.</p></li>

<dt><dfn>The location bar <code>BarProp</code> object</dfn></dt>
<li><p>Return true or a value determined by the user agent to most accurately represent the
visibility state of the user interface element that the object represents, as described
below.</p></li>
</ol>

<p>The following <code>BarProp</code> objects must exist for each <code>Window</code> object:</p>

<dl>
<dt><dfn>The location bar <code>BarProp</code> object</dfn></dt>
<dd>Represents the user interface element that contains a control that displays the
<span>URL</span> of the <span>active document</span>, or some similar interface concept.</dd>

<dt><dfn>The menu bar <code>BarProp</code> object</dfn></dt>

<dd>Represents the user interface element that contains a list of commands in menu form, or some
similar interface concept.</dd>

<dt><dfn>The personal bar <code>BarProp</code> object</dfn></dt>

<dd>Represents the user interface element that contains links to the user's favorite pages, or
some similar interface concept.</dd>

<dt><dfn>The scrollbar <code>BarProp</code> object</dfn></dt>

<dd>Represents the user interface element that contains a scrolling mechanism, or some similar
interface concept.</dd>

<dt><dfn>The status bar <code>BarProp</code> object</dfn></dt>

<dd>Represents a user interface element found immediately below or after the document, as
appropriate for the user's media, which typically provides information about ongoing network
activity or information about elements that the user's pointing device is current indicating. If
Expand All @@ -79281,14 +79279,12 @@ interface <dfn>BarProp</dfn> {
data-x="dom-BarProp-visible">visible</code> attribute may return false).</dd>

<dt><dfn>The toolbar <code>BarProp</code> object</dfn></dt>

<dd>Represents the user interface element found immediately above or before the document, as
appropriate for the user's media, which typically provides <span>session history</span> traversal
controls (back and forward buttons, reload buttons, etc). If the user agent has no such user
interface element, then the object may act as if the corresponding user interface element was
absent (i.e. its <code data-x="dom-BarProp-visible">visible</code> attribute may return
false).</dd>

</dl>

<p>The <dfn><code data-x="dom-window-locationbar">locationbar</code></dfn> attribute must return
Expand All @@ -79309,11 +79305,6 @@ interface <dfn>BarProp</dfn> {
<p>The <dfn><code data-x="dom-window-toolbar">toolbar</code></dfn> attribute must return <span>the
toolbar <code>BarProp</code> object</span>.</p>

<!--
<p>For legacy reasons, the <dfn><code data-x="dom-window-directories">directories</code></dfn>
attribute must also return <span>the personal bar <code>BarProp</code> object</span>.</p>
-->

<hr>

<p>For historical reasons, the <dfn><code data-x="dom-window-status">status</code></dfn> attribute
Expand Down

0 comments on commit 5a26b73

Please sign in to comment.