New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 784791 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

document.styleSheets is not consistent with disabled link elements

Reported by jsnj...@gmail.com, Nov 14 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Steps to reproduce the problem:
1. Open https://jsnjack.github.io/stylesheet_list.html
2. Open https://jsnjack.github.io/stylesheet_list_dynamic.html
3. Observe different output on the page

What is the expected behavior?
The output on the page should be the same (which means that document.styleSheets should return the same data)

What went wrong?
In step one the link element was part of the HTML code and after it was disabled it still presented in document.styleSheets.

In step two the link element was created and added to the page with javascript. If the link is disabled it is not presented in document.styleSheets (Amount of stylesheets: 0)

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: Version 62.0.3202.89 (Official Build) (64-bit)  Channel: stable
OS Version: Fedora 26
Flash Version: 

This behavior is consistent in Firefox and IE (Amount of stylesheets: 1)
 
Components: Blink>CSS
Cc: divya.pa...@techmahindra.com
Labels: Triaged-ET Needs-Feedback Needs-Triage-M62
Unable to reproduce the issue on reported version 62.0.3202.89 using ubuntu 14.04. Please find the attached screen-cast and let us know if we have missed any steps in the process of reproducing issue from TE-end

Could you please let us know if this issue is specific to Fedora 26
784791.ogv
775 KB View Download

Comment 3 by jsnj...@gmail.com, Nov 15 2017

Looks like I uploaded a wrong tests case. Sorry about that!

Three test cases:
 1. https://jsnjack.github.io/stylesheet_list.html
 2. https://jsnjack.github.io/stylesheet_list_dynamic.html
 3. https://jsnjack.github.io/stylesheet_list_dynamic2.html

So testcases 1,2 work as expected. In #3 you can see `Amount of stylesheets: 0`. The difference in testcase #3 is that the disabled property set to true before the link element is attached to DOM.

Firefox 57 in testcase #3 ignores the disabled property and applies styles to the page.

IE 11 in testcase #3 shows `Amount of stylesheets: 1`

Project Member

Comment 4 by sheriffbot@chromium.org, Nov 15 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "divya.padigela@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Blink>CSS Blink>HTML>Link
Able to repro on chrome stable 61.0.3163.100 and chrome canary 64.0.3269.0.

This doesn't seem like a CSS issue, moving to HTML>Link
Labels: M-64 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #62.0.3202.89 and latest canary #64.0.3271.0.
This is a non-regression issue as it is observed from M50 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!

Comment 7 by kochi@chromium.org, Nov 27 2017

Components: -Blink>HTML>Link Blink>CSS
Can style team handle this issue?
This is related to how Blink handles active style sheets.
Labels: Update-Quarterly
Status: Available (was: Untriaged)
Labels: ApproachableBug
Labels: -Update-Quarterly
I believe our behavior does not follow the spec, as https://html.spec.whatwg.org/multipage/semantics.html#update-a-style-block says nothing about checking whether the stylesheet is disabled. However, I'm not sure exactly where we perform this check.

Sign in to add a comment