mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibWeb: Implement CSS 'isolation' property
This commit is contained in:
parent
4e1aa96dce
commit
7757df5bb5
Notes:
github-actions[bot]
2025-01-13 11:08:57 +00:00
Author: https://github.com/Psychpsyo
Commit: 7757df5bb5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3221
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 134 additions and 73 deletions
|
@ -1440,6 +1440,12 @@ Optional<CSS::UserSelect> ComputedProperties::user_select() const
|
|||
return keyword_to_user_select(value.to_keyword());
|
||||
}
|
||||
|
||||
Optional<CSS::Isolation> ComputedProperties::isolation() const
|
||||
{
|
||||
auto const& value = property(CSS::PropertyID::Isolation);
|
||||
return keyword_to_isolation(value.to_keyword());
|
||||
}
|
||||
|
||||
Optional<CSS::MaskType> ComputedProperties::mask_type() const
|
||||
{
|
||||
auto const& value = property(CSS::PropertyID::MaskType);
|
||||
|
|
|
@ -160,6 +160,7 @@ public:
|
|||
Optional<CSS::UnicodeBidi> unicode_bidi() const;
|
||||
Optional<CSS::WritingMode> writing_mode() const;
|
||||
Optional<CSS::UserSelect> user_select() const;
|
||||
Optional<CSS::Isolation> isolation() const;
|
||||
|
||||
static Vector<CSS::Transformation> transformations_for_style_value(CSSStyleValue const& value);
|
||||
Vector<CSS::Transformation> transformations() const;
|
||||
|
|
|
@ -171,6 +171,7 @@ public:
|
|||
static CSS::UnicodeBidi unicode_bidi() { return CSS::UnicodeBidi::Normal; }
|
||||
static CSS::WritingMode writing_mode() { return CSS::WritingMode::HorizontalTb; }
|
||||
static CSS::UserSelect user_select() { return CSS::UserSelect::Auto; }
|
||||
static CSS::Isolation isolation() { return CSS::Isolation::Auto; }
|
||||
|
||||
// https://www.w3.org/TR/SVG/geometry.html
|
||||
static LengthPercentage cx() { return CSS::Length::make_px(0); }
|
||||
|
@ -426,6 +427,7 @@ public:
|
|||
CSS::UnicodeBidi unicode_bidi() const { return m_noninherited.unicode_bidi; }
|
||||
CSS::WritingMode writing_mode() const { return m_inherited.writing_mode; }
|
||||
CSS::UserSelect user_select() const { return m_noninherited.user_select; }
|
||||
CSS::Isolation isolation() const { return m_noninherited.isolation; }
|
||||
|
||||
CSS::LengthBox const& inset() const { return m_noninherited.inset; }
|
||||
const CSS::LengthBox& margin() const { return m_noninherited.margin; }
|
||||
|
@ -678,6 +680,7 @@ protected:
|
|||
CSS::ObjectPosition object_position { InitialValues::object_position() };
|
||||
CSS::UnicodeBidi unicode_bidi { InitialValues::unicode_bidi() };
|
||||
CSS::UserSelect user_select { InitialValues::user_select() };
|
||||
CSS::Isolation isolation { InitialValues::isolation() };
|
||||
|
||||
Optional<CSS::Transformation> rotate;
|
||||
Optional<CSS::Transformation> translate;
|
||||
|
@ -851,6 +854,7 @@ public:
|
|||
void set_unicode_bidi(CSS::UnicodeBidi value) { m_noninherited.unicode_bidi = value; }
|
||||
void set_writing_mode(CSS::WritingMode value) { m_inherited.writing_mode = value; }
|
||||
void set_user_select(CSS::UserSelect value) { m_noninherited.user_select = value; }
|
||||
void set_isolation(CSS::Isolation value) { m_noninherited.isolation = value; }
|
||||
|
||||
void set_fill(SVGPaint value) { m_inherited.fill = move(value); }
|
||||
void set_stroke(SVGPaint value) { m_inherited.stroke = move(value); }
|
||||
|
|
|
@ -300,6 +300,10 @@
|
|||
"optimizespeed=pixelated",
|
||||
"optimizequality=smooth"
|
||||
],
|
||||
"isolation": [
|
||||
"auto",
|
||||
"isolate"
|
||||
],
|
||||
"justify-content": [
|
||||
"normal",
|
||||
"start",
|
||||
|
|
|
@ -1684,6 +1684,14 @@
|
|||
],
|
||||
"max-values": 1
|
||||
},
|
||||
"isolation": {
|
||||
"animation-type": "none",
|
||||
"inherited": false,
|
||||
"initial": "auto",
|
||||
"valid-types": [
|
||||
"isolation"
|
||||
]
|
||||
},
|
||||
"justify-content": {
|
||||
"animation-type": "discrete",
|
||||
"inherited": false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue