|
16 | 16 |
|
17 | 17 | <h1>CSSOM View Module</h1> |
18 | 18 |
|
19 | | - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 27 August 2013</h2> |
| 19 | + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 3 September 2013</h2> |
20 | 20 |
|
21 | 21 | <dl> |
22 | 22 |
|
@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2> |
83 | 83 | can be found in the <a href="http://www.w3.org/TR/">W3C technical reports |
84 | 84 | index at http://www.w3.org/TR/.</a></em> |
85 | 85 |
|
86 | | -<p>This is the 27 August 2013 Editor's Draft of CSSOM View. Please send |
| 86 | +<p>This is the 3 September 2013 Editor's Draft of CSSOM View. Please send |
87 | 87 | comments to |
88 | 88 | <a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a> |
89 | 89 | (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) |
@@ -501,6 +501,12 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi |
501 | 501 | <a href="#mediaquerylist">MediaQueryList</a> <a href="#dom-window-matchmedia" title="dom-Window-matchMedia">matchMedia</a>(DOMString query); |
502 | 502 | [SameObject] readonly attribute <a href="#screen">Screen</a> <a href="#dom-window-screen" title="dom-Window-screen">screen</a>; |
503 | 503 |
|
| 504 | + // browsing context |
| 505 | + void <a href="#dom-window-moveto" title="dom-Window-moveTo">moveTo</a>(double x, double y); |
| 506 | + void <a href="#dom-window-moveby" title="dom-Window-moveBy">moveBy</a>(double x, double y); |
| 507 | + void <a href="#dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</a>(double x, double y); |
| 508 | + void <a href="#dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</a>(double x, double y); |
| 509 | + |
504 | 510 | // viewport |
505 | 511 | readonly attribute double <a href="#dom-window-innerwidth" title="dom-Window-innerWidth">innerWidth</a>; |
506 | 512 | readonly attribute double <a href="#dom-window-innerheight" title="dom-Window-innerHeight">innerHeight</a>; |
@@ -537,6 +543,69 @@ <h2 id="extensions-to-the-window-interface"><span class="secno">5 </span>Extensi |
537 | 543 | <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 |
538 | 544 | results when the <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> is navigated.</p> |
539 | 545 |
|
| 546 | +<p>The <dfn id="dom-window-moveto" title="dom-Window-moveTo">moveTo</dfn> method must follow these steps: |
| 547 | + |
| 548 | +<ol> |
| 549 | + <li><p>Optionally, terminate these steps. |
| 550 | + <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 |
| 551 | + object</a>. |
| 552 | + <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>. |
| 553 | + <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. |
| 554 | + <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. |
| 555 | + <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 |
| 556 | + the output device, measured in CSS pixels. The positive axes are rightward and downward. |
| 557 | +</ol> |
| 558 | + |
| 559 | +<p>The <dfn id="dom-window-moveby" title="dom-Window-moveBy">moveBy</dfn> method must follow these steps: |
| 560 | + |
| 561 | +<ol> |
| 562 | + <li><p>Optionally, terminate these steps. |
| 563 | + <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 |
| 564 | + object</a>. |
| 565 | + <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>. |
| 566 | + <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. |
| 567 | + <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. |
| 568 | + <li><p>Move <var>target</var>'s window <var>x</var> CSS pixels righward and <var>y</var> CSS pixels downward. |
| 569 | +</ol> |
| 570 | + |
| 571 | + |
| 572 | +<p>The <dfn id="dom-window-resizeto" title="dom-Window-resizeTo">resizeTo</dfn> method must follow these steps: |
| 573 | + |
| 574 | +<ol> |
| 575 | + <li><p>Optionally, terminate these steps. |
| 576 | + <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 |
| 577 | + object</a>. |
| 578 | + <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>. |
| 579 | + <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. |
| 580 | + <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 |
| 581 | + space. |
| 582 | + <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 |
| 583 | + pixels and the distance between the top and bottom edges are <var>y</var> CSS pixels. |
| 584 | + <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. |
| 585 | +</ol> |
| 586 | + |
| 587 | +<p>The <dfn id="dom-window-resizeby" title="dom-Window-resizeBy">resizeBy</dfn> method must follow these steps: |
| 588 | + |
| 589 | +<ol> |
| 590 | + <li><p>Optionally, terminate these steps. |
| 591 | + <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 |
| 592 | + object</a>. |
| 593 | + <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>. |
| 594 | + <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. |
| 595 | + <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 |
| 596 | + space. |
| 597 | + <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. |
| 598 | + <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. |
| 599 | +</ol> |
| 600 | + |
| 601 | +<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 |
| 602 | +context</a> <var>B</var> if all the following conditions are met: |
| 603 | + |
| 604 | +<ul> |
| 605 | + <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). |
| 606 | + <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>. |
| 607 | +</ul> |
| 608 | + |
540 | 609 | <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 |
541 | 610 | scroll bar (if any), or zero if there is no <a href="#viewport">viewport</a>. <!--fingerprint--></p> |
542 | 611 | <div class="example"> |
@@ -1585,6 +1654,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2> |
1585 | 1654 | Michael Dyck, |
1586 | 1655 | Mike Wilson, |
1587 | 1656 | Morten Stenshorne, |
| 1657 | +Olli Pettay, |
1588 | 1658 | Pavel Curtis, |
1589 | 1659 | Peter-Paul Koch, |
1590 | 1660 | Rachel Kmetz, |
|
0 commit comments