Skip to content

Commit

Permalink
[e] (0) Use more WebIDL (and some minor editorial fixes I forgot to c…
Browse files Browse the repository at this point in the history
…ommit before making the WebIDL change)

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20286
Affected topics: Canvas, DOM APIs, HTML, HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@7822 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 12, 2013
1 parent ed7f804 commit f407537
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 101 deletions.
64 changes: 31 additions & 33 deletions complete.html
Expand Up @@ -8308,8 +8308,8 @@ <h3 id=documents><span class=secno>3.1 </span>Documents</h3>
readonly attribute <a href=#htmlscriptelement>HTMLScriptElement</a>? <a href=#dom-document-currentscript title=dom-document-currentScript>currentScript</a>;

// <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
<a href=#document>Document</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type, optional DOMString replace);
<a href=#windowproxy>WindowProxy</a> <a href=#dom-document-open title=dom-document-open>open</a>(DOMString url, DOMString name, DOMString features, optional boolean replace);
<a href=#document>Document</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type = "text/html", optional DOMString replace = "");
<a href=#windowproxy>WindowProxy</a> <a href=#dom-document-open title=dom-document-open>open</a>(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
void <a href=#dom-document-close title=dom-document-close>close</a>();
void <a href=#dom-document-write title=dom-document-write>write</a>(DOMString... text);
void <a href=#dom-document-writeln title=dom-document-writeln>writeln</a>(DOMString... text);
Expand Down Expand Up @@ -9641,7 +9641,7 @@ <h5 id=the-translate-attribute><span class=secno>3.2.3.4 </span>The <code title=

<div class=example>

<p>In this example, everything in the document is to be translated when the page is localised,
<p>In this example, everything in the document is to be translated when the page is localized,
except the sample keyboard input and sample program output:</p>

<pre>&lt;!DOCTYPE HTML&gt;
Expand Down Expand Up @@ -11775,20 +11775,21 @@ <h4 id=opening-the-input-stream><span class=secno>3.4.1 </span>Opening the input
unloaded</a>. Initially, the counter must be set to zero.</p> <!--
http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -->

<p>When called with two or fewer arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method must act as follows:</p>
<p>When called with two arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code>
method must act as follows:</p>

<ol><li><p>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML
document</a>, throw an <code><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these steps.</li>

<li><p>If the <code><a href=#document>Document</a></code> object is not an <a href=#active-document>active document</a>, then abort
these steps.</li>

<li><p>Let <var title="">type</var> be the value of the first argument, if there is one, or
"<code><a href=#text/html>text/html</a></code>" otherwise.</li>
<li><p>Let <var title="">type</var> be the value of the first argument.</li>

<li>
<!--CLEANUP-->

<p>If there is a second argument and it is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the
<p>If the second argument is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the
value "replace", then let <var title="">replace</var> be true.</p>

<p>Otherwise, if the <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session history</a> contains only
Expand Down Expand Up @@ -11953,7 +11954,8 @@ <h4 id=opening-the-input-stream><span class=secno>3.4.1 </span>Opening the input
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>
<!--CLEANUP-->
<p>When called with four arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code>
method on the <code><a href=#document>Document</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=#document>Document</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
Expand Down Expand Up @@ -12007,6 +12009,7 @@ <h4 id=closing-the-input-stream><span class=secno>3.4.2 </span>Closing the input

<h4 id=document.write()><span class=secno>3.4.3 </span><code title=dom-document-write><a href=#dom-document-write>document.write()</a></code></h4>

<!--CLEANUP-->
<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-write><a href=#dom-document-write>write</a></code>(<var title="">text</var>...)</dt>

<dd>
Expand Down Expand Up @@ -12042,6 +12045,7 @@ <h4 id=document.write()><span class=secno>3.4.3 </span><code title=dom-document-

</dl><div class=impl>

<!--CLEANUP-->
<p><code><a href=#document>Document</a></code> objects have an
<dfn id=ignore-destructive-writes-counter>ignore-destructive-writes counter</dfn>, which is used in
conjunction with the processing of <code><a href=#the-script-element>script</a></code> elements to
Expand Down Expand Up @@ -12125,6 +12129,7 @@ <h4 id=document.write()><span class=secno>3.4.3 </span><code title=dom-document-

<h4 id=document.writeln()><span class=secno>3.4.4 </span><code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code></h4>

<!--CLEANUP-->
<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-writeln><a href=#dom-document-writeln>writeln</a></code>(<var title="">text</var>...)</dt>

<dd>
Expand Down Expand Up @@ -33820,7 +33825,7 @@ <h6 id=line-styles><span class=secno>4.8.11.2.4 </span>Line styles</h6>

</dd>

</dl><div class=impl>
</dl><!--CLEANUP--><div class=impl>

<p>Objects that implement the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code>
interface have attributes and methods (defined in this section) that
Expand Down Expand Up @@ -33919,10 +33924,10 @@ <h6 id=line-styles><span class=secno>4.8.11.2.4 </span>Line styles</h6>
interface is created, the <code title=dom-context-2d-lineDashOffset><a href=#dom-context-2d-linedashoffset>lineDashOffset</a></code>
attribute must initially have the value <code>0.0</code>.</p>

<hr><p>When a user agent is to <dfn id=trace-a-path>trace a <span>path</span></dfn>,
<hr><p>When a user agent is to <dfn id=trace-a-path>trace a <span title=concept-path>path</span></dfn>,
given an object <var title="">style</var> that implements the
<code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code> interface, it must run the following
algorithm. This algorithm returns a new <a href=#path>path</a>.</p>
algorithm. This algorithm returns a new <a href=#concept-path title=concept-path>path</a>.</p>

<ol><li><p>Let <var title="">path</var> be a copy of the path being
traced.</li>
Expand Down Expand Up @@ -34080,7 +34085,7 @@ <h6 id=line-styles><span class=secno>4.8.11.2.4 </span>Line styles</h6>

<li>

<p>Create a new <a href=#path>path</a> that describes the result of
<p>Create a new <a href=#concept-path title=concept-path>path</a> that describes the result of
inflating the paths in <var title="">path</var> perpendicular to
the direction of the path to the <var title="">styles</var> <code title=dom-context-2d-lineWidth><a href=#dom-context-2d-linewidth>lineWidth</a></code> width, replacing
each point with the end cap necessary to satisfy the <var title="">styles</var> <code title=dom-context-2d-lineCap><a href=#dom-context-2d-linecap>lineCap</a></code> attribute as
Expand Down Expand Up @@ -34595,6 +34600,7 @@ <h6 id=text-styles><span class=secno>4.8.11.2.5 </span>Text styles</h6>

</ol><h6 id=building-paths><span class=secno>4.8.11.2.6 </span>Building paths</h6>

<!--CLEANUP-->
<p>Each object implementing the <code><a href=#canvaspathmethods>CanvasPathMethods</a></code>
interface has a <a href=#concept-path title=concept-path>path</a>. A <dfn id=concept-path title=concept-path>path</dfn> has a list of zero or more subpaths.
Each subpath consists of a list of one or more points, connected by
Expand Down Expand Up @@ -35319,7 +35325,7 @@ <h6 id=path-objects><span class=secno>4.8.11.2.7 </span><code><a href=#path>Path
<li><p>Move all the shapes in <var title="">glyphs</var> to the right by <var title="">x</var>
CSS pixels and down by <var title="">y</var> CSS pixels.</li>

<li><p>Let <var title="">glyph subpaths</var> be a <a href=#path>path</a> describing the shapes given
<li><p>Let <var title="">glyph subpaths</var> be a <a href=#concept-path title=concept-path>path</a> describing the shapes given
in <var title="">glyphs</var>, with each CSS pixel in the coordinate space of <var title="">glyphs</var> mapped to one coordinate space unit in <var title="">glyph subpaths</var>.
Subpaths in <var title="">glyph subpaths</var> must wind clockwise, regardless of how the user
agent's font subsystem renders fonts and regardless of how the fonts themselves are defined.</p>
Expand Down Expand Up @@ -37315,7 +37321,7 @@ <h6 id=hit-regions><span class=secno>4.8.11.2.15 </span>Hit regions</h6>
<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-role>role</code> member's value is the empty string, and the <code title=dom-HitRegionOptions-label>label</code> member's value is either null or the empty
string.</li>

<li>The <a href=#path>path</a> <var title="">source path</var> describes a shape with no
<li>The <a href=#concept-path title=concept-path>path</a> <var title="">source path</var> describes a shape with no
pixels.</li>

<li>The <var title="">arguments</var> object's <code title=dom-HitRegionOptions-control>control</code> member is not null but is neither an
Expand Down Expand Up @@ -64212,14 +64218,6 @@ <h4 id=browsing-context-names><span class=secno>6.1.6 </span>Browsing context na
<td>current
<td>master

<tr><td>none specified, for <code title=dom-open><a href=#dom-open>window.open()</a></code> <!-- same as _blank -->
<td>new
<td>new
<td>maybe new&dagger;
<td>maybe new&dagger;
<td>maybe new&dagger;
<td>maybe new&dagger;

<tr><td>empty string
<td>current
<td>master
Expand All @@ -64231,10 +64229,10 @@ <h4 id=browsing-context-names><span class=secno>6.1.6 </span>Browsing context na
<tr><td><code title="">_blank</code>
<td>new
<td>new
<td>maybe new
<td>maybe new
<td>maybe new
<td>maybe new
<td>maybe new&dagger;
<td>maybe new&dagger;
<td>maybe new&dagger;
<td>maybe new&dagger;

<tr><td><code title="">_self</code>
<td>current
Expand Down Expand Up @@ -64501,7 +64499,7 @@ <h3 id=the-window-object><span class=secno>6.2 </span>The <code><a href=#window>
attribute <a href=#windowproxy>WindowProxy</a>? <a href=#dom-opener title=dom-opener>opener</a>;
readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-parent title=dom-parent>parent</a>;
readonly attribute <a href=#element>Element</a>? <a href=#dom-frameelement title=dom-frameElement>frameElement</a>;
<a href=#windowproxy>WindowProxy</a> <a href=#dom-open title=dom-open>open</a>(optional DOMString url, optional DOMString target, optional DOMString features, optional boolean replace);
<a href=#windowproxy>WindowProxy</a> <a href=#dom-open title=dom-open>open</a>(optional DOMString url = "about:blank", optional DOMString target = "_blank", optional DOMString features = "", optional boolean replace = false);
<a href=#dom-window-item title=dom-window-item>getter</a> <a href=#windowproxy>WindowProxy</a> (unsigned long index);
<a href=#dom-window-nameditem title=dom-window-namedItem>getter</a> object (DOMString name);

Expand Down Expand Up @@ -64682,15 +64680,16 @@ <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=se

<p>The method has four arguments, though they are all optional.</p>

<!--CLEANUP-->
<p>The first argument, <var title="">url</var>, must be a <a href=#valid-non-empty-url>valid non-empty URL</a> for a
page to load in the browsing context. If no arguments are provided, or if the first argument is
the empty string, then the <var title="">url</var> argument defaults to
"<code><a href=#about:blank>about:blank</a></code>". The argument must be <a href=#resolve-a-url title="resolve a url">resolved</a> to an
page to load in the browsing context. If the first argument is
the empty string, then the <var title="">url</var> argument must be interpreted as
"<code><a href=#about:blank>about:blank</a></code>". Otherwise, the argument must be <a href=#resolve-a-url title="resolve a url">resolved</a> to an
<a href=#absolute-url>absolute URL</a> (or an error), relative to the <a href=#entry-script>entry script</a>'s <a href="#script's-base-url" title="script's base URL">base URL</a>, when the method is invoked.</p>

<p>The second argument, <var title="">target</var>, specifies the <a href=#browsing-context-name title="browsing context
name">name</a> of the browsing context that is to be navigated. It must be a <a href=#valid-browsing-context-name-or-keyword>valid
browsing context name or keyword</a>. If fewer than two arguments are provided, then the <var title="">target</var> argument defaults to the value "<code>_blank</code>".</p>
browsing context name or keyword</a>.</p>

<p>The third argument, <var title="">features</var>, has no defined effect and is mentioned for
historical reasons only. User agents may interpret this argument as instructions to set the size
Expand All @@ -64700,8 +64699,7 @@ <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=se
<p>The fourth argument, <var title="">replace</var>, specifies whether or not the new page will
<a href=#replacement-enabled title="replacement enabled">replace</a> the page currently loaded in the browsing
context, when <var title="">target</var> identifies an existing browsing context (as opposed to
leaving the current page in the browsing context's <a href=#session-history>session history</a>). When three or
fewer arguments are provided, <var title="">replace</var> defaults to false.</p>
leaving the current page in the browsing context's <a href=#session-history>session history</a>).</p>

<p>When the method is invoked, the user agent must first select a <a href=#browsing-context>browsing context</a> to
navigate by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing context
Expand Down

0 comments on commit f407537

Please sign in to comment.