Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) Oops, forgot to center the <dialog> element vertically whe…
…n it is not anchored.

Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@7051 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 11, 2012
1 parent 2fb24fc commit 1873e1c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 11 deletions.
28 changes: 24 additions & 4 deletions complete.html
Expand Up @@ -56656,8 +56656,9 @@ <h4 id=the-dialog-element><span class=secno>4.11.6 </span>The <dfn><code>dialog<

<li><p>If the <code title=dom-dialog-show><a href=#dom-dialog-show>show()</a></code> method
was invoked with an argument, <a href=#set-up-the-position>set up the position</a> of
the <code><a href=#the-dialog-element>dialog</a></code> element, using that argument as the
anchor.</li>
the <code><a href=#the-dialog-element>dialog</a></code> element, using that argument as the anchor.
Otherwise, <a href=#set-up-the-default-static-position>set up the default static position</a> of the
dialog element.</li>

</ol><hr><p>Each <code><a href=#document>Document</a></code> has a stack of <code><a href=#the-dialog-element>dialog</a></code>
elements known as the <dfn id=pending-dialog-stack>pending dialog stack</dfn>. When a
Expand Down Expand Up @@ -56691,7 +56692,8 @@ <h4 id=the-dialog-element><span class=secno>4.11.6 </span>The <dfn><code>dialog<
<li><p>If the <code title=dom-dialog-showModal><a href=#dom-dialog-showmodal>showModal()</a></code>
method was invoked with an argument, <a href=#set-up-the-position>set up the
position</a> of <var title="">dialog</var>, using that argument
as the anchor.</li>
as the anchor. Otherwise, <a href=#set-up-the-default-static-position>set up the default static
position</a> of the dialog element.</li>

<li><p>Let <var title="">dialog</var>'s <code><a href=#document>Document</a></code> be
<a href=#blocked-by-a-modal-dialog title="blocked by a modal dialog">blocked by the modal
Expand Down Expand Up @@ -56781,7 +56783,25 @@ <h4 id=the-dialog-element><span class=secno>4.11.6 </span>The <dfn><code>dialog<
<p class=note>An example of such a UI mechanism would be the user
pressing the "Escape" key.</p>

<hr><p>When a user agent is to <dfn id=set-up-the-position>set up the position</dfn> of an
<hr><p>When a user agent is to <dfn id=set-up-the-default-static-position>set up the default static
position</dfn> of an element <var title="">dialog</var> without an
anchor, it must set up the element such that its top static
position, for the purposes of calculating the used value of the
'top' property, is the value that would place the element's top
margin edge as far from the top of the viewport as the element's
bottom margin edge from the bottom of the viewport, if the element's
height is less than the height of the viewport, and otherwise is the
value that would place the element's top margin edge at the top of
the viewport.</p>

<p>This top static position must remain the element's top static
position until it is next changed by the above algorithm or the next
one. (The element's static position is only used in calculating the
used value of the 'top' property in certain situations; it's not
used, for instance, to position the element if its 'position'
property is set to 'static'.)</p>

<p>When a user agent is to <dfn id=set-up-the-position>set up the position</dfn> of an
element <var title="">dialog</var> using an anchor <var title="">anchor</var>, it must run the following steps:</p>

<ol><li>
Expand Down
28 changes: 24 additions & 4 deletions index
Expand Up @@ -56656,8 +56656,9 @@ fur

<li><p>If the <code title=dom-dialog-show><a href=#dom-dialog-show>show()</a></code> method
was invoked with an argument, <a href=#set-up-the-position>set up the position</a> of
the <code><a href=#the-dialog-element>dialog</a></code> element, using that argument as the
anchor.</li>
the <code><a href=#the-dialog-element>dialog</a></code> element, using that argument as the anchor.
Otherwise, <a href=#set-up-the-default-static-position>set up the default static position</a> of the
dialog element.</li>

</ol><hr><p>Each <code><a href=#document>Document</a></code> has a stack of <code><a href=#the-dialog-element>dialog</a></code>
elements known as the <dfn id=pending-dialog-stack>pending dialog stack</dfn>. When a
Expand Down Expand Up @@ -56691,7 +56692,8 @@ fur
<li><p>If the <code title=dom-dialog-showModal><a href=#dom-dialog-showmodal>showModal()</a></code>
method was invoked with an argument, <a href=#set-up-the-position>set up the
position</a> of <var title="">dialog</var>, using that argument
as the anchor.</li>
as the anchor. Otherwise, <a href=#set-up-the-default-static-position>set up the default static
position</a> of the dialog element.</li>

<li><p>Let <var title="">dialog</var>'s <code><a href=#document>Document</a></code> be
<a href=#blocked-by-a-modal-dialog title="blocked by a modal dialog">blocked by the modal
Expand Down Expand Up @@ -56781,7 +56783,25 @@ fur
<p class=note>An example of such a UI mechanism would be the user
pressing the "Escape" key.</p>

<hr><p>When a user agent is to <dfn id=set-up-the-position>set up the position</dfn> of an
<hr><p>When a user agent is to <dfn id=set-up-the-default-static-position>set up the default static
position</dfn> of an element <var title="">dialog</var> without an
anchor, it must set up the element such that its top static
position, for the purposes of calculating the used value of the
'top' property, is the value that would place the element's top
margin edge as far from the top of the viewport as the element's
bottom margin edge from the bottom of the viewport, if the element's
height is less than the height of the viewport, and otherwise is the
value that would place the element's top margin edge at the top of
the viewport.</p>

<p>This top static position must remain the element's top static
position until it is next changed by the above algorithm or the next
one. (The element's static position is only used in calculating the
used value of the 'top' property in certain situations; it's not
used, for instance, to position the element if its 'position'
property is set to 'static'.)</p>

<p>When a user agent is to <dfn id=set-up-the-position>set up the position</dfn> of an
element <var title="">dialog</var> using an anchor <var title="">anchor</var>, it must run the following steps:</p>

<ol><li>
Expand Down
26 changes: 23 additions & 3 deletions source
Expand Up @@ -66141,8 +66141,9 @@ fur

<li><p>If the <code title="dom-dialog-show">show()</code> method
was invoked with an argument, <span>set up the position</span> of
the <code>dialog</code> element, using that argument as the
anchor.</p></li>
the <code>dialog</code> element, using that argument as the anchor.
Otherwise, <span>set up the default static position</span> of the
dialog element.</p></li>

</ol>

Expand Down Expand Up @@ -66185,7 +66186,8 @@ fur
<li><p>If the <code title="dom-dialog-showModal">showModal()</code>
method was invoked with an argument, <span>set up the
position</span> of <var title="">dialog</var>, using that argument
as the anchor.</p></li>
as the anchor. Otherwise, <span>set up the default static
position</span> of the dialog element.</p></li>

<li><p>Let <var title="">dialog</var>'s <code>Document</code> be
<span title="blocked by a modal dialog">blocked by the modal
Expand Down Expand Up @@ -66305,6 +66307,24 @@ fur

<hr>

<p>When a user agent is to <dfn>set up the default static
position</dfn> of an element <var title="">dialog</var> without an
anchor, it must set up the element such that its top static
position, for the purposes of calculating the used value of the
'top' property, is the value that would place the element's top
margin edge as far from the top of the viewport as the element's
bottom margin edge from the bottom of the viewport, if the element's
height is less than the height of the viewport, and otherwise is the
value that would place the element's top margin edge at the top of
the viewport.</p>

<p>This top static position must remain the element's top static
position until it is next changed by the above algorithm or the next
one. (The element's static position is only used in calculating the
used value of the 'top' property in certain situations; it's not
used, for instance, to position the element if its 'position'
property is set to 'static'.)</p>

<p>When a user agent is to <dfn>set up the position</dfn> of an
element <var title="">dialog</var> using an anchor <var
title="">anchor</var>, it must run the following steps:</p>
Expand Down

0 comments on commit 1873e1c

Please sign in to comment.