Skip to content

Commit

Permalink
Do not fetch stylesheets in documents without a browsing context
Browse files Browse the repository at this point in the history
This fixes #1495 by changing the "appropriate times to obtain the
resource" to require that the <link rel="stylesheet"> element be in a
document that has a browsing context.
  • Loading branch information
domenic authored and annevk committed Jul 19, 2016
1 parent a6a1b71 commit 76440ea
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -23212,34 +23212,39 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {

<p>The appropriate times to <span data-x="concept-link-obtain">obtain</span> the resource are:

<!-- has a browsing context: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4299 -->
<ul>

<li><p>When the <span>external resource link</span> is created on a <code>link</code> element
that is already <span>in a document</span>.</p></li>
that is already <span>in a document</span> that has a <span data-x="concept-document-bc">browsing
context</span>.</p></li>
<!-- e.g. rel="" changed, href="" set... -->

<li><p>When the <span>external resource link</span>'s <code>link</code> element is <span
data-x="node is inserted into a document">inserted into a document</span>.</p></li>
data-x="node is inserted into a document">inserted into a document</span> that has a <span
data-x="concept-document-bc">browsing context</span>.</p></li>

<li><p>When the <code data-x="attr-link-href">href</code> attribute of the <code>link</code>
element of an <span>external resource link</span> that is already <span>in a document</span> is
changed.</p></li>
element of an <span>external resource link</span> that is already <span>in a document</span> that
has a <span data-x="concept-document-bc">browsing context</span> is changed.</p></li>
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2588 -->

<li><p>When the <code data-x="attr-link-crossorigin">crossorigin</code> attribute of the
<code>link</code> element of an <span data-x="external resource link">external resource
link</span> that is already <span>in a document</span> is set, changed, or removed.</p></li>
link</span> that is already <span>in a document</span> that has a <span
data-x="concept-document-bc">browsing context</span> is set, changed, or removed.</p></li>

<li><p>When the <code data-x="attr-link-type">type</code> attribute of the <code>link</code>
element of an <span>external resource link</span> that is already <span>in a document</span> is
set or changed to a value that does not or no longer matches the <span
data-x="Content-Type">Content-Type metadata</span> of the previous obtained external resource, if
any.</p></li>
element of an <span>external resource link</span> that is already <span>in a document</span> that
has a <span data-x="concept-document-bc">browsing context</span> is set or changed to a value
that does not or no longer matches the <span data-x="Content-Type">Content-Type metadata</span>
of the previous obtained external resource, if any.</p></li>

<li><p>When the <code data-x="attr-link-type">type</code> attribute of the <code>link</code>
element of an <span>external resource link</span> that is already <span>in a document</span>, but
was previously not obtained due to the <code data-x="attr-link-type">type</code> attribute
specifying an unsupported type is set, removed, or changed.</p></li>
element of an <span>external resource link</span> that is already <span>in a document</span> that
has a <span data-x="concept-document-bc">browsing context</span>, but was previously not obtained
due to the <code data-x="attr-link-type">type</code> attribute specifying an unsupported type, is
set, removed, or changed.</p></li>

<li><p>When the <span>external resource link</span> changes from being <span data-x="the link is
an alternative stylesheet">an alternative stylesheet</span> to not being one, or vice
Expand Down

0 comments on commit 76440ea

Please sign in to comment.