Skip to content

Commit

Permalink
LibWeb: Reduce number of recompiled files for display list headers
Browse files Browse the repository at this point in the history
This reduces the number of `.cpp` files that need to be recompiled when
one of the below header files changes as follows:

Painting/Command.h: 1030 -> 61
Painting/DisplayList.h: 1030 -> 60
Painting/DisplayListRecorder.h: 557 -> 59
  • Loading branch information
InvalidUsernameException authored and trflynn89 committed Feb 23, 2025
1 parent 6e25789 commit be47f95
Show file tree
Hide file tree
Showing 32 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions Libraries/LibWeb/CSS/CSSStyleValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/

#include <LibGfx/Font/Font.h>
#include <LibGfx/Font/FontStyleMapping.h>
#include <LibGfx/Font/FontWeight.h>
#include <LibWeb/CSS/CSSStyleValue.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "ConicGradientStyleValue.h"
#include <LibWeb/CSS/StyleValues/PositionStyleValue.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/DisplayListRecorder.h>

namespace Web::CSS {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#include "LinearGradientStyleValue.h"
#include <LibWeb/Painting/DisplayListRecorder.h>

namespace Web::CSS {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "RadialGradientStyleValue.h"
#include <LibWeb/CSS/StyleValues/PositionStyleValue.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/DisplayListRecorder.h>

namespace Web::CSS {

Expand Down
1 change: 0 additions & 1 deletion Libraries/LibWeb/HTML/Navigable.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <LibWeb/HTML/TokenizedFeatures.h>
#include <LibWeb/InvalidateDisplayList.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/Painting/DisplayList.h>
#include <LibWeb/PixelUnits.h>
#include <LibWeb/XHR/FormDataEntry.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Layout/TextNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include <AK/Utf8View.h>
#include <LibGfx/TextLayout.h>
#include <LibUnicode/Segmenter.h>
#include <LibWeb/DOM/Text.h>
#include <LibWeb/Layout/Node.h>
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/AudioPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <LibWeb/Layout/AudioBox.h>
#include <LibWeb/Painting/AudioPaintable.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>

namespace Web::Painting {

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/BackgroundPainting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <LibWeb/Layout/TextNode.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/BackgroundPainting.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintableBox.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/BorderPainting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/DisplayListRecorder.h>

namespace Web::Painting {

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/BorderRadiusCornerClipper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintContext.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/CheckBoxPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <LibWeb/Layout/CheckBox.h>
#include <LibWeb/Layout/Label.h>
#include <LibWeb/Painting/CheckBoxPaintable.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/InputColors.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/ClippableAndScrollable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <LibWeb/Painting/ClippableAndScrollable.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintContext.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/FieldSetPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <LibWeb/Layout/LegendBox.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/FieldSetPaintable.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/ImagePaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/HTML/ImageRequest.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/ImagePaintable.h>
#include <LibWeb/Platform/FontPlugin.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/MarkerPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <LibGC/Heap.h>
#include <LibWeb/Layout/ListItemMarkerBox.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/MarkerPaintable.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/MediaPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <LibWeb/Layout/ReplacedBox.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/MediaPaintable.h>
#include <LibWeb/UIEvents/MouseButton.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <LibWeb/Layout/NavigableContainerViewport.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/NavigableContainerViewportPaintable.h>
#include <LibWeb/Painting/ViewportPaintable.h>

Expand Down
3 changes: 1 addition & 2 deletions Libraries/LibWeb/Painting/PaintContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

#pragma once

#include <AK/Vector.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Palette.h>
#include <LibGfx/Rect.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Forward.h>
#include <LibWeb/PixelUnits.h>

namespace Web {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Painting/Paintable.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <AK/NonnullOwnPtr.h>
#include <LibGC/Root.h>
#include <LibWeb/InvalidateDisplayList.h>
#include <LibWeb/Layout/LineBox.h>
#include <LibWeb/PixelUnits.h>
#include <LibWeb/TraversalDecision.h>
#include <LibWeb/TreeNode.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/PaintableBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <LibWeb/Layout/BlockContainer.h>
#include <LibWeb/Layout/InlineNode.h>
#include <LibWeb/Painting/BackgroundPainting.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/SVGPaintable.h>
#include <LibWeb/Painting/SVGSVGPaintable.h>
Expand Down
2 changes: 2 additions & 0 deletions Libraries/LibWeb/Painting/PaintableFragment.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

#pragma once

#include <LibGfx/TextLayout.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/ShadowData.h>
#include <LibWeb/PixelUnits.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/RadioButtonPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/Layout/Label.h>
#include <LibWeb/Layout/RadioButton.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/InputColors.h>
#include <LibWeb/Painting/RadioButtonPaintable.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/SVGForeignObjectPaintable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#include <LibGfx/ImmutableBitmap.h>
#include <LibWeb/Layout/SVGForeignObjectBox.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/SVGMaskable.h>
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#pragma once

#include <LibGfx/ImmutableBitmap.h>
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/Painting/SVGMaskable.h>
#include <LibWeb/Painting/SVGPaintable.h>
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/SVGPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <LibWeb/Layout/ImageBox.h>
#include <LibWeb/Layout/SVGSVGBox.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/SVGPaintable.h>
#include <LibWeb/SVG/SVGMaskElement.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/SVGPathPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <LibGfx/Quad.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/SVGPathPaintable.h>
#include <LibWeb/Painting/SVGSVGPaintable.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/SVGSVGPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <LibWeb/Layout/ImageBox.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/SVGSVGPaintable.h>
#include <LibWeb/Painting/StackingContext.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/ShadowPainting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <LibWeb/Painting/BorderPainting.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintBoxShadowParams.h>
#include <LibWeb/Painting/PaintContext.h>
#include <LibWeb/Painting/PaintableBox.h>
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/StackingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <LibWeb/Layout/Box.h>
#include <LibWeb/Layout/ReplacedBox.h>
#include <LibWeb/Layout/Viewport.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/SVGSVGPaintable.h>
#include <LibWeb/Painting/StackingContext.h>
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/TableBordersPainting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <AK/QuickSort.h>
#include <AK/Traits.h>
#include <LibWeb/Layout/TableFormattingContext.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/PaintableBox.h>
#include <LibWeb/Painting/TableBordersPainting.h>

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/Painting/VideoPaintable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <LibWeb/HTML/VideoTrackList.h>
#include <LibWeb/Layout/VideoBox.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/DisplayListRecorder.h>
#include <LibWeb/Painting/VideoPaintable.h>

namespace Web::Painting {
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/SVG/SVGImageElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "SVGImageElement.h"
#include <LibCore/Timer.h>
#include <LibGC/Heap.h>
#include <LibGfx/ImmutableBitmap.h>
#include <LibWeb/Bindings/SVGImageElementPrototype.h>
#include <LibWeb/DOM/DocumentObserver.h>
#include <LibWeb/DOM/Event.h>
Expand Down

0 comments on commit be47f95

Please sign in to comment.