Issue metadata
Sign in to add a comment
|
custom css properties are not applied on the page from stylesheets injected by extensions
Reported by
pavel.ag...@gmail.com,
Nov 3 2017
|
||||||||||||||||||||||
Issue description
Chrome Version : 64.0.3257.0 (Official Build) canary (64-bit)
URLs (if applicable) : <all_urls>
What steps will reproduce the problem?
(1) Create css file with the following content: `:root { --prop:test }`
(2) Create extension manifest file that injects this css file in <all_urls>
(3) Load the folder with these files as unpacked extension
(4) Go to any page
(5) Open DevTools
(6) Select any element
(7) Select "Computed" tab and check "Show all"
(8) `--prop` will be absent
What is the expected result?
`--prop` should have value specified in the injected stylesheet
What happens instead?
`--prop` is absent
Additional information:
In previous Chrome versions it works as expected.
The problem is relevant only to custom css properties with all kind of css selectors.
All other styles apply correctly.
When custom property retrieved via code like this:
`window.getComputedStyle(document.body,null).getPropertyValue("--prop")`
It returns:
`""`
,
Nov 3 2017
Possible suspect from the above bisect. https://chromium-review.googlesource.com/c/chromium/src/+/641294 Assigning to one of the reviewer since the patch is committed by a non googler.
,
Nov 6 2017
This is because we did not take into account custom properties in user style sheets. I have uploaded a patch: crrev.com/c/754247
,
Nov 7 2017
,
Nov 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56daa9455a7ab0cc7af996980b741aa1ec82a42b commit 56daa9455a7ab0cc7af996980b741aa1ec82a42b Author: Manish Jethani <m.jethani@eyeo.com> Date: Fri Nov 10 06:24:46 2017 Apply custom properties in user style sheets With crrev.com/c/641294 we introduced user style sheets, but without taking into account custom properties. This patch adds support for custom properties in user style sheets by calling StyleResolver::ApplyMatchedProperties for user rules in the correct order. BUG= 632009 , 781223 Change-Id: I1c103fc37484835008b1b55e9b3b8099af50a48a Reviewed-on: https://chromium-review.googlesource.com/754247 Reviewed-by: nainar <nainar@chromium.org> Commit-Queue: nainar <nainar@chromium.org> Cr-Commit-Position: refs/heads/master@{#515478} [modify] https://crrev.com/56daa9455a7ab0cc7af996980b741aa1ec82a42b/third_party/WebKit/Source/core/css/StyleEngineTest.cpp [modify] https://crrev.com/56daa9455a7ab0cc7af996980b741aa1ec82a42b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
,
Nov 10 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by woxxom@gmail.com
, Nov 3 2017539 bytes
539 bytes Download
246 bytes
246 bytes View Download