mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibWeb/CSS: Implement 'background-blend-mode'
This implements the 'background-blend-mode' CSS property.
This commit is contained in:
parent
1898643ba4
commit
a73cd88f0c
Notes:
github-actions[bot]
2025-03-28 09:42:07 +00:00
Author: https://github.com/skyz1
Commit: a73cd88f0c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3940
Reviewed-by: https://github.com/AtkinsSJ ✅
27 changed files with 303 additions and 199 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Layout/Viewport.h>
|
||||
#include <LibWeb/Painting/Blending.h>
|
||||
#include <LibWeb/Painting/DisplayListRecorder.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Painting/SVGSVGPaintable.h>
|
||||
|
@ -316,16 +317,7 @@ void StackingContext::paint(PaintContext& context) const
|
|||
auto transform_matrix = paintable_box().transform();
|
||||
auto transform_origin = paintable_box().transform_origin().to_type<float>();
|
||||
|
||||
Gfx::CompositingAndBlendingOperator compositing_and_blending_operator;
|
||||
switch (paintable_box().computed_values().mix_blend_mode()) {
|
||||
#undef __ENUMERATE
|
||||
#define __ENUMERATE(mix_blend_mode) \
|
||||
case CSS::MixBlendMode::mix_blend_mode: \
|
||||
compositing_and_blending_operator = Gfx::CompositingAndBlendingOperator::mix_blend_mode; \
|
||||
break;
|
||||
ENUMERATE_MIX_BLEND_MODES(__ENUMERATE)
|
||||
#undef __ENUMERATE
|
||||
}
|
||||
Gfx::CompositingAndBlendingOperator compositing_and_blending_operator = mix_blend_mode_to_compositing_and_blending_operator(paintable_box().computed_values().mix_blend_mode());
|
||||
|
||||
DisplayListRecorder::PushStackingContextParams push_stacking_context_params {
|
||||
.opacity = opacity,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue