@apply does not calculated variable value correctly |
||||
Issue descriptionVersion: Version 54.0.2816.4 canary OS: OS X What steps will reproduce the problem? (1) Load http://jsbin.com/weruduzafi/edit?html,output What is the expected output? One red 'X' with 5px solid black border and one blue 'X' with no border What do you see instead? One red 'X' and one blue 'X' with a 5px solid black border. Please use labels and text to provide additional information.
,
Aug 3 2016
Looks like bad caching, probably the MatchedPropertiesCache (I think we added a flag for custom properties to handle a similar issue previously).
,
Aug 3 2016
,
Aug 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da555331c0bea26738d4c1ffe0b5fae8a706370b commit da555331c0bea26738d4c1ffe0b5fae8a706370b Author: timloh <timloh@chromium.org> Date: Tue Aug 09 05:06:20 2016 Elements using @apply shouldn't use the MatchedPropertiesCache This patch disables the MatchedPropertiesCache on elements which use @apply rules. We re-use the same flag as for when variables are referenced from non-inherited properties because this is fundamentally the same issue. For elements with MatchedProperties in the cache but a different parent ComputedStyle than is cached, we copy non-inherited properties directly from the cache and apply only inherited properties. This doesn't work when a non-inherited property depends on a parent's property and we already disable this optimisation when a non-inherited property is set to inherit or a variable reference. Similarly, using @apply can make a non-inherited property depend on a parent's property by having the @apply'd variable be inherited and setting a non-inherited property with the rule. BUG= 633745 Review-Url: https://codereview.chromium.org/2219543003 Cr-Commit-Position: refs/heads/master@{#410578} [add] https://crrev.com/da555331c0bea26738d4c1ffe0b5fae8a706370b/third_party/WebKit/LayoutTests/fast/css/atapply/at-apply-identical-aside-from-inherited.html [modify] https://crrev.com/da555331c0bea26738d4c1ffe0b5fae8a706370b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp [modify] https://crrev.com/da555331c0bea26738d4c1ffe0b5fae8a706370b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h [modify] https://crrev.com/da555331c0bea26738d4c1ffe0b5fae8a706370b/third_party/WebKit/Source/core/style/ComputedStyle.h
,
Aug 9 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by shans@chromium.org
, Aug 2 2016Owner: timloh@chromium.org
Status: Assigned (was: Untriaged)