mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWeb: Move the CSS parser into CSS/Parser/
This commit is contained in:
parent
cc4109c03b
commit
7daeddb9e9
Notes:
sideshowbarker
2024-07-19 04:29:49 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7daeddb9e96
11 changed files with 17 additions and 17 deletions
|
@ -45,6 +45,7 @@
|
|||
#include <LibGUI/ToolBarContainer.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/DOMTreeModel.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
|
@ -55,7 +56,6 @@
|
|||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
#include <LibWeb/WebContentView.h>
|
||||
|
||||
namespace Browser {
|
||||
|
@ -88,14 +88,14 @@ Tab::Tab(Type type)
|
|||
else
|
||||
m_web_content_view = widget.add<WebContentView>();
|
||||
|
||||
m_go_back_action = GUI::CommonActions::make_go_back_action( [this](auto&) { go_back(); }, this);
|
||||
m_go_back_action = GUI::CommonActions::make_go_back_action([this](auto&) { go_back(); }, this);
|
||||
m_go_forward_action = GUI::CommonActions::make_go_forward_action([this](auto&) { go_forward(); }, this);
|
||||
|
||||
toolbar.add_action(*m_go_back_action);
|
||||
toolbar.add_action(*m_go_forward_action);
|
||||
|
||||
toolbar.add_action(GUI::CommonActions::make_go_home_action([this](auto&) { load(g_home_url); }, this));
|
||||
m_reload_action = GUI::CommonActions::make_reload_action( [this](auto&) { reload(); }, this);
|
||||
m_reload_action = GUI::CommonActions::make_reload_action([this](auto&) { reload(); }, this);
|
||||
|
||||
toolbar.add_action(*m_reload_action);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ set(SOURCES
|
|||
Bindings/XMLHttpRequestWrapper.cpp
|
||||
CSS/DefaultStyleSheetSource.cpp
|
||||
CSS/Length.cpp
|
||||
CSS/Parser/CSSParser.cpp
|
||||
CSS/PropertyID.cpp
|
||||
CSS/PropertyID.h
|
||||
CSS/Selector.cpp
|
||||
|
@ -107,7 +108,6 @@ set(SOURCES
|
|||
Page.cpp
|
||||
PageView.cpp
|
||||
Painting/StackingContext.cpp
|
||||
Parser/CSSParser.cpp
|
||||
SVG/SVGElement.cpp
|
||||
SVG/SVGGeometryElement.cpp
|
||||
SVG/SVGGraphicsElement.cpp
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
*/
|
||||
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/CSS/SelectorEngine.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -344,7 +344,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
|
|||
auto right = parse_css_value(context, parts[1]);
|
||||
auto bottom = parse_css_value(context, parts[2]);
|
||||
auto left = parse_css_value(context, parts[3]);
|
||||
if (top && right && bottom &&left) {
|
||||
if (top && right && bottom && left) {
|
||||
style.set_property(CSS::PropertyID::BorderTopColor, *top);
|
||||
style.set_property(CSS::PropertyID::BorderRightColor, *right);
|
||||
style.set_property(CSS::PropertyID::BorderBottomColor, *bottom);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibWeb/Bindings/DocumentWrapper.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/CSS/SelectorEngine.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/DOM/AttributeNames.h>
|
||||
|
@ -42,20 +43,19 @@
|
|||
#include <LibWeb/DOM/DocumentType.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Frame/Frame.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
#include <LibWeb/HTML/HTMLHeadElement.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/HTML/HTMLScriptElement.h>
|
||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Frame/Frame.h>
|
||||
#include <LibWeb/Layout/LayoutDocument.h>
|
||||
#include <LibWeb/Layout/LayoutTreeBuilder.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
#include <LibWeb/SVG/TagNames.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
#include <LibCore/Timer.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/ImageDecoder.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/LayoutImage.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLLinkElement.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLStyleElement.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
#include <LibWeb/HTML/HTMLStyleElement.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/HTML/HTMLTableCellElement.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/HTML/HTMLTableElement.h>
|
||||
#include <LibWeb/Parser/CSSParser.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue