:host rules do not apply with default html @namespace
Reported by
r...@opera.com,
May 30 2017
|
||||
Issue descriptionAdding @namespace url(http://www.w3.org/1999/xhtml); to a shadow dom stylesheet causes simple :host rules to stop matching. Test case attached. What happens is probably that we add an implicit namespaced universal selector in front of the :host rule which should not match when specified explicitly like htmlns|*:host. Instead, we should probably have an implicit namespace inside the host pseudo instead: :host(htmlns|*) hayato@, kochi@: any comments?
,
May 31 2017
,
May 31 2017
,
May 31 2017
,
May 31 2017
Sounds reasonable. Adding a WPT test is a good idea.
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9eb2ce73f3fd97937175208086cfe85901e6ecf6 commit 9eb2ce73f3fd97937175208086cfe85901e6ecf6 Author: Rune Lillesveen <rune@opera.com> Date: Wed May 31 07:06:33 2017 Do not prepend implicit type selectors to :host rules. :host and :host-context() should not have implicit type selectors pre- pended for universal rules with default @namespace. Default @namespace applies to type and universal selectors inside :host() and :host-context(), but a default @namespace rule should not affect :host. That is, :host matches the host element regardless of any @namespace rules. R=hayato@chromium.org,kochi@chromium.org BUG= 727603 Change-Id: I78d2919275aa6bdc4fdc5b02a4772d2352819258 Reviewed-on: https://chromium-review.googlesource.com/518019 Reviewed-by: Takayoshi Kochi <kochi@chromium.org> Commit-Queue: Rune Lillesveen <rune@opera.com> Cr-Commit-Position: refs/heads/master@{#475834} [add] https://crrev.com/9eb2ce73f3fd97937175208086cfe85901e6ecf6/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping-1/css-scoping-shadow-host-namespace.html [modify] https://crrev.com/9eb2ce73f3fd97937175208086cfe85901e6ecf6/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
,
May 31 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by r...@opera.com
, May 30 2017