mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
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:
parent
c042971293
commit
2bd43e3603
Notes:
github-actions[bot]
2024-11-03 10:25:51 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/2bd43e3603d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2125
3 changed files with 18 additions and 1 deletions
11
Tests/LibWeb/Ref/background-clip-text.html
Normal file
11
Tests/LibWeb/Ref/background-clip-text.html
Normal 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
|
7
Tests/LibWeb/Ref/reference/background-clip-text-ref.html
Normal file
7
Tests/LibWeb/Ref/reference/background-clip-text-ref.html
Normal 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
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue