[html5] r7051 - [giow] (0) Oops, forgot to center the <dialog> element vertically when it is not [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Apr 11 16:22:17 PDT 2012
Author: ianh
Date: 2012-04-11 16:22:15 -0700 (Wed, 11 Apr 2012)
New Revision: 7051
Modified:
complete.html
index
source
Log:
[giow] (0) Oops, forgot to center the <dialog> element vertically when it is not anchored.
Affected topics: DOM APIs, HTML
Modified: complete.html
===================================================================
--- complete.html 2012-04-11 00:42:25 UTC (rev 7050)
+++ complete.html 2012-04-11 23:22:15 UTC (rev 7051)
@@ -56656,8 +56656,9 @@
<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
@@ -56691,7 +56692,8 @@
<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
@@ -56781,7 +56783,25 @@
<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>
Modified: index
===================================================================
--- index 2012-04-11 00:42:25 UTC (rev 7050)
+++ index 2012-04-11 23:22:15 UTC (rev 7051)
@@ -56656,8 +56656,9 @@
<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
@@ -56691,7 +56692,8 @@
<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
@@ -56781,7 +56783,25 @@
<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>
Modified: source
===================================================================
--- source 2012-04-11 00:42:25 UTC (rev 7050)
+++ source 2012-04-11 23:22:15 UTC (rev 7051)
@@ -66141,8 +66141,9 @@
<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>
@@ -66185,7 +66186,8 @@
<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
@@ -66305,6 +66307,24 @@
<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>
More information about the Commit-Watchers
mailing list