Skip to content

Commit

Permalink
Fixed purely physical mapping bug for vertical text and decorations.
Browse files Browse the repository at this point in the history
This fix was achieved by replacing `DrawLooper` with a filter and implementing the translation of the shadow offset using the value of writing mode.

Additionally, this CL is a portion of the fix discussed in a previous CL regarding text-shadow (please refer to the discussion at https://chromium-review.googlesource.com/c/chromium/src/+/5380302).

Therefore, a fix for the painting order of text and decoration shadows will follow.

Bug: 40829719
Change-Id: I9186e1673d14ba419a791efb09060c6f876d5b8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5484626
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1398959}
  • Loading branch information
canalun authored and chromium-wpt-export-bot committed Dec 20, 2024
1 parent 87fa635 commit b9af994
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/css-pseudo/highlight-painting-002-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
p > span > span {
color: #707070C0;
background: #38E038C0;
text-shadow: 0.2500em 0.2500em #3838E0C0;
text-shadow: 0.1500em 0.1500em #3838E0C0;
/* force blue to paint over red */
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion css/css-pseudo/highlight-painting-002.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
p::selection {
color: #707070C0;
background: #38E038C0;
text-shadow: 0.2500em 0.2500em #3838E0C0;
text-shadow: 0.1500em 0.1500em #3838E0C0;
}
</style>
<p class="highlight_reftest">quick
Expand Down
2 changes: 1 addition & 1 deletion css/css-pseudo/highlight-painting-shadows-horizontal.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-painting">
<link rel="match" href="highlight-painting-shadows-horizontal-ref.html">
<meta name="assert" value="::selection and ::target-text both with shadows are painted in the correct order, including originating element shadows">
<meta name="fuzzy" content="0-32;0-20">
<meta name="fuzzy" content="0-32;0-30">
<script src="support/selections.js"></script>
<style>
:root {
Expand Down
2 changes: 1 addition & 1 deletion css/css-pseudo/highlight-painting-shadows-vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-painting">
<link rel="match" href="highlight-painting-shadows-vertical-ref.html">
<meta name="assert" value="::selection and ::target-text both with shadows are painted in the correct order, including originating element shadows">
<meta name="fuzzy" content="0-32;0-4">
<meta name="fuzzy" content="0-32;0-8">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<script src="support/selections.js"></script>
<style>
Expand Down
1 change: 1 addition & 0 deletions css/css-pseudo/target-text-shadow-vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<link rel="author" name="Stephen Chenney" href="mailto:schenney@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-painting">
<link rel="match" href="target-text-shadow-vertical-ref.html">
<meta name="fuzzy" content="0-20;0-6100">
<meta name="assert" value="::target-text with a shadow is painted, including originating element shadows">
<style>
:root {
Expand Down
1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/basic-negcoord.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE HTML>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<meta name="fuzzy" content="0-100;0-180">
<link rel="match" href="basic-negcoord-ref.html">
<div style="position: absolute; top: 24px; left: 24px; color: black; text-shadow: green -4px -4px;">Hello</div>

1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/basic-opacity.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<link rel="match" href="basic-opacity-ref.html">
<meta name="fuzzy" content="0-30;0-210">
<div style="position: absolute; top: 30px; left: 30px; color: green; text-shadow: rgba(0, 0, 255, 0.2) 3px 3px;">Hello</div>
1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/basic.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<link rel="match" href="basic-ref.html">
<meta name="fuzzy" content="0-70;0-560">
<div style="position: absolute; top: 30px; left: 30px; color: green; text-shadow: grey 3px 3px;">Hello</div>
1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/color-inherit.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE HTML>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<link rel="match" href="color-inherit-ref.html">
<meta name="fuzzy" content="0-100;0-170">
<div style="position: absolute; top: 24px; left: 24px; color: blue; text-shadow: 3px 3px;">Hello</div>

1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/multiple-noblur.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<link rel="match" href="multiple-noblur-ref.html">
<meta name="fuzzy" content="0-140;0-480">
<div style="position: absolute; top: 20px; left: 20px; color: black; text-shadow: purple 4px 4px, red 7px 7px, green 10px 10px, grey 13px 13px;">Hello</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
<link rel="match" href="standards-decor-noblur-2-ref.html">
<meta name="fuzzy" content="0-40;0-14">
<meta name="fuzzy" content="0-40;0-50">
<!-- Shadows are painted below text AND its decorations -->
<style>
#target {
Expand Down
1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/svg-fill-none.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<title>CSS Test: 'text-shadow' respects 'fill="none"'</title>
<link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property">
<link rel="match" href="svg-fill-none-ref.html">
<meta name="fuzzy" content="0-100;1000-2000">
<style>
svg { font: bold 64px Arial, sans-serif; text-shadow: grey 10px 10px }
</style>
Expand Down
1 change: 1 addition & 0 deletions css/css-text-decor/text-shadow/svg-stroke-dasharray.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<title>CSS Test: 'text-shadow' respects stroke-dasharray</title>
<link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property">
<link rel="match" href="svg-stroke-dasharray-ref.html">
<meta name="fuzzy" content="0-100;2000-2300">
<style>
svg { font: bold 64px Arial, sans-serif; text-shadow: grey 10px 10px }
</style>
Expand Down
1 change: 1 addition & 0 deletions css/selectors/focus-within-004.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#focus-within-pseudo">
<link rel="match" href="focus-within-001-ref.html">
<meta name="fuzzy" content="0-100;0-600">
<meta name="assert" content="Test that :focus-within works on elements that are focusable due to contenteditable.">
<style>
/* Suppress things that cannot be reproduced in the reference file */
Expand Down

0 comments on commit b9af994

Please sign in to comment.