[html5] r6350 - [giow] (0) Attempt to spec the subtlties of window.print().

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 2 16:14:44 PDT 2011


Author: ianh
Date: 2011-08-02 16:14:43 -0700 (Tue, 02 Aug 2011)
New Revision: 6350

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Attempt to spec the subtlties of window.print().

Modified: complete.html
===================================================================
--- complete.html	2011-08-02 22:19:22 UTC (rev 6349)
+++ complete.html	2011-08-02 23:14:43 UTC (rev 6350)
@@ -8928,7 +8928,9 @@
   <p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
   or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</code>
   APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
-  document's address</a> of the <a href="#script's-document">script's document</a>.</p>
+  document's address</a> of the <a href="#script's-document">script's document</a>, and
+  the <code><a href=#document>Document</a></code> is both <a href=#ready-for-post-load-tasks>ready for post-load
+  tasks</a> and <a href=#completely-loaded>completely loaded</a> immediately.</p>
 
   <p>Each <code><a href=#document>Document</a></code> object has a <dfn id=reload-override-flag>reload override
   flag</dfn> that is originally unset. The flag is set by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> and <code title=dom-document-open><a href=#dom-document-open>document.write()</a></code> methods in certain
@@ -12622,7 +12624,11 @@
    <li><p>Return the <code><a href=#document>Document</a></code> on which the method was
    invoked.</li>
 
-  </ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
+  </ol><p class=note>The <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method does not
+  affect whether a <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load
+  tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>
+
+  <p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
   <code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
   object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
   arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
@@ -69313,8 +69319,12 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-print title=dom-print><code>print()</code></dfn> method,
-  when invoked, must run the <a href=#printing-steps>printing steps</a>.</p>
+  <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
+  is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
+  post-load tasks</a>, then the user agent must synchronously run
+  the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
+  set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
+  <code><a href=#document>Document</a></code>.</p>
 
   <p>User agents should also run the <a href=#printing-steps>printing steps</a>
   whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
@@ -69343,7 +69353,7 @@
     <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
     <code title=event-beforeprint>beforeprint</code> at the
     <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
-    being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+      being printed, as well as any <a href=#nested-browsing-context title="nested browsing
     context">nested browsing contexts</a> in it.</p>
 
     <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
@@ -90556,6 +90566,10 @@
    for these <a href=#concept-task title=concept-task>tasks</a> is the
    <a href=#networking-task-source>networking task source</a>.</li>
 
+   <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
+   loaded</a> flag is set, then run the <a href=#printing-steps>printing
+   steps</a>.</li>
+
    <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
    tasks</dfn>.</li>
 

Modified: index
===================================================================
--- index	2011-08-02 22:19:22 UTC (rev 6349)
+++ index	2011-08-02 23:14:43 UTC (rev 6350)
@@ -8797,7 +8797,9 @@
   <p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
   or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</code>
   APIs, <a href="#the-document's-address">the document's address</a> is the same as <a href="#the-document's-address">the
-  document's address</a> of the <a href="#script's-document">script's document</a>.</p>
+  document's address</a> of the <a href="#script's-document">script's document</a>, and
+  the <code><a href=#document>Document</a></code> is both <a href=#ready-for-post-load-tasks>ready for post-load
+  tasks</a> and <a href=#completely-loaded>completely loaded</a> immediately.</p>
 
   <p>Each <code><a href=#document>Document</a></code> object has a <dfn id=reload-override-flag>reload override
   flag</dfn> that is originally unset. The flag is set by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> and <code title=dom-document-open><a href=#dom-document-open>document.write()</a></code> methods in certain
@@ -12491,7 +12493,11 @@
    <li><p>Return the <code><a href=#document>Document</a></code> on which the method was
    invoked.</li>
 
-  </ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
+  </ol><p class=note>The <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method does not
+  affect whether a <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for post-load
+  tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>
+
+  <p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
   <code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
   object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
   arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
@@ -69205,8 +69211,12 @@
 
   </dl><div class=impl>
 
-  <p>The <dfn id=dom-print title=dom-print><code>print()</code></dfn> method,
-  when invoked, must run the <a href=#printing-steps>printing steps</a>.</p>
+  <p>When the <dfn id=dom-print title=dom-print><code>print()</code></dfn> method
+  is invoked, if the <code><a href=#document>Document</a></code> is <a href=#ready-for-post-load-tasks>ready for
+  post-load tasks</a>, then the user agent must synchronously run
+  the <a href=#printing-steps>printing steps</a>. Otherwise, the user agent must only
+  set the <dfn id=print-when-loaded>print when loaded</dfn> flag on the
+  <code><a href=#document>Document</a></code>.</p>
 
   <p>User agents should also run the <a href=#printing-steps>printing steps</a>
   whenever the user asks for the opportunity to <a href=#obtain-a-physical-form>obtain a
@@ -69235,7 +69245,7 @@
     <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> named
     <code title=event-beforeprint>beforeprint</code> at the
     <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code> that is
-    being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+      being printed, as well as any <a href=#nested-browsing-context title="nested browsing
     context">nested browsing contexts</a> in it.</p>
 
     <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
@@ -86129,6 +86139,10 @@
    for these <a href=#concept-task title=concept-task>tasks</a> is the
    <a href=#networking-task-source>networking task source</a>.</li>
 
+   <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
+   loaded</a> flag is set, then run the <a href=#printing-steps>printing
+   steps</a>.</li>
+
    <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
    tasks</dfn>.</li>
 

Modified: source
===================================================================
--- source	2011-08-02 22:19:22 UTC (rev 6349)
+++ source	2011-08-02 23:14:43 UTC (rev 6350)
@@ -8914,7 +8914,9 @@
   or <code
   title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument()</code>
   APIs, <span>the document's address</span> is the same as <span>the
-  document's address</span> of the <span>script's document</span>.</p>
+  document's address</span> of the <span>script's document</span>, and
+  the <code>Document</code> is both <span>ready for post-load
+  tasks</span> and <span>completely loaded</span> immediately.</p>
 
   <p>Each <code>Document</code> object has a <dfn>reload override
   flag</dfn> that is originally unset. The flag is set by the <code
@@ -13140,6 +13142,11 @@
 
   </ol>
 
+  <p class="note">The <code
+  title="dom-document-open">document.open()</code> method does not
+  affect whether a <code>Document</code> is <span>ready for post-load
+  tasks</span> or <span>completely loaded</span>.</p>
+
   <p>When called with three or more arguments, the <code
   title="dom-document-open">open()</code> method on the
   <code>HTMLDocument</code> object must call the <code
@@ -78911,8 +78918,12 @@
 
   <div class="impl">
 
-  <p>The <dfn title="dom-print"><code>print()</code></dfn> method,
-  when invoked, must run the <span>printing steps</span>.</p>
+  <p>When the <dfn title="dom-print"><code>print()</code></dfn> method
+  is invoked, if the <code>Document</code> is <span>ready for
+  post-load tasks</span>, then the user agent must synchronously run
+  the <span>printing steps</span>. Otherwise, the user agent must only
+  set the <dfn>print when loaded</dfn> flag on the
+  <code>Document</code>.</p>
 
   <p>User agents should also run the <span>printing steps</span>
   whenever the user asks for the opportunity to <span>obtain a
@@ -78944,7 +78955,7 @@
     <p>The user agent must <span>fire a simple event</span> named
     <code title="event-beforeprint">beforeprint</code> at the
     <code>Window</code> object of the <code>Document</code> that is
-    being printed, as well as any <span title="nested browsing
+      being printed, as well as any <span title="nested browsing
     context">nested browsing contexts</span> in it.</p>
 
     <p class="example">The <code
@@ -102571,6 +102582,10 @@
    for these <span title="concept-task">tasks</span> is the
    <span>networking task source</span>.</p></li>
 
+   <li><p>If the <code>Document</code>'s <span>print when
+   loaded</span> flag is set, then run the <span>printing
+   steps</span>.</p></li>
+
    <li><p>The <code>Document</code> is now <dfn>ready for post-load
    tasks</dfn>.</p></li>
 




More information about the Commit-Watchers mailing list