Skip to content

Commit 7daeddb

Browse files
committed
LibWeb: Move the CSS parser into CSS/Parser/
1 parent cc4109c commit 7daeddb

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

Applications/Browser/Tab.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <LibGUI/ToolBarContainer.h>
4646
#include <LibGUI/Window.h>
4747
#include <LibJS/Interpreter.h>
48+
#include <LibWeb/CSS/Parser/CSSParser.h>
4849
#include <LibWeb/DOM/Element.h>
4950
#include <LibWeb/DOMTreeModel.h>
5051
#include <LibWeb/Dump.h>
@@ -55,7 +56,6 @@
5556
#include <LibWeb/Layout/LayoutNode.h>
5657
#include <LibWeb/Loader/ResourceLoader.h>
5758
#include <LibWeb/PageView.h>
58-
#include <LibWeb/Parser/CSSParser.h>
5959
#include <LibWeb/WebContentView.h>
6060

6161
namespace Browser {
@@ -88,14 +88,14 @@ Tab::Tab(Type type)
8888
else
8989
m_web_content_view = widget.add<WebContentView>();
9090

91-
m_go_back_action = GUI::CommonActions::make_go_back_action( [this](auto&) { go_back(); }, this);
91+
m_go_back_action = GUI::CommonActions::make_go_back_action([this](auto&) { go_back(); }, this);
9292
m_go_forward_action = GUI::CommonActions::make_go_forward_action([this](auto&) { go_forward(); }, this);
9393

9494
toolbar.add_action(*m_go_back_action);
9595
toolbar.add_action(*m_go_forward_action);
9696

9797
toolbar.add_action(GUI::CommonActions::make_go_home_action([this](auto&) { load(g_home_url); }, this));
98-
m_reload_action = GUI::CommonActions::make_reload_action( [this](auto&) { reload(); }, this);
98+
m_reload_action = GUI::CommonActions::make_reload_action([this](auto&) { reload(); }, this);
9999

100100
toolbar.add_action(*m_reload_action);
101101

Libraries/LibWeb/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(SOURCES
1111
Bindings/XMLHttpRequestWrapper.cpp
1212
CSS/DefaultStyleSheetSource.cpp
1313
CSS/Length.cpp
14+
CSS/Parser/CSSParser.cpp
1415
CSS/PropertyID.cpp
1516
CSS/PropertyID.h
1617
CSS/Selector.cpp
@@ -107,7 +108,6 @@ set(SOURCES
107108
Page.cpp
108109
PageView.cpp
109110
Painting/StackingContext.cpp
110-
Parser/CSSParser.cpp
111111
SVG/SVGElement.cpp
112112
SVG/SVGGeometryElement.cpp
113113
SVG/SVGGraphicsElement.cpp
File renamed without changes.
File renamed without changes.

Libraries/LibWeb/CSS/StyleResolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
*/
2626

2727
#include <AK/QuickSort.h>
28+
#include <LibWeb/CSS/Parser/CSSParser.h>
2829
#include <LibWeb/CSS/SelectorEngine.h>
2930
#include <LibWeb/CSS/StyleResolver.h>
3031
#include <LibWeb/CSS/StyleSheet.h>
3132
#include <LibWeb/DOM/Document.h>
3233
#include <LibWeb/DOM/Element.h>
3334
#include <LibWeb/Dump.h>
34-
#include <LibWeb/Parser/CSSParser.h>
3535
#include <ctype.h>
3636
#include <stdio.h>
3737

@@ -344,7 +344,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
344344
auto right = parse_css_value(context, parts[1]);
345345
auto bottom = parse_css_value(context, parts[2]);
346346
auto left = parse_css_value(context, parts[3]);
347-
if (top && right && bottom &&left) {
347+
if (top && right && bottom && left) {
348348
style.set_property(CSS::PropertyID::BorderTopColor, *top);
349349
style.set_property(CSS::PropertyID::BorderRightColor, *right);
350350
style.set_property(CSS::PropertyID::BorderBottomColor, *bottom);

Libraries/LibWeb/DOM/Document.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@
3535
#include <LibJS/Runtime/GlobalObject.h>
3636
#include <LibWeb/Bindings/DocumentWrapper.h>
3737
#include <LibWeb/Bindings/WindowObject.h>
38+
#include <LibWeb/CSS/Parser/CSSParser.h>
3839
#include <LibWeb/CSS/SelectorEngine.h>
3940
#include <LibWeb/CSS/StyleResolver.h>
4041
#include <LibWeb/DOM/AttributeNames.h>
4142
#include <LibWeb/DOM/Document.h>
4243
#include <LibWeb/DOM/DocumentType.h>
4344
#include <LibWeb/DOM/Element.h>
4445
#include <LibWeb/DOM/ElementFactory.h>
46+
#include <LibWeb/DOM/Text.h>
47+
#include <LibWeb/DOM/Window.h>
48+
#include <LibWeb/Dump.h>
49+
#include <LibWeb/Frame/Frame.h>
4550
#include <LibWeb/HTML/HTMLBodyElement.h>
4651
#include <LibWeb/HTML/HTMLHeadElement.h>
4752
#include <LibWeb/HTML/HTMLHtmlElement.h>
4853
#include <LibWeb/HTML/HTMLScriptElement.h>
4954
#include <LibWeb/HTML/HTMLTitleElement.h>
50-
#include <LibWeb/DOM/Text.h>
51-
#include <LibWeb/DOM/Window.h>
52-
#include <LibWeb/Dump.h>
53-
#include <LibWeb/Frame/Frame.h>
5455
#include <LibWeb/Layout/LayoutDocument.h>
5556
#include <LibWeb/Layout/LayoutTreeBuilder.h>
5657
#include <LibWeb/Origin.h>
5758
#include <LibWeb/PageView.h>
58-
#include <LibWeb/Parser/CSSParser.h>
5959
#include <LibWeb/SVG/TagNames.h>
6060
#include <stdio.h>
6161

Libraries/LibWeb/HTML/HTMLImageElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
#include <LibCore/Timer.h>
2828
#include <LibGfx/Bitmap.h>
2929
#include <LibGfx/ImageDecoder.h>
30+
#include <LibWeb/CSS/Parser/CSSParser.h>
3031
#include <LibWeb/CSS/StyleResolver.h>
3132
#include <LibWeb/DOM/Document.h>
3233
#include <LibWeb/DOM/Event.h>
3334
#include <LibWeb/HTML/HTMLImageElement.h>
3435
#include <LibWeb/Layout/LayoutImage.h>
3536
#include <LibWeb/Loader/ResourceLoader.h>
36-
#include <LibWeb/Parser/CSSParser.h>
3737

3838
namespace Web::HTML {
3939

Libraries/LibWeb/HTML/HTMLLinkElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
#include <AK/ByteBuffer.h>
2828
#include <AK/URL.h>
2929
#include <LibCore/File.h>
30+
#include <LibWeb/CSS/Parser/CSSParser.h>
3031
#include <LibWeb/DOM/Document.h>
3132
#include <LibWeb/HTML/HTMLLinkElement.h>
3233
#include <LibWeb/Loader/ResourceLoader.h>
33-
#include <LibWeb/Parser/CSSParser.h>
3434

3535
namespace Web::HTML {
3636

Libraries/LibWeb/HTML/HTMLStyleElement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
*/
2626

2727
#include <AK/StringBuilder.h>
28+
#include <LibWeb/CSS/Parser/CSSParser.h>
2829
#include <LibWeb/DOM/Document.h>
29-
#include <LibWeb/HTML/HTMLStyleElement.h>
3030
#include <LibWeb/DOM/Text.h>
31-
#include <LibWeb/Parser/CSSParser.h>
31+
#include <LibWeb/HTML/HTMLStyleElement.h>
3232

3333
namespace Web::HTML {
3434

Libraries/LibWeb/HTML/HTMLTableCellElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27+
#include <LibWeb/CSS/Parser/CSSParser.h>
2728
#include <LibWeb/HTML/HTMLTableCellElement.h>
28-
#include <LibWeb/Parser/CSSParser.h>
2929

3030
namespace Web::HTML {
3131

0 commit comments

Comments
 (0)