mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
LibWeb: Move position and text-align to LayoutStyle
This commit is contained in:
parent
6f28f08096
commit
959464fce4
6 changed files with 25 additions and 37 deletions
|
@ -27,15 +27,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <LibWeb/CSS/StyleValue.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
class LayoutStyle {
|
||||
public:
|
||||
Optional<int> z_index() const { return m_z_index; }
|
||||
CSS::TextAlign text_align() const { return m_text_align; }
|
||||
CSS::Position position() const { return m_position; }
|
||||
|
||||
protected:
|
||||
Optional<int> m_z_index;
|
||||
CSS::TextAlign m_text_align;
|
||||
CSS::Position m_position;
|
||||
};
|
||||
|
||||
class ImmutableLayoutStyle final : public LayoutStyle {
|
||||
|
@ -44,6 +49,8 @@ class ImmutableLayoutStyle final : public LayoutStyle {
|
|||
class MutableLayoutStyle final : public LayoutStyle {
|
||||
public:
|
||||
void set_z_index(Optional<int> value) { m_z_index = value; }
|
||||
void set_text_align(CSS::TextAlign text_align) { m_text_align = text_align; }
|
||||
void set_position(CSS::Position position) { m_position = position; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue