Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use the placeholder SVG as a mask to respect semantic color changes
https://bugs.webkit.org/show_bug.cgi?id=257881 rdar://110501919 Reviewed by Tim Nguyen. When used as a background-image, SVGs do not actually change color as expected in dark mode. Instead, the SVG is now used as a mask over a semantic background color that correctly changes when appropriate. Added simple mismatch test to verify that dark appearance leads to different results from light. * LayoutTests/fast/attachment/cocoa/wide-attachment-rendering-dark-expected-mismatch.html: Added. * LayoutTests/fast/attachment/cocoa/wide-attachment-rendering-dark.html: Added. * LayoutTests/platform/ios-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt: * LayoutTests/platform/mac-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt: * Source/WebCore/html/shadow/attachmentElementShadow.css: (div#attachment-placeholder): Canonical link: https://commits.webkit.org/265037@main
- Loading branch information
Showing
5 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
LayoutTests/fast/attachment/cocoa/wide-attachment-rendering-dark-expected-mismatch.html
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 @@ | ||
<html><!-- webkit-test-runner [ AttachmentElementEnabled=true AttachmentWideLayoutEnabled=true ] --> | ||
<head> | ||
</head> | ||
<body style="color-scheme: only light;"> | ||
<div>Blank: <attachment></attachment></div> | ||
<div>Title: <attachment title="Title" subtitle="Subtitle"></attachment></div> | ||
<div>and subtitle: <attachment title="Title" subtitle="Subtitle"></attachment></div> | ||
<div>Action: <attachment action="Tap to download" title="Title.txt" subtitle="Subtitle"></attachment></div> | ||
<div>Save: <attachment title="Title.pdf" save></attachment></div> | ||
<div>Zero progress: <attachment title="Title.pdf" progress="0"></attachment></div> | ||
<div>75% progress: <attachment title="Title.pdf" progress="0.75"></attachment></div> | ||
<div>100% progress: <attachment title="Title.pdf" progress="1"></attachment></div> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
LayoutTests/fast/attachment/cocoa/wide-attachment-rendering-dark.html
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 @@ | ||
<html><!-- webkit-test-runner [ AttachmentElementEnabled=true AttachmentWideLayoutEnabled=true ] --> | ||
<head> | ||
</head> | ||
<body style="color-scheme: only dark;"> | ||
<div>Blank: <attachment></attachment></div> | ||
<div>Title: <attachment title="Title" subtitle="Subtitle"></attachment></div> | ||
<div>and subtitle: <attachment title="Title" subtitle="Subtitle"></attachment></div> | ||
<div>Action: <attachment action="Tap to download" title="Title.txt" subtitle="Subtitle"></attachment></div> | ||
<div>Save: <attachment title="Title.pdf" save></attachment></div> | ||
<div>Zero progress: <attachment title="Title.pdf" progress="0"></attachment></div> | ||
<div>75% progress: <attachment title="Title.pdf" progress="0.75"></attachment></div> | ||
<div>100% progress: <attachment title="Title.pdf" progress="1"></attachment></div> | ||
</body> | ||
</html> |
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
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
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