mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 05:07:35 +00:00
LibWeb: Move CSS::CalculationResolutionContext
to its own file
This struct will be used within CSSStyleValue.h in a future commit and having it in CalculatedStyleValue.h causes a dependency loop.
This commit is contained in:
parent
7dc41b52db
commit
b0508fb39a
Notes:
github-actions[bot]
2025-08-04 10:30:57 +00:00
Author: https://github.com/Calme1709
Commit: b0508fb39a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5517
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
3 changed files with 22 additions and 5 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <LibGfx/Color.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/CSS/CalculationResolutionContext.h>
|
||||
#include <LibWeb/CSS/Keyword.h>
|
||||
#include <LibWeb/CSS/Length.h>
|
||||
#include <LibWeb/CSS/SerializationMode.h>
|
||||
|
|
21
Libraries/LibWeb/CSS/CalculationResolutionContext.h
Normal file
21
Libraries/LibWeb/CSS/CalculationResolutionContext.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/CSS/Angle.h>
|
||||
#include <LibWeb/CSS/Frequency.h>
|
||||
#include <LibWeb/CSS/Length.h>
|
||||
#include <LibWeb/CSS/Time.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
struct CalculationResolutionContext {
|
||||
Variant<Empty, Angle, Frequency, Length, Time> percentage_basis {};
|
||||
Optional<Length::ResolutionContext> length_resolution_context;
|
||||
};
|
||||
|
||||
}
|
|
@ -31,11 +31,6 @@ struct CalculationContext {
|
|||
Optional<ValueType> percentages_resolve_as {};
|
||||
bool resolve_numbers_as_integers = false;
|
||||
};
|
||||
// Contains the context for resolving the calculation.
|
||||
struct CalculationResolutionContext {
|
||||
Variant<Empty, Angle, Frequency, Length, Time> percentage_basis {};
|
||||
Optional<Length::ResolutionContext> length_resolution_context;
|
||||
};
|
||||
|
||||
class CalculatedStyleValue : public CSSStyleValue {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue