Skip to content

Commit

Permalink
Update HTML links and update crossOrigin IDL attribute type.
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam committed Jan 17, 2016
1 parent 69b41ad commit f55a907
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 75 deletions.
26 changes: 13 additions & 13 deletions master/definitions.xml
Expand Up @@ -1168,13 +1168,13 @@
<interface name='event handler IDL attributes' href='http://www.w3.org/TR/2013/CR-html5-20130806/webappapis.html#event-handler-idl-attributes'/>
<interface name='event handlers' href='http://www.w3.org/TR/2013/CR-html5-20130806/webappapis.html#event-handlers'/>
<interface name='GlobalEventHandlers' href='http://www.w3.org/TR/2014/CR-html5-20140204/webappapis.html#globaleventhandlers'/>
<interface name='HTMLAudioElement' href='http://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element'/>
<interface name='HTMLCanvasElement' href='http://www.w3.org/TR/html5/scripting-1.html#the-canvas-element'/>
<interface name='HTMLAudioElement' href='http://www.w3.org/TR/html51/embedded-content-0.html#the-audio-element'/>
<interface name='HTMLCanvasElement' href='http://www.w3.org/TR/html51/scripting-1.html#the-canvas-element'/>
<interface name='HTMLEmbedElement' href='http://www.w3.org/TR/2015/WD-html51-20150323/semantics.html#htmlembedelement'/>
<interface name='HTMLIFrameElement' href='http://www.w3.org/TR/html5/embedded-content-0.html#htmliframeelement'/>
<interface name='HTMLIFrameElement' href='http://www.w3.org/TR/html51/embedded-content-0.html#htmliframeelement'/>
<interface name='HTMLObjectElement' href='http://www.w3.org/TR/2015/WD-html51-20150323/semantics.html#htmlobjectelement'/>
<interface name='HTMLVideoElement' href='http://www.w3.org/TR/html5/embedded-content-0.html#the-video-element'/>
<interface name='HTMLElement' href='http://www.w3.org/TR/html5/dom.html#htmlelement'/>
<interface name='HTMLVideoElement' href='http://www.w3.org/TR/html51/embedded-content-0.html#the-video-element'/>
<interface name='HTMLElement' href='http://www.w3.org/TR/html51/dom.html#htmlelement'/>
<interface name='LinkStyle' href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-LinkStyle'/>
<interface name='Node' href='http://www.w3.org/TR/2014/WD-dom-20140204/#node'/>
<interface name='NodeList' href='http://www.w3.org/TR/2014/WD-dom-20140204/#nodelist'/>
Expand All @@ -1190,14 +1190,14 @@
<term name='InvalidAccessError' href='http://www.w3.org/TR/2014/WD-dom-20140204/#invalidaccesserror'/>
<term name='InvalidStateError' href='http://www.w3.org/TR/2014/WD-dom-20140204/#invalidstateerror'/>
<term name='SyntaxError' href='http://www.w3.org/TR/2014/WD-dom-20140204/#syntaxerror'/>
<term name='CORS settings attribute' href='http://www.w3.org/TR/html5/infrastructure.html#cors-settings-attribute'/>
<term name='limited to only known values' href='http://www.w3.org/TR/html5/infrastructure.html#limited-to-only-known-values'/>
<term name='No CORS' href='http://www.w3.org/TR/html5/infrastructure.html#attr-crossorigin-none'/>
<term name='potentially CORS-enabled fetch' href='http://www.w3.org/TR/html5/infrastructure.html#potentially-cors-enabled-fetch'/>
<term name='origin' href='http://www.w3.org/TR/html5/browsers.html#origin-0'/>
<term name='set of space-separated tokens' href='http://www.w3.org/TR/html5/infrastructure.html#set-of-space-separated-tokens'/>
<term name='set of comma-separated tokens' href='http://www.w3.org/TR/html5/infrastructure.html#set-of-comma-separated-tokens'/>
<term name='same origin' href='http://www.w3.org/TR/html5/browsers.html#same-origin'/>
<term name='CORS settings attribute' href='http://www.w3.org/TR/html51/infrastructure.html#cors-settings-attribute'/>
<term name='limited to only known values' href='http://www.w3.org/TR/html51/infrastructure.html#limited-to-only-known-values'/>
<term name='No CORS' href='http://www.w3.org/TR/html51/infrastructure.html#attr-crossorigin-none'/>
<term name='potentially CORS-enabled fetch' href='http://www.w3.org/TR/html51/infrastructure.html#potentially-cors-enabled-fetch'/>
<term name='origin' href='http://www.w3.org/TR/html51/browsers.html#origin-0'/>
<term name='set of space-separated tokens' href='http://www.w3.org/TR/html51/infrastructure.html#set-of-space-separated-tokens'/>
<term name='set of comma-separated tokens' href='http://www.w3.org/TR/html51/infrastructure.html#set-of-comma-separated-tokens'/>
<term name='same origin' href='http://www.w3.org/TR/html51/browsers.html#same-origin'/>

<term name='referencing mode' href='https://svgwg.org/specs/integration/#referencing-modes'/>
<term name='referencing modes' href='https://svgwg.org/specs/integration/#referencing-modes'/>
Expand Down
35 changes: 17 additions & 18 deletions master/embedded.html
Expand Up @@ -44,11 +44,11 @@ <h1>Embedded Content</h1>

<h2 id="Overview">Overview</h2>
<p>Embedded content is content that imports another resource into the document, or content from another vocabulary that is inserted into the document.
This is the same definition as <a href="http://www.w3.org/TR/html5/">HTML5's</a> <a href="http://www.w3.org/TR/html5/embedded-content-0.html">embedded content</a>.</p>
This is the same definition as <a href="http://www.w3.org/TR/html51/">HTML5's</a> <a href="http://www.w3.org/TR/html51/embedded-content-0.html">embedded content</a>.</p>

<p>SVG supports embedded content with the use of <a>'image'</a> and <a>'foreignObject'</a> elements.</p>

<p>Additionally SVG allows embedded content using HTML5 <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-video-element">'video'</a>, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element">'audio'</a>, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element">'iframe'</a> and <a href="http://www.w3.org/TR/html5/scripting-1.html#the-canvas-element">'canvas'</a> elements.</p>
<p>Additionally SVG allows embedded content using HTML5 <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-video-element">'video'</a>, <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-audio-element">'audio'</a>, <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-iframe-element">'iframe'</a> and <a href="http://www.w3.org/TR/html51/scripting-1.html#the-canvas-element">'canvas'</a> elements.</p>

<p>Except <a>'canvas'</a> and <a>'foreignObject'</a>, embedded content supports <a href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html">Resource Priorities</a> for hinting of downloading external resources. </p>

Expand Down Expand Up @@ -235,8 +235,8 @@ <h2 id="ImageElement">The <span class='element-name'>'image'</span> element</h2>
</tr>
<tr>
<td><dfn data-dfn-type="element-attr" data-dfn-for="image" id="ImageElementCrossoriginAttribute">crossorigin</dfn></td>
<td>[ anonymous | use-credentials ]</td>
<td>anonymous</td>
<td>[ anonymous | use-credentials ]?</td>
<td>(see HTML definition of attribute)</td>
<td>yes</td>
</tr>
</table>
Expand Down Expand Up @@ -268,7 +268,7 @@ <h2 id="ImageElement">The <span class='element-name'>'image'</span> element</h2>
<a href="linking.html#XLinkRefAttrs">deprecated XLink attributes</a>.</p>
<p>To get the referenced resource, do a <a>potentially CORS-enabled fetch</a> of the absolute URL that resulted from the earlier step, with the <em>mode</em> being the current state of the
element's <a>'crossorigin'</a> attribute, the <em>origin</em> being the <a>origin</a> of the <a>'image'</a> element's <a>Document</a>, and the <em>default origin behaviour</em> set to <em>taint</em>.
For <a>origin</a>, the rules defined for the html <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element">'img'</a> element apply the same way to the svg <a>'image'</a> element.
For <a>origin</a>, the rules defined for the html <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-img-element">'img'</a> element apply the same way to the svg <a>'image'</a> element.
</p>
</dd>
<dt>
Expand Down Expand Up @@ -313,21 +313,21 @@ <h2 id="ImageElement">The <span class='element-name'>'image'</span> element</h2>

<h2 id="HTMLElements">HTML5 elements in SVG subtrees</h2>

<p>The following HTML5 elements render when included in an SVG subtree as a child of a <a>container element</a> and when using the <a href="http://www.w3.org/TR/html5/infrastructure.html#namespaces">HTML namespace</a>:</p>
<p>The following HTML5 elements render when included in an SVG subtree as a child of a <a>container element</a> and when using the <a href="http://www.w3.org/TR/html51/infrastructure.html#namespaces">HTML namespace</a>:</p>
<ul>
<li><a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-video-element">'video'</a></li>
<li><a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element">'audio'</a></li>
<li><a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element">'iframe'</a></li>
<li><a href="http://www.w3.org/TR/html5/scripting-1.html#the-canvas-element">'canvas'</a></li>
<li><a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-video-element">'video'</a></li>
<li><a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-audio-element">'audio'</a></li>
<li><a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-iframe-element">'iframe'</a></li>
<li><a href="http://www.w3.org/TR/html51/scripting-1.html#the-canvas-element">'canvas'</a></li>
</ul>

<edit:example href='images/embedded/videoinsvg.svg' name='videoinsvg' link='no' image='no'/>

<p>HTML elements, in the HTML namespace, used as children of <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-video-element">'video'</a>, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-audio-element">'audio'</a>, <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element">'iframe'</a> and <a href="http://www.w3.org/TR/html5/scripting-1.html#the-canvas-element">'canvas'</a> elements within an SVG document fragment behave as specified in HTML. This applies in particular to <a href="http://www.w3.org/TR/html5/dom.html#fallback-content">fallback content</a>.</p>
<p>HTML elements, in the HTML namespace, used as children of <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-video-element">'video'</a>, <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-audio-element">'audio'</a>, <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-iframe-element">'iframe'</a> and <a href="http://www.w3.org/TR/html51/scripting-1.html#the-canvas-element">'canvas'</a> elements within an SVG document fragment behave as specified in HTML. This applies in particular to <a href="http://www.w3.org/TR/html51/dom.html#fallback-content">fallback content</a>.</p>

<edit:example href='images/embedded/videofallback.svg' name='videofallback' link='no' image='no'/>

<p>This is applicable also for the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-track-element">'track'</a> and <a href="http://www.w3.org/TR/html5/embedded-content-0.html#the-source-element">'source'</a> elements.</p>
<p>This is applicable also for the <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-track-element">'track'</a> and <a href="http://www.w3.org/TR/html51/embedded-content-0.html#the-source-element">'source'</a> elements.</p>

<edit:example href='images/embedded/sourceinsvg.svg' name='sourceinsvg' link='no' image='no'/>

Expand All @@ -337,17 +337,17 @@ <h2 id="HTMLElements">HTML5 elements in SVG subtrees</h2>

<edit:example href='images/embedded/videotransform.svg' name='videotransform' link='no' image='no'/>

<p>For the purpose of sizing the HTML subtree root element, the HTML <a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">'width'</a> and <a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">'height'</a> attributes and the CSS sizing properties (e.g. <a>'width'</a> or 'min-width') are used. For the purpose of resolving percentage values in the element sizing or in the layout and positioning of children elements in the HTML subtree, the current SVG viewport is defined to be the <a href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">containing block</a> of the HTML subtree.</p>
<p>For the purpose of sizing the HTML subtree root element, the HTML <a href="http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-width">'width'</a> and <a href="http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-width">'height'</a> attributes and the CSS sizing properties (e.g. <a>'width'</a> or 'min-width') are used. For the purpose of resolving percentage values in the element sizing or in the layout and positioning of children elements in the HTML subtree, the current SVG viewport is defined to be the <a href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">containing block</a> of the HTML subtree.</p>
<p class="note">
Note that html specification says that <a class="html" href=" http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width"><code>'width'</code></a> and <a class="html" href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height"><code>'height'</code></a> attributes of embedded content of html accepts integer. Accordingly, if you want to point to a floating point number for those sizing, you should use css <a href="geometry.html#Sizing">sizing property</a> instead of such html attributes.
Note that html specification says that <a class="html" href=" http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-width"><code>'width'</code></a> and <a class="html" href="http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-height"><code>'height'</code></a> attributes of embedded content of html accepts integer. Accordingly, if you want to point to a floating point number for those sizing, you should use css <a href="geometry.html#Sizing">sizing property</a> instead of such html attributes.
</p>
<edit:example href='images/embedded/videosizing.svg' name='videosizing' link='no' image='no'/>

<edit:example href='images/embedded/videofallbacksizing.svg' name='videofallbacksizing' link='no' image='no'/>

<p>As SVG elements are implicitly <a href="http://www.w3.org/TR/CSS21/visuren.html#position-props">positioned</a>, the root of the HTML subtree has <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#display-prop">block display</a>.</p>

<p class="note">The <a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">'width'</a> and <a href="http://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">'height'</a> attributes of the HTML elements are defined by the HTML specification and are not SVG geometry properties. In particular, they do accept units. The 'width' and 'height' properties do.</p>
<p class="note">The <a href="http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-width">'width'</a> and <a href="http://www.w3.org/TR/html51/embedded-content-0.html#attr-dim-width">'height'</a> attributes of the HTML elements are defined by the HTML specification and are not SVG geometry properties. In particular, they do accept units. The 'width' and 'height' properties do.</p>

<p>Other HTML5 elements in an SVG subtree, when used outside of a <a>'foreignObject'</a> element, in any namespace, are treated as <a href="struct.html#UnknownElement">unknown elements</a>.</p>

Expand Down Expand Up @@ -539,7 +539,7 @@ <h3 id="InterfaceSVGImageElement">Interface SVGImageElement</h3>
[SameObject] readonly attribute <a>SVGAnimatedLength</a> <a href="embedded.html#__svg__SVGImageElement__width">width</a>;
[SameObject] readonly attribute <a>SVGAnimatedLength</a> <a href="embedded.html#__svg__SVGImageElement__height">height</a>;
[SameObject] readonly attribute <a>SVGAnimatedPreserveAspectRatio</a> <a href="embedded.html#__svg__SVGImageElement__preserveAspectRatio">preserveAspectRatio</a>;
attribute DOMString <a href="embedded.html#__svg__SVGImageElement__crossOrigin">crossOrigin</a>;
attribute DOMString? <a href="embedded.html#__svg__SVGImageElement__crossOrigin">crossOrigin</a>;
};

<a>SVGImageElement</a> implements <a>SVGURIReference</a>;</pre>
Expand All @@ -557,8 +557,7 @@ <h3 id="InterfaceSVGImageElement">Interface SVGImageElement</h3>
IDL attribute <a>reflects</a> the <a>'preserveAspectRatio'</a> content attribute.</p>

<p>The <b id="__svg__SVGImageElement__crossOrigin">crossOrigin</b> IDL attribute
<a>reflects</a> the <a>'crossorigin'</a> content attribute,
<a>limited to only known values</a>.</p>
<a>reflects</a> the <a>'crossorigin'</a> content attribute.</p>

</edit:with>

Expand Down

0 comments on commit f55a907

Please sign in to comment.