Tue, 03 Sep 2013 13:56:11 +0200
[cssom-view] Specify moveBy moveTo resizeBy resizeTo. https://www.w3.org/Bugs/Public/show_bug.cgi?id=23127
cssom-view/Overview.html | file | annotate | diff | comparison | revisions | |
cssom-view/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/cssom-view/Overview.html Mon Sep 02 19:01:45 2013 -0700 1.2 +++ b/cssom-view/Overview.html Tue Sep 03 13:56:11 2013 +0200 1.3 @@ -16,7 +16,7 @@ 1.4 1.5 <h1>CSSOM View Module</h1> 1.6 1.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 27 August 2013</h2> 1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 3 September 2013</h2> 1.9 1.10 <dl> 1.11 1.12 @@ -83,7 +83,7 @@ 1.13 can be found in the <a href="http://www.w3.org/TR/">W3C technical reports 1.14 index at http://www.w3.org/TR/.</a></em> 1.15 1.16 -<p>This is the 27 August 2013 Editor's Draft of CSSOM View. Please send 1.17 +<p>This is the 3 September 2013 Editor's Draft of CSSOM View. Please send 1.18 comments to 1.19 <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a> 1.20 (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) 1.21 @@ -501,6 +501,12 @@ 1.22 <a href="#mediaquerylist">MediaQueryList</a> <a href="#dom-window-matchmedia" title="dom-Window-matchMedia">matchMedia</a>(DOMString query); 1.23 [SameObject] readonly attribute <a href="#screen">Screen</a> <a href="#dom-window-screen" title="dom-Window-screen">screen</a>; 1.24 1.25 + // browsing context 1.26 + void <a href="#dom-window-moveto" title="dom-Window-moveTo">moveTo</a>(double x, double y); 1.27 + void <a href="#dom-window-moveby" title="dom-Window-moveBy">moveBy</a>(double x, double y); 1.28 + void <a href="#dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</a>(double x, double y); 1.29 + void <a href="#dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</a>(double x, double y); 1.30 + 1.31 // viewport 1.32 readonly attribute double <a href="#dom-window-innerwidth" title="dom-Window-innerWidth">innerWidth</a>; 1.33 readonly attribute double <a href="#dom-window-innerheight" title="dom-Window-innerHeight">innerHeight</a>; 1.34 @@ -537,6 +543,69 @@ 1.35 <p class="note">Accessing <code title="dom-Window-screen"><a href="#dom-window-screen">screen</a></code> through a <code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#windowproxy">WindowProxy</a></code> object might yield different 1.36 results when the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is navigated.</p> 1.37 1.38 +<p>The <dfn id="dom-window-moveto" title="dom-Window-moveTo">moveTo</dfn> method must follow these steps: 1.39 + 1.40 +<ol> 1.41 + <li><p>Optionally, terminate these steps. 1.42 + <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context 1.43 + object</a>. 1.44 + <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-script">incumbent script</a>. 1.45 + <li><p>If <var>source</var> is not <a href="#allowed-to-resize-and-move">allowed to resize and move</a> <var>target</var>, terminate these steps. 1.46 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space. 1.47 + <li><p>Move <var>target</var>'s window such that the window's top left corner is at coordinates (<var>x</var>, <var>y</var>) relative to the top left corner of 1.48 + the output device, measured in CSS pixels. The positive axes are rightward and downward. 1.49 +</ol> 1.50 + 1.51 +<p>The <dfn id="dom-window-moveby" title="dom-Window-moveBy">moveBy</dfn> method must follow these steps: 1.52 + 1.53 +<ol> 1.54 + <li><p>Optionally, terminate these steps. 1.55 + <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context 1.56 + object</a>. 1.57 + <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-script">incumbent script</a>. 1.58 + <li><p>If <var>source</var> is not <a href="#allowed-to-resize-and-move">allowed to resize and move</a> <var>target</var>, terminate these steps. 1.59 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space. 1.60 + <li><p>Move <var>target</var>'s window <var>x</var> CSS pixels righward and <var>y</var> CSS pixels downward. 1.61 +</ol> 1.62 + 1.63 + 1.64 +<p>The <dfn id="dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</dfn> method must follow these steps: 1.65 + 1.66 +<ol> 1.67 + <li><p>Optionally, terminate these steps. 1.68 + <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context 1.69 + object</a>. 1.70 + <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-script">incumbent script</a>. 1.71 + <li><p>If <var>source</var> is not <a href="#allowed-to-resize-and-move">allowed to resize and move</a> <var>target</var>, terminate these steps. 1.72 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available 1.73 + space. 1.74 + <li><p>Resize <var>target</var>'s window by moving its right and bottom edges such that the distance between the left and right edges are <var>x</var> CSS 1.75 + pixels and the distance between the top and bottom edges are <var>y</var> CSS pixels. 1.76 + <li><p>Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space. 1.77 +</ol> 1.78 + 1.79 +<p>The <dfn id="dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</dfn> method must follow these steps: 1.80 + 1.81 +<ol> 1.82 + <li><p>Optionally, terminate these steps. 1.83 + <li><p>Let <var>target</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context 1.84 + object</a>. 1.85 + <li><p>Let <var>source</var> be the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> of the <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#incumbent-script">incumbent script</a>. 1.86 + <li><p>If <var>source</var> is not <a href="#allowed-to-resize-and-move">allowed to resize and move</a> <var>target</var>, terminate these steps. 1.87 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available 1.88 + space. 1.89 + <li><p>Resize <var>target</var>'s window by moving its right edge <var>x</var> CSS pixels righward and its bottom edge <var>y</var> CSS pixels downward. 1.90 + <li><p>Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space. 1.91 +</ol> 1.92 + 1.93 +<p>A <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing context</a> <var>A</var> is <dfn id="allowed-to-resize-and-move">allowed to resize and move</dfn> a <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#browsing-context">browsing 1.94 +context</a> <var>B</var> if all the following conditions are met: 1.95 + 1.96 +<ul> 1.97 + <li><p><var>B</var> is an <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#auxiliary-browsing-context">auxiliary browsing context</a> that was created by a script (as opposed to by an action of the user). 1.98 + <li><p><var>A</var> is <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#familiar-with">familiar with</a> <var>B</var>. 1.99 +</ul> 1.100 + 1.101 <p>The <dfn id="dom-window-innerwidth" title="dom-Window-innerWidth"><code>innerWidth</code></dfn> attribute must return the <a href="#viewport">viewport</a> width including the size of a rendered 1.102 scroll bar (if any), or zero if there is no <a href="#viewport">viewport</a>. <!--fingerprint--></p> 1.103 <div class="example"> 1.104 @@ -1585,6 +1654,7 @@ 1.105 Michael Dyck, 1.106 Mike Wilson, 1.107 Morten Stenshorne, 1.108 +Olli Pettay, 1.109 Pavel Curtis, 1.110 Peter-Paul Koch, 1.111 Rachel Kmetz,
2.1 --- a/cssom-view/Overview.src.html Mon Sep 02 19:01:45 2013 -0700 2.2 +++ b/cssom-view/Overview.src.html Tue Sep 03 13:56:11 2013 +0200 2.3 @@ -463,6 +463,12 @@ 2.4 <span>MediaQueryList</span> <span title=dom-Window-matchMedia>matchMedia</span>(DOMString query); 2.5 [SameObject] readonly attribute <span>Screen</span> <span title=dom-Window-screen>screen</span>; 2.6 2.7 + // browsing context 2.8 + void <span title=dom-Window-moveTo>moveTo</span>(double x, double y); 2.9 + void <span title=dom-Window-moveBy>moveBy</span>(double x, double y); 2.10 + void <span title=dom-Window-resizeTo>resizeTo</span>(double x, double y); 2.11 + void <span title=dom-Window-resizeBy>resizeBy</span>(double x, double y); 2.12 + 2.13 // viewport 2.14 readonly attribute double <span title=dom-Window-innerWidth>innerWidth</span>; 2.15 readonly attribute double <span title=dom-Window-innerHeight>innerHeight</span>; 2.16 @@ -499,6 +505,69 @@ 2.17 <p class='note'>Accessing <code title=dom-Window-screen>screen</code> through a <code data-anolis-spec=html>WindowProxy</code> object might yield different 2.18 results when the <code data-anolis-spec=dom>Document</code> is navigated.</p> 2.19 2.20 +<p>The <dfn title=dom-Window-moveTo>moveTo</dfn> method must follow these steps: 2.21 + 2.22 +<ol> 2.23 + <li><p>Optionally, terminate these steps. 2.24 + <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context 2.25 + object</span>. 2.26 + <li><p>Let <var>source</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=html>incumbent script</span>. 2.27 + <li><p>If <var>source</var> is not <span>allowed to resize and move</span> <var>target</var>, terminate these steps. 2.28 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space. 2.29 + <li><p>Move <var>target</var>'s window such that the window's top left corner is at coordinates (<var>x</var>, <var>y</var>) relative to the top left corner of 2.30 + the output device, measured in CSS pixels. The positive axes are rightward and downward. 2.31 +</ol> 2.32 + 2.33 +<p>The <dfn title=dom-Window-moveBy>moveBy</dfn> method must follow these steps: 2.34 + 2.35 +<ol> 2.36 + <li><p>Optionally, terminate these steps. 2.37 + <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context 2.38 + object</span>. 2.39 + <li><p>Let <var>source</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=html>incumbent script</span>. 2.40 + <li><p>If <var>source</var> is not <span>allowed to resize and move</span> <var>target</var>, terminate these steps. 2.41 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space. 2.42 + <li><p>Move <var>target</var>'s window <var>x</var> CSS pixels righward and <var>y</var> CSS pixels downward. 2.43 +</ol> 2.44 + 2.45 + 2.46 +<p>The <dfn title=dom-Window-resizeTo>resizeTo</dfn> method must follow these steps: 2.47 + 2.48 +<ol> 2.49 + <li><p>Optionally, terminate these steps. 2.50 + <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context 2.51 + object</span>. 2.52 + <li><p>Let <var>source</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=html>incumbent script</span>. 2.53 + <li><p>If <var>source</var> is not <span>allowed to resize and move</span> <var>target</var>, terminate these steps. 2.54 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available 2.55 + space. 2.56 + <li><p>Resize <var>target</var>'s window by moving its right and bottom edges such that the distance between the left and right edges are <var>x</var> CSS 2.57 + pixels and the distance between the top and bottom edges are <var>y</var> CSS pixels. 2.58 + <li><p>Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space. 2.59 +</ol> 2.60 + 2.61 +<p>The <dfn title=dom-Window-resizeBy>resizeBy</dfn> method must follow these steps: 2.62 + 2.63 +<ol> 2.64 + <li><p>Optionally, terminate these steps. 2.65 + <li><p>Let <var>target</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=dom>context 2.66 + object</span>. 2.67 + <li><p>Let <var>source</var> be the <span data-anolis-spec=html>browsing context</span> of the <span data-anolis-spec=html>incumbent script</span>. 2.68 + <li><p>If <var>source</var> is not <span>allowed to resize and move</span> <var>target</var>, terminate these steps. 2.69 + <li><p>Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available 2.70 + space. 2.71 + <li><p>Resize <var>target</var>'s window by moving its right edge <var>x</var> CSS pixels righward and its bottom edge <var>y</var> CSS pixels downward. 2.72 + <li><p>Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space. 2.73 +</ol> 2.74 + 2.75 +<p>A <span data-anolis-spec=html>browsing context</span> <var>A</var> is <dfn>allowed to resize and move</dfn> a <span data-anolis-spec=html>browsing 2.76 +context</span> <var>B</var> if all the following conditions are met: 2.77 + 2.78 +<ul> 2.79 + <li><p><var>B</var> is an <span data-anolis-spec=html>auxiliary browsing context</span> that was created by a script (as opposed to by an action of the user). 2.80 + <li><p><var>A</var> is <span data-anolis-spec=html>familiar with</span> <var>B</var>. 2.81 +</ul> 2.82 + 2.83 <p>The <dfn title=dom-Window-innerWidth><code>innerWidth</code></dfn> attribute must return the <span>viewport</span> width including the size of a rendered 2.84 scroll bar (if any), or zero if there is no <span>viewport</span>. <!--fingerprint--></p> 2.85 <div class='example'> 2.86 @@ -1527,6 +1596,7 @@ 2.87 Michael Dyck, 2.88 Mike Wilson, 2.89 Morten Stenshorne, 2.90 +Olli Pettay, 2.91 Pavel Curtis, 2.92 Peter-Paul Koch, 2.93 Rachel Kmetz,