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

Issue 754191 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

:host selector doesn't behave when <style> is inserted dynamically

Project Member Reported by elkurin@google.com, Aug 10 2017

Issue description

Chrome Version: 60.0.3112.90 (Official Build) (64-bit)
OS: Linux

JS code:
http://jsbin.com/karubudire/3/edit?html,js,output

Expected result:
The layout has to be solid green box. (The text color has to be green.)

Actual result:
The text color is not changed to green. It is still red after the style has appended to host. 



 

Comment 1 by kochi@chromium.org, Aug 17 2017

Cc: r...@opera.com

Comment 2 by hayato@chromium.org, Aug 17 2017

Components: -Blink>DOM>ShadowDOM Blink>CSS
Summary: :host selector doesn't behave when <style> is inserted dynamically (was: Unexpected behavior in a specific selector)
Labels: Update-Weekly Hotlist-Interop
If we zoom in or out, the text color changes.
Is there a missing SetNeedsStyleRecalc?

Comment 4 by kochi@chromium.org, Aug 18 2017

Yes, the CL is in progress.
https://chromium-review.googlesource.com/c/618069
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 23 2017

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

commit a021e41cfd7d1a56bbc30e1d5346fc44d728d7e6
Author: Eriko Kurimoto <elkurin@google.com>
Date: Wed Aug 23 02:30:32 2017

Include shadow host in elements invalidated by type ruleset invalidations.

When we do a ruleset invalidation for a shadow scope, we schedule an
invalidation set for type selectors on the shadow root node.
This set might also contain tag names for type selectors in :host().
In order to invalidate host elements properly, check if the host's tag name is
contained in any of the type invalidation sets and mark it for style recalc.

Bug:  754191 
Change-Id: I92b5a5dfacb86e65ff52247db34fbc9fa0b2101d
Reviewed-on: https://chromium-review.googlesource.com/618069
Commit-Queue: Eriko Kurimoto <elkurin@google.com>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496561}
[modify] https://crrev.com/a021e41cfd7d1a56bbc30e1d5346fc44d728d7e6/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
[modify] https://crrev.com/a021e41cfd7d1a56bbc30e1d5346fc44d728d7e6/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h
[modify] https://crrev.com/a021e41cfd7d1a56bbc30e1d5346fc44d728d7e6/third_party/WebKit/Source/core/dom/StyleEngine.cpp
[modify] https://crrev.com/a021e41cfd7d1a56bbc30e1d5346fc44d728d7e6/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp

Comment 6 by elkurin@google.com, Aug 28 2017

Status: Fixed (was: Started)
Cc: sarakato@chromium.org
Cc: -sarakato@chromium.org

Sign in to add a comment