Skip to content

Commit 5381146

Browse files
Calme1709AtkinsSJ
authored andcommitted
LibWeb: Include PropertyID.h in fewer header files
This reduces the size of the recompile when PropertyID.h is modified from ~1500 to ~125
1 parent 59a1184 commit 5381146

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+67
-19
lines changed

Libraries/LibWeb/Animations/AnimationEffect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <LibWeb/Bindings/Intrinsics.h>
1414
#include <LibWeb/CSS/ComputedProperties.h>
1515
#include <LibWeb/CSS/Parser/Parser.h>
16+
#include <LibWeb/CSS/PropertyID.h>
1617
#include <LibWeb/CSS/StyleComputer.h>
1718
#include <LibWeb/CSS/StyleInvalidation.h>
1819
#include <LibWeb/CSS/StyleValues/KeywordStyleValue.h>

Libraries/LibWeb/Animations/KeyframeEffect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <LibWeb/Bindings/KeyframeEffectPrototype.h>
1414
#include <LibWeb/CSS/ComputedProperties.h>
1515
#include <LibWeb/CSS/Parser/Parser.h>
16+
#include <LibWeb/CSS/PropertyID.h>
1617
#include <LibWeb/CSS/StyleComputer.h>
1718
#include <LibWeb/CSS/StyleValues/KeywordStyleValue.h>
1819
#include <LibWeb/DOM/AbstractElement.h>

Libraries/LibWeb/Animations/KeyframeEffect.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <LibWeb/Animations/AnimationEffect.h>
1212
#include <LibWeb/Bindings/KeyframeEffectPrototype.h>
1313
#include <LibWeb/Bindings/PlatformObject.h>
14-
#include <LibWeb/CSS/PropertyID.h>
1514
#include <LibWeb/CSS/Selector.h>
1615
#include <LibWeb/CSS/StyleValues/StyleValue.h>
1716

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025, Callum Law <callumlaw1709@outlook.com>
3+
*
4+
* SPDX-License-Identifier: BSD-2-Clause
5+
*/
6+
7+
#pragma once
8+
9+
#include <LibWeb/Forward.h>
10+
11+
namespace Web::CSS {
12+
13+
struct AcceptedTypeRange {
14+
float min;
15+
float max;
16+
};
17+
using AcceptedTypeRangeMap = HashMap<ValueType, AcceptedTypeRange>;
18+
19+
}

Libraries/LibWeb/CSS/CSSAnimation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#pragma once
88

99
#include <LibWeb/Animations/Animation.h>
10-
#include <LibWeb/CSS/PropertyID.h>
1110
#include <LibWeb/CSS/StyleValues/StyleValue.h>
1211

1312
namespace Web::CSS {

Libraries/LibWeb/CSS/CSSDescriptors.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <LibWeb/CSS/CSSDescriptors.h>
88
#include <LibWeb/CSS/Parser/Parser.h>
9+
#include <LibWeb/CSS/PropertyID.h>
910
#include <LibWeb/CSS/Serialize.h>
1011
#include <LibWeb/CSS/StyleValues/ShorthandStyleValue.h>
1112
#include <LibWeb/Infra/Strings.h>

Libraries/LibWeb/CSS/CSSTransition.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <LibWeb/CSS/CSSStyleDeclaration.h>
1212
#include <LibWeb/CSS/CSSTransition.h>
1313
#include <LibWeb/CSS/Interpolation.h>
14+
#include <LibWeb/CSS/PropertyID.h>
1415
#include <LibWeb/DOM/Document.h>
1516
#include <LibWeb/DOM/Element.h>
1617
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
@@ -27,6 +28,11 @@ GC::Ref<CSSTransition> CSSTransition::start_a_transition(DOM::AbstractElement ab
2728
return realm.create<CSSTransition>(realm, abstract_element, property_id, transition_generation, delay, start_time, end_time, start_value, end_value, reversing_adjusted_start_value, reversing_shortening_factor);
2829
}
2930

31+
StringView CSSTransition::transition_property() const
32+
{
33+
return string_from_property_id(m_transition_property);
34+
}
35+
3036
Animations::AnimationClass CSSTransition::animation_class() const
3137
{
3238
return Animations::AnimationClass::CSSTransition;

Libraries/LibWeb/CSS/CSSTransition.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <LibWeb/Animations/Animation.h>
1111
#include <LibWeb/CSS/Interpolation.h>
12-
#include <LibWeb/CSS/PropertyID.h>
1312
#include <LibWeb/CSS/PseudoElement.h>
1413
#include <LibWeb/CSS/StyleValues/StyleValue.h>
1514
#include <LibWeb/CSS/Time.h>
@@ -25,7 +24,7 @@ class CSSTransition : public Animations::Animation {
2524
size_t transition_generation, double delay, double start_time, double end_time, NonnullRefPtr<StyleValue const> start_value,
2625
NonnullRefPtr<StyleValue const> end_value, NonnullRefPtr<StyleValue const> reversing_adjusted_start_value, double reversing_shortening_factor);
2726

28-
StringView transition_property() const { return string_from_property_id(m_transition_property); }
27+
StringView transition_property() const;
2928

3029
virtual Animations::AnimationClass animation_class() const override;
3130
virtual Optional<int> class_specific_composite_order(GC::Ref<Animations::Animation> other) const override;

Libraries/LibWeb/CSS/CascadedProperties.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <LibWeb/CSS/CSSStyleDeclaration.h>
88
#include <LibWeb/CSS/CascadedProperties.h>
99
#include <LibWeb/CSS/Parser/Parser.h>
10+
#include <LibWeb/CSS/PropertyID.h>
1011
#include <LibWeb/CSS/PropertyNameAndID.h>
1112
#include <LibWeb/CSS/StyleComputer.h>
1213
#include <LibWeb/DOM/Element.h>

Libraries/LibWeb/CSS/CascadedProperties.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <LibGC/CellAllocator.h>
1010
#include <LibJS/Heap/Cell.h>
1111
#include <LibWeb/CSS/CascadeOrigin.h>
12-
#include <LibWeb/CSS/PropertyID.h>
1312
#include <LibWeb/CSS/Selector.h>
1413
#include <LibWeb/CSS/StyleProperty.h>
1514
#include <LibWeb/CSS/StyleValues/StyleValue.h>

0 commit comments

Comments
 (0)