Bug 38113
Summary: | Disabling a 'style' element through DOM doesn't reload the style sheet | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mitch 74 <mitch074> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | ap, bfulgham, koivisto, pangle, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://www.arcrachatcredits.org | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=26179 |
Mitch 74
Probably related to bug 14586.
Webkit doesn't populate document.styleSheets with stylesheets other than the
default/preferred one (no way to access alternate stylesheets for example), so
there is no way to use a Javascript stylesheet switcher. The following methods
don't work:
- inserting a new stylesheet through Javascript then enabling it
- disabling the preferred stylesheet
- enabling an alternate stylesheet
- disabling (as in, object.disabled=true) the (X)HTML element that loads the
preferred stylesheet (STYLE or LINK tags)
Untested: deleting the DOM node instead of merely disabling it
Test case:
http://www.arcrachatcredits.org
This website disables the stylesheet 'style-vert-css2.css' loaded through a
STYLE tag in the head if the document's body is smaller than 640x400 (and
re-enables it if resized above said resolution).
The test case works on Firefox 2.0 to 3.7a5pre, IE 7 (real and emulated) to 9,
Opera 10.10.
It doesn't work in Konqueror 4.2, Chromium 5.0.339, Chrome 4.1.249.1045, Safari
4.0.5 (531.22.7).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brent Fulgham
I can't tell a difference between Safari, Chrome, or Firefox on this site. Please REOPEN this bug with a simple test case if you believe there is still an issue here.
Alexey Proskuryakov
I would expect that we still have issues in this area (and other browsers might too). But someone would need to create minimized test cases.