mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 04:07:51 +00:00
LibWeb/CSS: Improved implementation of background-blend-mode
This is a improved version ofa73cd88f0c
The old commit was reverted in552dd18696
The new version only paints an element into a new layer if background blend modes other than normal are used. The rasterization performance of most websites should therefore not suffer. Co-Authored-By: Alexander Kalenik <kalenik.aliaksandr@gmail.com>
This commit is contained in:
parent
6906f1722a
commit
9973b01848
Notes:
github-actions[bot]
2025-04-01 11:39:02 +00:00
Author: https://github.com/skyz1
Commit: 9973b01848
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4150
16 changed files with 311 additions and 198 deletions
|
@ -296,6 +296,7 @@ struct BackgroundLayerData {
|
|||
CSS::LengthPercentage size_y { CSS::Length::make_auto() };
|
||||
CSS::Repeat repeat_x { CSS::Repeat::Repeat };
|
||||
CSS::Repeat repeat_y { CSS::Repeat::Repeat };
|
||||
CSS::MixBlendMode blend_mode { CSS::MixBlendMode::Normal };
|
||||
};
|
||||
|
||||
struct BorderData {
|
||||
|
|
|
@ -443,6 +443,7 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue>> Parser::parse_css_value(Prope
|
|||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::BackgroundAttachment:
|
||||
case PropertyID::BackgroundBlendMode:
|
||||
case PropertyID::BackgroundClip:
|
||||
case PropertyID::BackgroundImage:
|
||||
case PropertyID::BackgroundOrigin:
|
||||
|
|
|
@ -327,6 +327,14 @@
|
|||
"background-attachment"
|
||||
]
|
||||
},
|
||||
"background-blend-mode": {
|
||||
"animation-type": "none",
|
||||
"inherited": false,
|
||||
"initial": "normal",
|
||||
"valid-types": [
|
||||
"mix-blend-mode"
|
||||
]
|
||||
},
|
||||
"background-clip": {
|
||||
"affects-layout": false,
|
||||
"animation-type": "repeatable-list",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue