Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore title="" for <style> and <link> in shadow trees #1675

Merged
merged 1 commit into from
Aug 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -12771,8 +12771,9 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {

<p>The <dfn><code data-x="attr-link-title">title</code></dfn> attribute gives the title of the
link. With one exception, it is purely advisory. The value is text. The exception is for style
sheet links, where the <code data-x="attr-link-title">title</code> attribute defines
<span data-x="CSS style sheet set">CSS style sheet sets</span>.</p>
sheet links that are <span>in a document tree</span>, for which the <code
data-x="attr-link-title">title</code> attribute defines <span data-x="CSS style sheet set">CSS
style sheet sets</span>.</p>

<p class="note">The <code data-x="attr-link-title">title</code> attribute on <code>link</code>
elements differs from the global <code data-x="attr-title">title</code> attribute of most other
Expand Down Expand Up @@ -14148,7 +14149,9 @@ interface <dfn>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
<code>style</code> elements defines <span data-x="CSS style sheet set">CSS style sheet
sets</span>. If the <code>style</code> element has no <code data-x="attr-style-title">title</code>
attribute, then it has no title; the <code data-x="attr-title">title</code> attribute of ancestors
does not apply to the <code>style</code> element. <ref spec=CSSOM></p>
does not apply to the <code>style</code> element. If the <code>style</code> element is not
<span>in a document tree</span>, then the <code data-x="attr-style-title">title</code> attribute
is ignored. <ref spec=CSSOM></p>

<p class="note">The <code data-x="attr-style-title">title</code> attribute on <code>style</code>
elements, like the <code data-x="attr-link-title">title</code> attribute on <code>link</code>
Expand Down Expand Up @@ -14251,7 +14254,8 @@ c-end = "-->"</pre>

<dd>

<p>The <code data-x="attr-style-title">title</code> attribute of <var>element</var>.</p>
<p>The <code data-x="attr-style-title">title</code> attribute of <var>element</var>, if
<var>element</var> is <span>in a document tree</span>, or the empty string otherwise.</p>
Copy link
Member

@hayatoito hayatoito Aug 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per WICG/webcomponents#535 (comment),
shouldn't it be null, instead of empty string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought, but it turns out CSSOM prefers strings and then translates the empty string to null: https://drafts.csswg.org/cssom/#dom-stylesheet-title

Maybe we should include a note explaining this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I see. I did not know that.

LGTM as is.


<p class="note">Again, this is a <em>reference</em> to the attribute.</p>

Expand Down Expand Up @@ -23407,7 +23411,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {

<dd>

<p>The <code data-x="attr-link-title">title</code> attribute of <var>element</var>.</p>
<p>The <code data-x="attr-link-title">title</code> attribute of <var>element</var>, if
<var>element</var> is <span>in a document tree</span>, or the empty string otherwise.</p>

<p class="note">This is similarly a reference to the attribute, rather than a copy of the
attribute's current value.</p>
Expand Down