LibWeb: Remove save() call in DisplayListPlayerSkia::add_mask()

This save() call did not have matching restore(). For mask application
it's display list builder responsibility to emit save() and restore()
so mask is applied only to relevant portion.

Progress on https://www.jetbrains.com/
This commit is contained in:
Aliaksandr Kalenik 2024-11-02 15:34:40 +01:00 committed by Andreas Kling
parent c042971293
commit 2bd43e3603
Notes: github-actions[bot] 2024-11-03 10:25:51 +00:00
3 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,11 @@
<!doctype html>
<link rel="match" href="reference/background-clip-text-ref.html" />
<style>
* { outline: 1px solid black; font-size: 100px; }
.overflow-hidden {
overflow: hidden;
}
.background-clip-text {
background-clip: text;
}
</style><body><div>hello</div><div class="overflow-hidden"><div class="background-clip-text">x

View file

@ -0,0 +1,7 @@
<!doctype html>
<style>
* { outline: 1px solid black; font-size: 100px; }
.overflow-hidden {
overflow: hidden;
}
</style><body><div>hello</div><div class="overflow-hidden"><div>x

View file

@ -1233,7 +1233,6 @@ void DisplayListPlayerSkia::add_mask(AddMask const& command)
mask_matrix.setTranslate(rect.x(), rect.y());
auto image = mask_surface->makeImageSnapshot();
auto shader = image->makeShader(SkSamplingOptions(), mask_matrix);
surface().canvas().save();
surface().canvas().clipShader(shader);
}