Browse files

[giow] (0) Make non-modal dialogs not center automatically.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20418
Affected topics: CSS, DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@8457 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 36b079a commit df69e87c453671725e4f98b162c49923e957b7dd @Hixie Hixie committed Feb 4, 2014
Showing with 107 additions and 97 deletions.
  1. +35 −32 complete.html
  2. +35 −32 index
  3. +37 −33 source
View
67 complete.html
@@ -298,7 +298,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 3 February 2014</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 February 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -52092,18 +52092,17 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </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. Otherwise, <a href=#set-up-the-default-static-position>set up the default static position</a> of the dialog
- element.</li>
+ anchor. Otherwise, set the <code><a href=#the-dialog-element>dialog</a></code> to the <a href=#normal-alignment>normal alignment</a> mode.</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 <code><a href=#document>Document</a></code> is created, this stack must be
initialized to be empty.</p>
+<!--CLEANUP-->
<p>When an element is added to the <a href=#pending-dialog-stack>pending dialog stack</a>, it must also be added to the
- <a href=#top-layer>top layer</a> layer and its containing block must be the initial containing block. When
+ <a href=#top-layer>top layer</a> layer. When
an element is removed from the <a href=#pending-dialog-stack>pending dialog stack</a>, it must be removed from the
- <a href=#top-layer>top layer</a>, and its containing block must revert to that given by the regular
- containing block rules as defined by CSS. <a href=#refsFULLSCREEN>[FULLSCREEN]</a> <a href=#refsCSS>[CSS]</a></p>
+ <a href=#top-layer>top layer</a>. <a href=#refsFULLSCREEN>[FULLSCREEN]</a></p>
<p>When the <dfn id=dom-dialog-showmodal title=dom-dialog-showModal><code>showModal()</code></dfn> method is invoked,
the user agent must run the following steps:</p>
@@ -52119,10 +52118,10 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </span>The <dfn><code>dialog<
<li><p>Add an <code title=attr-dialog-open><a href=#attr-dialog-open>open</a></code> attribute to <var title="">subject</var>, whose value is the empty string.</li>
+<!--CLEANUP-->
<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="">subject</var>, 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>
+ the anchor. Otherwise, set the <code><a href=#the-dialog-element>dialog</a></code> to the <a href=#centered-alignment>centered alignment</a> mode.</li>
<li><p>Let <var title="">subject</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 dialog</a> <var title="">subject</var>.</li>
@@ -52210,30 +52209,31 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </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>All <code><a href=#the-dialog-element>dialog</a></code> elements are always in one of two modes: <dfn id=mundanely-aligned>mundanely aligned</dfn>,
- or <dfn id=magically-aligned>magically aligned</dfn>. When a <code><a href=#the-dialog-element>dialog</a></code> element is created, it must be placed
- in the <a href=#mundanely-aligned>mundanely aligned</a> mode and the user agent must <a href=#set-up-the-default-static-position>set up the default static
- position</a> for that element, without an anchor.</p>
+ <hr><!--CLEANUP--><p>All <code><a href=#the-dialog-element>dialog</a></code> elements are always in one of three modes: <dfn id=normal-alignment>normal alignment</dfn>,
+ <dfn id=centered-alignment>centered alignment</dfn>, and <dfn id=magic-alignment>magic alignment</dfn>.
+ When a <code><a href=#the-dialog-element>dialog</a></code> element is created, it must be placed
+ in the <a href=#normal-alignment>normal alignment</a> mode. In this mode, normal CSS requirements apply to the element. The
+ <a href=#centered-alignment>centered alignment</a> mode is only used for <code><a href=#the-dialog-element>dialog</a></code> elements that are in the <a href=#top-layer>top layer</a>.
+ <a href=#refsFULLSCREEN>[FULLSCREEN]</a> <a href=#refsCSS>[CSS]</a></p>
- <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="">subject</var> without an anchor, if that element is <a href=#being-rendered>being rendered</a>, it must
+<!--CLEANUP-->
+ <p>When an element <var title="">subject</var> is placed in <a href=#centered-alignment>centered alignment</a> mode, and when it is in that mode
+ and has new rendering boxes created, the user agent 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>If there is a <code><a href=#the-dialog-element>dialog</a></code> element that is <a href=#mundanely-aligned>mundanely aligned</a> and that is
+<!--CLEANUP-->
+ <p>If there is a <code><a href=#the-dialog-element>dialog</a></code> element with <a href=#centered-alignment>centered alignment</a> and that is
<a href=#being-rendered>being rendered</a> when its <a href=#browsing-context>browsing context</a> changes viewport width (as
- measured in CSS pixels), then the user agent must <a href=#set-up-the-default-static-position>set up the default static position</a>
- of all such elements in that <a href=#browsing-context>browsing context</a> again, still without anchors.</p>
+ measured in CSS pixels), then the user agent must recreate the element's boxes, recalculating its top static position
+ as in the previous paragraph.</p>
- <p>When a <code><a href=#the-dialog-element>dialog</a></code> element that is <a href=#mundanely-aligned>mundanely aligned</a> starts <a href=#being-rendered>being
- rendered</a>, the user agent must <a href=#set-up-the-default-static-position>set up the default static position</a> of that
- element, without an anchor.</p>
-
- <p>This top static position of a <a href=#mundanely-aligned>mundanely aligned</a> <code><a href=#the-dialog-element>dialog</a></code> element must
- remain the element's top static position until the <a href=#set-up-the-default-static-position>set up the default static position</a>
- algorithm is once again invoked for that element. (The element's static position is only used in
+<!--CLEANUP-->
+ <p>This top static position of a <code><a href=#the-dialog-element>dialog</a></code> element with <a href=#centered-alignment>centered alignment</a> must
+ remain the element's top static position until its boxes are recreated. (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>
@@ -52245,9 +52245,9 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </span>The <dfn><code>dialog<
<p>If <var title="">anchor</var> is a <code><a href=#mouseevent>MouseEvent</a></code> object, then run these
substeps:</p>
- <ol><li><p>If <var title="">anchor</var>'s target element does not have a rendered box, or is in a
- different document than <var title="">subject</var>, then let <var title="">subject</var> be
- <a href=#mundanely-aligned>mundanely aligned</a>, <a href=#set-up-the-default-static-position>set up the default static position</a> of <var title="">subject</var> without an anchor, and abort the <a href=#set-up-the-position>set up the position</a>
+ <ol><!--CLEANUP--><li><p>If <var title="">anchor</var>'s target element does not have a rendered box, or is in a
+ different document than <var title="">subject</var>, then let <var title="">subject</var> be in the
+ <a href=#centered-alignment>centered alignment</a> mode, and abort the <a href=#set-up-the-position>set up the position</a>
steps.</li>
<li><p>Let <var title="">anchor element</var> be an anonymous element rendered as a box with
@@ -52259,19 +52259,21 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </span>The <dfn><code>dialog<
</li>
- <li><p>Let <var title="">subject</var> be <a href=#magically-aligned>magically aligned</a> to <var title="">anchor
+<!--CLEANUP-->
+ <li><p>Put <var title="">subject</var> in the <a href=#magic-alignment>magic alignment</a> mode, aligned to <var title="">anchor
element</var>.</li>
- </ol><p>While an element <var title="">A</var> is <a href=#magically-aligned>magically aligned</a> to an element <var title="">B</var>, the following requirements apply:</p>
+ </ol><!--CLEANUP--><p>While an element <var title="">A</var> has <a href=#magic-alignment>magic alignment</a>, aligned to an element <var title="">B</var>, the following requirements apply:</p>
<ul><li>
+<!--CLEANUP-->
<p>If at any time either <var title="">A</var> or <var title="">B</var> cease having rendered
boxes, <var title="">A</var> and <var title="">B</var> cease being in the same
<code><a href=#document>Document</a></code>, or <var title="">B</var> ceases being earlier than <var title="">A</var>
- in <a href=#tree-order>tree order</a>, let <var title="">subject</var> be <a href=#mundanely-aligned>mundanely aligned</a>,
- and <a href=#set-up-the-default-static-position>set up the default static position</a> of <var title="">subject</var> without an
- anchor.</p>
+ in <a href=#tree-order>tree order</a>, then, if <var title="">subject</var> is in the <a href=#pending-dialog-stack>pending dialog
+ stack</a>, let <var title="">subject</var>'s mode become <a href=#centered-alignment>centered alignment</a>,
+ otherwise, let <var title="">subject</var>'s mode become <a href=#normal-alignment>normal alignment</a>.</p>
</li>
@@ -52389,13 +52391,14 @@ <h4 id=the-dialog-element><span class=secno>4.11.7 </span>The <dfn><code>dialog<
<li>
+<!--CLEANUP-->
<p>When an element's 'position' property computes to '<dfn id=css-position-absolute-anchored title=css-position-absolute-anchored>absolute-anchored</dfn>', the 'float' property does not
apply and must compute to 'none', the 'display' property must compute to a value as described by
the table in <a href=http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo>the section of CSS
2.1 describing the <cite>relationships between 'display', 'position', and 'float'</cite></a>,
and the element's box must be positioned using the rules for absolute positioning but with its
static position set such that if the box is positioned in its static position, its anchor point
- is exactly aligned over the anchor point of the element to which it is <a href=#magically-aligned>magically
+ is exactly aligned over the anchor point of the element to which it is <a href=#magic-alignment title="magic alignment">magically
aligned</a>. Elements aligned in this way are <i>absolutely positioned</i>. For the purposes
of determining the containing block of other elements, the '<a href=#css-position-absolute-anchored title=css-position-absolute-anchored>absolute-anchored</a>' keyword must be treated like
the 'absolute' keyword.</p>
View
67 index
@@ -298,7 +298,7 @@
<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 3 February 2014</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 4 February 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -52092,18 +52092,17 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<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. Otherwise, <a href=#set-up-the-default-static-position>set up the default static position</a> of the dialog
- element.</li>
+ anchor. Otherwise, set the <code><a href=#the-dialog-element>dialog</a></code> to the <a href=#normal-alignment>normal alignment</a> mode.</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 <code><a href=#document>Document</a></code> is created, this stack must be
initialized to be empty.</p>
+<!--CLEANUP-->
<p>When an element is added to the <a href=#pending-dialog-stack>pending dialog stack</a>, it must also be added to the
- <a href=#top-layer>top layer</a> layer and its containing block must be the initial containing block. When
+ <a href=#top-layer>top layer</a> layer. When
an element is removed from the <a href=#pending-dialog-stack>pending dialog stack</a>, it must be removed from the
- <a href=#top-layer>top layer</a>, and its containing block must revert to that given by the regular
- containing block rules as defined by CSS. <a href=#refsFULLSCREEN>[FULLSCREEN]</a> <a href=#refsCSS>[CSS]</a></p>
+ <a href=#top-layer>top layer</a>. <a href=#refsFULLSCREEN>[FULLSCREEN]</a></p>
<p>When the <dfn id=dom-dialog-showmodal title=dom-dialog-showModal><code>showModal()</code></dfn> method is invoked,
the user agent must run the following steps:</p>
@@ -52119,10 +52118,10 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<li><p>Add an <code title=attr-dialog-open><a href=#attr-dialog-open>open</a></code> attribute to <var title="">subject</var>, whose value is the empty string.</li>
+<!--CLEANUP-->
<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="">subject</var>, 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>
+ the anchor. Otherwise, set the <code><a href=#the-dialog-element>dialog</a></code> to the <a href=#centered-alignment>centered alignment</a> mode.</li>
<li><p>Let <var title="">subject</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 dialog</a> <var title="">subject</var>.</li>
@@ -52210,30 +52209,31 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<p class=note>An example of such a UI mechanism would be the user pressing the "Escape" key.</p>
- <hr><p>All <code><a href=#the-dialog-element>dialog</a></code> elements are always in one of two modes: <dfn id=mundanely-aligned>mundanely aligned</dfn>,
- or <dfn id=magically-aligned>magically aligned</dfn>. When a <code><a href=#the-dialog-element>dialog</a></code> element is created, it must be placed
- in the <a href=#mundanely-aligned>mundanely aligned</a> mode and the user agent must <a href=#set-up-the-default-static-position>set up the default static
- position</a> for that element, without an anchor.</p>
+ <hr><!--CLEANUP--><p>All <code><a href=#the-dialog-element>dialog</a></code> elements are always in one of three modes: <dfn id=normal-alignment>normal alignment</dfn>,
+ <dfn id=centered-alignment>centered alignment</dfn>, and <dfn id=magic-alignment>magic alignment</dfn>.
+ When a <code><a href=#the-dialog-element>dialog</a></code> element is created, it must be placed
+ in the <a href=#normal-alignment>normal alignment</a> mode. In this mode, normal CSS requirements apply to the element. The
+ <a href=#centered-alignment>centered alignment</a> mode is only used for <code><a href=#the-dialog-element>dialog</a></code> elements that are in the <a href=#top-layer>top layer</a>.
+ <a href=#refsFULLSCREEN>[FULLSCREEN]</a> <a href=#refsCSS>[CSS]</a></p>
- <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="">subject</var> without an anchor, if that element is <a href=#being-rendered>being rendered</a>, it must
+<!--CLEANUP-->
+ <p>When an element <var title="">subject</var> is placed in <a href=#centered-alignment>centered alignment</a> mode, and when it is in that mode
+ and has new rendering boxes created, the user agent 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>If there is a <code><a href=#the-dialog-element>dialog</a></code> element that is <a href=#mundanely-aligned>mundanely aligned</a> and that is
+<!--CLEANUP-->
+ <p>If there is a <code><a href=#the-dialog-element>dialog</a></code> element with <a href=#centered-alignment>centered alignment</a> and that is
<a href=#being-rendered>being rendered</a> when its <a href=#browsing-context>browsing context</a> changes viewport width (as
- measured in CSS pixels), then the user agent must <a href=#set-up-the-default-static-position>set up the default static position</a>
- of all such elements in that <a href=#browsing-context>browsing context</a> again, still without anchors.</p>
+ measured in CSS pixels), then the user agent must recreate the element's boxes, recalculating its top static position
+ as in the previous paragraph.</p>
- <p>When a <code><a href=#the-dialog-element>dialog</a></code> element that is <a href=#mundanely-aligned>mundanely aligned</a> starts <a href=#being-rendered>being
- rendered</a>, the user agent must <a href=#set-up-the-default-static-position>set up the default static position</a> of that
- element, without an anchor.</p>
-
- <p>This top static position of a <a href=#mundanely-aligned>mundanely aligned</a> <code><a href=#the-dialog-element>dialog</a></code> element must
- remain the element's top static position until the <a href=#set-up-the-default-static-position>set up the default static position</a>
- algorithm is once again invoked for that element. (The element's static position is only used in
+<!--CLEANUP-->
+ <p>This top static position of a <code><a href=#the-dialog-element>dialog</a></code> element with <a href=#centered-alignment>centered alignment</a> must
+ remain the element's top static position until its boxes are recreated. (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>
@@ -52245,9 +52245,9 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<p>If <var title="">anchor</var> is a <code><a href=#mouseevent>MouseEvent</a></code> object, then run these
substeps:</p>
- <ol><li><p>If <var title="">anchor</var>'s target element does not have a rendered box, or is in a
- different document than <var title="">subject</var>, then let <var title="">subject</var> be
- <a href=#mundanely-aligned>mundanely aligned</a>, <a href=#set-up-the-default-static-position>set up the default static position</a> of <var title="">subject</var> without an anchor, and abort the <a href=#set-up-the-position>set up the position</a>
+ <ol><!--CLEANUP--><li><p>If <var title="">anchor</var>'s target element does not have a rendered box, or is in a
+ different document than <var title="">subject</var>, then let <var title="">subject</var> be in the
+ <a href=#centered-alignment>centered alignment</a> mode, and abort the <a href=#set-up-the-position>set up the position</a>
steps.</li>
<li><p>Let <var title="">anchor element</var> be an anonymous element rendered as a box with
@@ -52259,19 +52259,21 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
</li>
- <li><p>Let <var title="">subject</var> be <a href=#magically-aligned>magically aligned</a> to <var title="">anchor
+<!--CLEANUP-->
+ <li><p>Put <var title="">subject</var> in the <a href=#magic-alignment>magic alignment</a> mode, aligned to <var title="">anchor
element</var>.</li>
- </ol><p>While an element <var title="">A</var> is <a href=#magically-aligned>magically aligned</a> to an element <var title="">B</var>, the following requirements apply:</p>
+ </ol><!--CLEANUP--><p>While an element <var title="">A</var> has <a href=#magic-alignment>magic alignment</a>, aligned to an element <var title="">B</var>, the following requirements apply:</p>
<ul><li>
+<!--CLEANUP-->
<p>If at any time either <var title="">A</var> or <var title="">B</var> cease having rendered
boxes, <var title="">A</var> and <var title="">B</var> cease being in the same
<code><a href=#document>Document</a></code>, or <var title="">B</var> ceases being earlier than <var title="">A</var>
- in <a href=#tree-order>tree order</a>, let <var title="">subject</var> be <a href=#mundanely-aligned>mundanely aligned</a>,
- and <a href=#set-up-the-default-static-position>set up the default static position</a> of <var title="">subject</var> without an
- anchor.</p>
+ in <a href=#tree-order>tree order</a>, then, if <var title="">subject</var> is in the <a href=#pending-dialog-stack>pending dialog
+ stack</a>, let <var title="">subject</var>'s mode become <a href=#centered-alignment>centered alignment</a>,
+ otherwise, let <var title="">subject</var>'s mode become <a href=#normal-alignment>normal alignment</a>.</p>
</li>
@@ -52389,13 +52391,14 @@ dictionary <dfn id=relatedeventinit>RelatedEventInit</dfn> : <a href=#eventinit>
<li>
+<!--CLEANUP-->
<p>When an element's 'position' property computes to '<dfn id=css-position-absolute-anchored title=css-position-absolute-anchored>absolute-anchored</dfn>', the 'float' property does not
apply and must compute to 'none', the 'display' property must compute to a value as described by
the table in <a href=http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo>the section of CSS
2.1 describing the <cite>relationships between 'display', 'position', and 'float'</cite></a>,
and the element's box must be positioned using the rules for absolute positioning but with its
static position set such that if the box is positioned in its static position, its anchor point
- is exactly aligned over the anchor point of the element to which it is <a href=#magically-aligned>magically
+ is exactly aligned over the anchor point of the element to which it is <a href=#magic-alignment title="magic alignment">magically
aligned</a>. Elements aligned in this way are <i>absolutely positioned</i>. For the purposes
of determining the containing block of other elements, the '<a href=#css-position-absolute-anchored title=css-position-absolute-anchored>absolute-anchored</a>' keyword must be treated like
the 'absolute' keyword.</p>
View
70 source
@@ -57561,8 +57561,7 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<li><p>If the <code data-x="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. Otherwise, <span>set up the default static position</span> of the dialog
- element.</p></li>
+ anchor. Otherwise, set the <code>dialog</code> to the <span>normal alignment</span> mode.</p></li>
</ol>
@@ -57572,12 +57571,11 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<dfn>pending dialog stack</dfn>. When a <code>Document</code> is created, this stack must be
initialized to be empty.</p>
+<!--CLEANUP-->
<p>When an element is added to the <span>pending dialog stack</span>, it must also be added to the
- <span>top layer</span> layer and its containing block must be the initial containing block. When
+ <span>top layer</span> layer. When
an element is removed from the <span>pending dialog stack</span>, it must be removed from the
- <span>top layer</span>, and its containing block must revert to that given by the regular
- containing block rules as defined by CSS. <a href="#refsFULLSCREEN">[FULLSCREEN]</a> <a
- href="#refsCSS">[CSS]</a></p>
+ <span>top layer</span>. <a href="#refsFULLSCREEN">[FULLSCREEN]</a></p>
<p>When the <dfn data-x="dom-dialog-showModal"><code>showModal()</code></dfn> method is invoked,
the user agent must run the following steps:</p>
@@ -57596,10 +57594,10 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<li><p>Add an <code data-x="attr-dialog-open">open</code> attribute to <var
data-x="">subject</var>, whose value is the empty string.</p></li>
+<!--CLEANUP-->
<li><p>If the <code data-x="dom-dialog-showModal">showModal()</code> method was invoked with an
argument, <span>set up the position</span> of <var data-x="">subject</var>, using that argument as
- the anchor. Otherwise, <span>set up the default static position</span> of the dialog
- element.</p></li>
+ the anchor. Otherwise, set the <code>dialog</code> to the <span>centered alignment</span> mode.</p></li>
<li><p>Let <var data-x="">subject</var>'s <code>Document</code> be <span data-x="blocked by a modal
dialog">blocked by the modal dialog</span> <var data-x="">subject</var>.</p></li>
@@ -57716,31 +57714,33 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<hr>
- <p>All <code>dialog</code> elements are always in one of two modes: <dfn>mundanely aligned</dfn>,
- or <dfn>magically aligned</dfn>. When a <code>dialog</code> element is created, it must be placed
- in the <span>mundanely aligned</span> mode and the user agent must <span>set up the default static
- position</span> for that element, without an anchor.</p>
+<!--CLEANUP-->
+ <p>All <code>dialog</code> elements are always in one of three modes: <dfn>normal alignment</dfn>,
+ <dfn>centered alignment</dfn>, and <dfn>magic alignment</dfn>.
+ When a <code>dialog</code> element is created, it must be placed
+ in the <span>normal alignment</span> mode. In this mode, normal CSS requirements apply to the element. The
+ <span>centered alignment</span> mode is only used for <code>dialog</code> elements that are in the <span>top layer</span>.
+ <a href="#refsFULLSCREEN">[FULLSCREEN]</a> <a href="#refsCSS">[CSS]</a></p>
- <p>When a user agent is to <dfn>set up the default static position</dfn> of an element <var
- data-x="">subject</var> without an anchor, if that element is <span>being rendered</span>, it must
+<!--CLEANUP-->
+ <p>When an element <var
+ data-x="">subject</var> is placed in <span>centered alignment</span> mode, and when it is in that mode
+ and has new rendering boxes created, the user agent 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>If there is a <code>dialog</code> element that is <span>mundanely aligned</span> and that is
+<!--CLEANUP-->
+ <p>If there is a <code>dialog</code> element with <span>centered alignment</span> and that is
<span>being rendered</span> when its <span>browsing context</span> changes viewport width (as
- measured in CSS pixels), then the user agent must <span>set up the default static position</span>
- of all such elements in that <span>browsing context</span> again, still without anchors.</p>
+ measured in CSS pixels), then the user agent must recreate the element's boxes, recalculating its top static position
+ as in the previous paragraph.</p>
- <p>When a <code>dialog</code> element that is <span>mundanely aligned</span> starts <span>being
- rendered</span>, the user agent must <span>set up the default static position</span> of that
- element, without an anchor.</p>
-
- <p>This top static position of a <span>mundanely aligned</span> <code>dialog</code> element must
- remain the element's top static position until the <span>set up the default static position</span>
- algorithm is once again invoked for that element. (The element's static position is only used in
+<!--CLEANUP-->
+ <p>This top static position of a <code>dialog</code> element with <span>centered alignment</span> must
+ remain the element's top static position until its boxes are recreated. (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>
@@ -57757,10 +57757,10 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<ol>
+<!--CLEANUP-->
<li><p>If <var data-x="">anchor</var>'s target element does not have a rendered box, or is in a
- different document than <var data-x="">subject</var>, then let <var data-x="">subject</var> be
- <span>mundanely aligned</span>, <span>set up the default static position</span> of <var
- data-x="">subject</var> without an anchor, and abort the <span>set up the position</span>
+ different document than <var data-x="">subject</var>, then let <var data-x="">subject</var> be in the
+ <span>centered alignment</span> mode, and abort the <span>set up the position</span>
steps.</p></li>
<li><p>Let <var data-x="">anchor element</var> be an anonymous element rendered as a box with
@@ -57774,24 +57774,27 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
</li>
- <li><p>Let <var data-x="">subject</var> be <span>magically aligned</span> to <var data-x="">anchor
+<!--CLEANUP-->
+ <li><p>Put <var data-x="">subject</var> in the <span>magic alignment</span> mode, aligned to <var data-x="">anchor
element</var>.</p></li>
</ol>
- <p>While an element <var data-x="">A</var> is <span>magically aligned</span> to an element <var
+<!--CLEANUP-->
+ <p>While an element <var data-x="">A</var> has <span>magic alignment</span>, aligned to an element <var
data-x="">B</var>, the following requirements apply:</p>
<ul>
<li>
+<!--CLEANUP-->
<p>If at any time either <var data-x="">A</var> or <var data-x="">B</var> cease having rendered
boxes, <var data-x="">A</var> and <var data-x="">B</var> cease being in the same
<code>Document</code>, or <var data-x="">B</var> ceases being earlier than <var data-x="">A</var>
- in <span>tree order</span>, let <var data-x="">subject</var> be <span>mundanely aligned</span>,
- and <span>set up the default static position</span> of <var data-x="">subject</var> without an
- anchor.</p>
+ in <span>tree order</span>, then, if <var data-x="">subject</var> is in the <span>pending dialog
+ stack</span>, let <var data-x="">subject</var>'s mode become <span>centered alignment</span>,
+ otherwise, let <var data-x="">subject</var>'s mode become <span>normal alignment</span>.</p>
</li>
@@ -57925,14 +57928,15 @@ dictionary <dfn>RelatedEventInit</dfn> : <span>EventInit</span> {
<li>
+<!--CLEANUP-->
<p>When an element's 'position' property computes to '<dfn
data-x="css-position-absolute-anchored">absolute-anchored</dfn>', the 'float' property does not
apply and must compute to 'none', the 'display' property must compute to a value as described by
the table in <a href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo">the section of CSS
2.1 describing the <cite>relationships between 'display', 'position', and 'float'</cite></a>,
and the element's box must be positioned using the rules for absolute positioning but with its
static position set such that if the box is positioned in its static position, its anchor point
- is exactly aligned over the anchor point of the element to which it is <span>magically
+ is exactly aligned over the anchor point of the element to which it is <span data-x="magic alignment">magically
aligned</span>. Elements aligned in this way are <i>absolutely positioned</i>. For the purposes
of determining the containing block of other elements, the '<span
data-x="css-position-absolute-anchored">absolute-anchored</span>' keyword must be treated like

0 comments on commit df69e87

Please sign in to comment.