Changing rel or href attribute of link rel="stylesheet" within shadow root does not remove stylesheet
Reported by
tomalec...@gmail.com,
Feb 28 2018
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36 Steps to reproduce the problem: 1. Create shadow root, 2. Add `link rel="stylesheet"` into shadow root, 3. Add something to the shadow root, to see if rules from stylesheet are applied, 4. Change `rel` or `href` attribute of the link from 2. to something else, http://jsbin.com/hosokep/6/edit?html,output What is the expected behavior? Rules should no longer be applied What went wrong? Rules are still applied as if it was `link rel="stylesheet" href="style.css"` Did this work before? N/A Chrome version: 64.0.3282.167 Channel: stable OS Version: 10.0 Flash Version: It is working exactly the same in V0 API http://jsbin.com/faboyeyiwe/1/edit?html,output
,
Mar 1 2018
Able to reproduce this issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome reported version #64.0.3282.167. Note: On latest canary #66.0.3358.0, the output is a blank page. This is a non-regression issue as it is observed from M60 old builds. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
Mar 1 2018
This seems to be a CSS invalidation bug.
,
Mar 1 2018
,
Mar 3 2018
,
Mar 29 2018
rakina@, could you work on this? cc: kochi@
,
Apr 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6b65abd7fa82b44258dd602846c49043c3b805a2 commit 6b65abd7fa82b44258dd602846c49043c3b805a2 Author: Rakina Zata Amni <rakina@chromium.org> Date: Thu Apr 05 07:07:38 2018 Remove stylesheet of link element when rel != stylesheet Stylesheets from link elements that previously have rel = "stylesheet" but then changed to something else should be removed/not considered anymore until the rel attribute is changed back to "stylesheet" again. Currently this works correctly for link elements in the document tree, but fails in link elements within a shadow tree because link elements in shadow tree with rel attribute != "stylesheet" are skipped from processing. Because of that, the stylesheet in the link element was never cleared and no style recalc happened. JSBin from bug: http://jsbin.com/bojunajaju/edit?html,console,output Bug: 817355 Change-Id: I57c71c79c0cc471d36eb988b8a81eef82c33548a Reviewed-on: https://chromium-review.googlesource.com/995116 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by: Hayato Ito <hayato@chromium.org> Cr-Commit-Position: refs/heads/master@{#548357} [add] https://crrev.com/6b65abd7fa82b44258dd602846c49043c3b805a2/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/link-rel-attribute.html [add] https://crrev.com/6b65abd7fa82b44258dd602846c49043c3b805a2/third_party/WebKit/LayoutTests/external/wpt/html/semantics/document-metadata/the-link-element/resources/link-rel-attribute.css [modify] https://crrev.com/6b65abd7fa82b44258dd602846c49043c3b805a2/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp [modify] https://crrev.com/6b65abd7fa82b44258dd602846c49043c3b805a2/third_party/WebKit/Source/core/html/LinkStyle.cpp
,
Apr 5 2018
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by susan.boorgula@chromium.org
, Feb 28 2018