New issue
Advanced search Search tips

Issue 692560 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Alternate stylesheet must have non-empty title

Reported by r...@opera.com, Feb 15 2017

Issue description

Spec [1] says so. With a non-empty title, even if it's not the preferred set, both Gecko and Blink load the alternate stylesheet exposing a non-null LinkStyle.sheet. Without a title, or if the title is empty, Blink still loads the sheet, Gecko doesn't. Test attached.

[1] https://html.spec.whatwg.org/multipage/semantics.html#link-type-stylesheet

 
alternate.html
321 bytes View Download

Comment 1 by r...@opera.com, Feb 15 2017

Labels: Hotlist-GoodFirstBug

Comment 2 by m...@bocoup.com, Feb 15 2017

I believe this is a duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=692204

Comment 3 by meade@chromium.org, Feb 16 2017

Cc: rbyers@chromium.org
 Issue 692204  has been merged into this issue.

Comment 4 by zcorpan@gmail.com, Feb 16 2017

"the title attribute must be specified on the link element, with a non-empty value." in the standard is an authoring requirement, not a UA requirement.

If I follow the spec correctly, it says to load and create a stylesheet.

What do WebKit and Edge do?

Comment 5 by r...@opera.com, Feb 16 2017

According to https://bugs.chromium.org/p/chromium/issues/detail?id=692204#c2 WebKit does not load the sheet.

Comment 6 by r...@opera.com, Feb 16 2017

BrowserStack tells me Edge 13 loads the sheet.

Comment 7 by zcorpan@gmail.com, Feb 17 2017

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4895

<!DOCTYPE html>
<link rel="alternate stylesheet" title="" href="data:text/css,html{background:purple}" id=x onload="w('loaded')">
<script>onload = () => {
 w(x.sheet);
 w(document.styleSheets.length);
}
</script>

Chrome 58.0.3015.0 canary (64-bit):
log: loaded
log: object "[object CSSStyleSheet]" (14 props: ownerRule="null", cssRules="null", rules="null", insertRule=function insertRule() { [native code] }...)
log: 1

Safari TP Release 23 (Safari 10.2, WebKit 12604.1.5)
and
Safari 10.0.3 (12602.4.8):
log: loaded
log: object "[object CSSStyleSheet]" (14 props: ownerRule="null", cssRules="null", rules="null", insertRule=function insertRule() {\n    [native code]\n}...)
log: 0

Firefox Nightly 54.0a1 (2017-02-06) (64-bit):
log: object "null" (0 props)
log: 0

Edge 13 (https://developer.microsoft.com/en-us/microsoft-edge/tools/screenshots/ ):
log: object "[object CSSStyleSheet]" (25 props: ...
log: 1
log: loaded


With the test case in  issue 692204  I get a CSSStyleSheet in Safari TP -- but null in Safari 10.0.3 (12602.4.8). Note that this test checks .sheet immediately after inserting the link.

Comment 8 by r...@opera.com, Feb 17 2017

Labels: -Hotlist-GoodFirstBug

Comment 9 by zcorpan@gmail.com, Feb 17 2017

annevk tested Edge 14 via BrowserStack:

object CSSStyleSheet, 1, loaded
Owner: tkent@chromium.org
Status: Assigned (was: Untriaged)
We're waiting for spec discussion here. Tentatively tkent since he's tagged in the issue thread.
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d48625f7b09df0495e40c7c1ff1cafe00e5693b

commit 3d48625f7b09df0495e40c7c1ff1cafe00e5693b
Author: tkent <tkent@chromium.org>
Date: Fri Mar 03 05:37:41 2017

Update TestExpectations and SlowTests a little bit.

- Remove external/wpt/selection/selectAllChildren.html from SlowTests.
 The test already has a <meta> for long timeout.

- Update bug numbers for LinkStyle.html and delete.html

BUG=692560,698135
NOTRY=true
TBR=yosin@chromomium.org

Review-Url: https://codereview.chromium.org/2729103002
Cr-Commit-Position: refs/heads/master@{#454519}

[modify] https://crrev.com/3d48625f7b09df0495e40c7c1ff1cafe00e5693b/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/3d48625f7b09df0495e40c7c1ff1cafe00e5693b/third_party/WebKit/LayoutTests/TestExpectations

Comment 13 by sim...@opera.com, Sep 14 2017

Cc: -sim...@opera.com zcorpan@gmail.com

Sign in to add a comment