HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
7051[Gecko] [Internet Explorer] [Opera] [Webkit] Oops, forgot to center the <dialog> element vertically when it is not anchored.2012-04-11 23:22
@@ -66134,22 +66134,23 @@ fur
    <li><p>If the element already has an <code
    title="attr-dialog-open">open</code> attribute, then abort these
    steps.</p></li>
 
    <li><p>Add an <code title="attr-dialog-open">open</code> attribute
    to the <code>dialog</code> element, whose value is the empty
    string.</p></li>
 
    <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>
 
   <hr>
 
   <p>Each <code>Document</code> has a stack of <code>dialog</code>
   elements known as the <dfn>pending dialog stack</dfn>. When a
   <code>Document</code> is created, this stack must be initialized to
   be empty.</p>
 
@@ -66178,21 +66179,22 @@ fur
    <span>InvalidStateError</span> exception and abort these
    steps.</p></li>
 
    <li><p>Add an <code title="attr-dialog-open">open</code> attribute
    to <var title="">dialog</var>, whose value is the empty
    string.</p></li>
 
    <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
    dialog</span> <var title="">dialog</var>.</p></li>
 
    <li><p>Push <var title="">dialog</var> onto <var
    title="">dialog</var>'s <code>Document</code>'s <span>pending
    dialog stack</span>.</p></li>
 
   </ol>
@@ -66298,20 +66300,38 @@ fur
   title="event-cancel">cancel</code> that is cancelable at the top
   <code>dialog</code> element on the <code>Document</code>'s
   <span>pending dialog stack</span>. The default action of this event
   must be to <span>close the dialog</span> with no return value.</p>
 
   <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>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>
 
   <ol>
 
    <li>
 
     <p>If <var title="">anchor</var> is a <code>MouseEvent</code>
     object, then run these substeps:</p>

|