-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 80e4d73. rdar://problem/108683501
[CSS] Resolve "currentcolor" with style if possible https://bugs.webkit.org/show_bug.cgi?id=257255 rdar://108683501 Reviewed by Tim Nguyen. Ideally, we should never try to resolve "currentcolor" during style building. However, for the rare cases where we do it (gradient, drop-shadow) it's better to use the incomplete style than assuming an absolute color. * LayoutTests/fast/css/color-mix-various-expected.html: Added. * LayoutTests/fast/css/color-mix-various.html: Added. * Source/WebCore/style/ColorFromPrimitiveValue.cpp: (WebCore::Style::colorFromPrimitiveValueWithResolvedCurrentColor): * Source/WebCore/style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::addMatchedProperties): Canonical link: https://commits.webkit.org/264737@main Identifier: 259548.795@safari-7615-branch
- Loading branch information
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<style> | ||
body { | ||
color: green; | ||
} | ||
span { | ||
box-shadow: 5px 5px green; | ||
text-shadow: 5px 5px green; | ||
background: linear-gradient(green, green); | ||
filter: drop-shadow(30px 10px 4px green); | ||
} | ||
</style> | ||
|
||
<span> PASS if no crash and only green</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<style> | ||
body { | ||
color: green; | ||
} | ||
span { | ||
box-shadow: 5px 5px color-mix(in srgb, green, currentColor); | ||
text-shadow: 5px 5px color-mix(in srgb, green, currentColor); | ||
background: linear-gradient(green, color-mix(in srgb, green, currentcolor)); | ||
filter: drop-shadow(30px 10px 4px color-mix(in srgb, green, currentcolor)); | ||
} | ||
</style> | ||
|
||
<span> PASS if no crash and only green</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters