1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:47:35 +00:00

LibWeb: Rename "position" enum to "positioning"

The postitioning enum values are used by the position CSS property.
Unfortunately, the prior naming clashes with the CSS Values-4 type
named position, which will be implemented in a later commit.
This commit is contained in:
Tobias Christiansen 2023-10-27 15:17:36 +02:00 committed by Sam Atkins
parent 60640fe38d
commit 6602b1ddb1
10 changed files with 23 additions and 23 deletions

View file

@ -90,7 +90,7 @@ public:
static CSS::WhiteSpace white_space() { return CSS::WhiteSpace::Normal; }
static CSS::TextAlign text_align() { return CSS::TextAlign::Left; }
static CSS::TextJustify text_justify() { return CSS::TextJustify::Auto; }
static CSS::Position position() { return CSS::Position::Static; }
static CSS::Positioning position() { return CSS::Positioning::Static; }
static CSS::TextDecorationLine text_decoration_line() { return CSS::TextDecorationLine::None; }
static CSS::Length text_decoration_thickness() { return Length::make_auto(); }
static CSS::TextDecorationStyle text_decoration_style() { return CSS::TextDecorationStyle::Solid; }
@ -304,7 +304,7 @@ public:
Color text_decoration_color() const { return m_noninherited.text_decoration_color; }
CSS::TextTransform text_transform() const { return m_inherited.text_transform; }
Vector<ShadowData> const& text_shadow() const { return m_inherited.text_shadow; }
CSS::Position position() const { return m_noninherited.position; }
CSS::Positioning position() const { return m_noninherited.position; }
CSS::WhiteSpace white_space() const { return m_inherited.white_space; }
CSS::FlexDirection flex_direction() const { return m_noninherited.flex_direction; }
CSS::FlexWrap flex_wrap() const { return m_noninherited.flex_wrap; }
@ -463,7 +463,7 @@ protected:
CSS::LengthPercentage text_decoration_thickness { InitialValues::text_decoration_thickness() };
CSS::TextDecorationStyle text_decoration_style { InitialValues::text_decoration_style() };
Color text_decoration_color { InitialValues::color() };
CSS::Position position { InitialValues::position() };
CSS::Positioning position { InitialValues::position() };
CSS::Size width { InitialValues::width() };
CSS::Size min_width { InitialValues::min_width() };
CSS::Size max_width { InitialValues::max_width() };
@ -570,7 +570,7 @@ public:
void set_text_transform(CSS::TextTransform value) { m_inherited.text_transform = value; }
void set_text_shadow(Vector<ShadowData>&& value) { m_inherited.text_shadow = move(value); }
void set_text_indent(CSS::LengthPercentage value) { m_inherited.text_indent = move(value); }
void set_position(CSS::Position position) { m_noninherited.position = position; }
void set_position(CSS::Positioning position) { m_noninherited.position = position; }
void set_white_space(CSS::WhiteSpace value) { m_inherited.white_space = value; }
void set_width(CSS::Size const& width) { m_noninherited.width = width; }
void set_min_width(CSS::Size const& width) { m_noninherited.min_width = width; }

View file

@ -319,7 +319,7 @@
"all",
"none"
],
"position": [
"positioning": [
"absolute",
"fixed",
"relative",

View file

@ -1863,7 +1863,7 @@
"inherited": false,
"initial": "static",
"valid-types": [
"position"
"positioning"
]
},
"quotes": {

View file

@ -1986,7 +1986,7 @@ static BoxTypeTransformation required_box_type_transformation(StyleProperties co
return BoxTypeTransformation::None;
// Absolute positioning or floating an element blockifies the boxs display type. [CSS2]
if (style.position() == CSS::Position::Absolute || style.position() == CSS::Position::Fixed || style.float_() != CSS::Float::None)
if (style.position() == CSS::Positioning::Absolute || style.position() == CSS::Positioning::Fixed || style.float_() != CSS::Float::None)
return BoxTypeTransformation::Blockify;
// FIXME: Containment in a ruby container inlinifies the boxs display type, as described in [CSS-RUBY-1].

View file

@ -558,10 +558,10 @@ CSS::BackdropFilter StyleProperties::backdrop_filter() const
return BackdropFilter::make_none();
}
Optional<CSS::Position> StyleProperties::position() const
Optional<CSS::Positioning> StyleProperties::position() const
{
auto value = property(CSS::PropertyID::Position);
return value_id_to_position(value->to_identifier());
return value_id_to_positioning(value->to_identifier());
}
bool StyleProperties::operator==(StyleProperties const& other) const

View file

@ -145,7 +145,7 @@ public:
bool operator==(StyleProperties const&) const;
Optional<CSS::Position> position() const;
Optional<CSS::Positioning> position() const;
Optional<int> z_index() const;
void set_math_depth(int math_depth);