Browse Source

LibWeb: Move the Page/Frame/EventHandler classes into Page/

Andreas Kling 5 years ago
parent
commit
ef711f501e

+ 1 - 1
Applications/Browser/Tab.cpp

@@ -49,12 +49,12 @@
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOMTreeModel.h>
 #include <LibWeb/DOMTreeModel.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutInline.h>
 #include <LibWeb/Layout/LayoutInline.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/WebContentView.h>
 #include <LibWeb/WebContentView.h>
 
 

+ 3 - 3
Libraries/LibWeb/CMakeLists.txt

@@ -42,8 +42,6 @@ set(SOURCES
     DOMTreeModel.cpp
     DOMTreeModel.cpp
     Dump.cpp
     Dump.cpp
     FontCache.cpp
     FontCache.cpp
-    Frame/EventHandler.cpp
-    Frame/Frame.cpp
     HTML/CanvasRenderingContext2D.cpp
     HTML/CanvasRenderingContext2D.cpp
     HTML/HTMLAnchorElement.cpp
     HTML/HTMLAnchorElement.cpp
     HTML/HTMLBRElement.cpp
     HTML/HTMLBRElement.cpp
@@ -105,7 +103,9 @@ set(SOURCES
     Loader/ImageResource.cpp
     Loader/ImageResource.cpp
     Loader/Resource.cpp
     Loader/Resource.cpp
     Loader/ResourceLoader.cpp
     Loader/ResourceLoader.cpp
-    Page.cpp
+    Page/EventHandler.cpp
+    Page/Frame.cpp
+    Page/Page.cpp
     PageView.cpp
     PageView.cpp
     Painting/StackingContext.cpp
     Painting/StackingContext.cpp
     SVG/SVGElement.cpp
     SVG/SVGElement.cpp

+ 1 - 1
Libraries/LibWeb/CSS/StyleValue.cpp

@@ -29,9 +29,9 @@
 #include <LibGfx/Palette.h>
 #include <LibGfx/Palette.h>
 #include <LibWeb/CSS/StyleValue.h>
 #include <LibWeb/CSS/StyleValue.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Loader/LoadRequest.h>
 #include <LibWeb/Loader/LoadRequest.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web::CSS {
 namespace Web::CSS {

+ 1 - 1
Libraries/LibWeb/DOM/Document.cpp

@@ -46,7 +46,6 @@
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
 #include <LibWeb/HTML/HTMLHeadElement.h>
 #include <LibWeb/HTML/HTMLHeadElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
@@ -55,6 +54,7 @@
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutTreeBuilder.h>
 #include <LibWeb/Layout/LayoutTreeBuilder.h>
 #include <LibWeb/Origin.h>
 #include <LibWeb/Origin.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/SVG/TagNames.h>
 #include <LibWeb/SVG/TagNames.h>
 #include <stdio.h>
 #include <stdio.h>

+ 1 - 1
Libraries/LibWeb/DOM/Window.cpp

@@ -32,7 +32,7 @@
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Timer.h>
 #include <LibWeb/DOM/Timer.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
-#include <LibWeb/Frame/Frame.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web::DOM {
 namespace Web::DOM {

+ 1 - 1
Libraries/LibWeb/HTML/HTMLFormElement.cpp

@@ -27,7 +27,7 @@
 #include <AK/StringBuilder.h>
 #include <AK/StringBuilder.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
-#include <LibWeb/Frame/Frame.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/URLEncoder.h>
 #include <LibWeb/URLEncoder.h>
 
 

+ 3 - 3
Libraries/LibWeb/HTML/HTMLIFrameElement.cpp

@@ -29,15 +29,15 @@
 #include <LibGUI/TextBox.h>
 #include <LibGUI/TextBox.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
+#include <LibWeb/Dump.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
-#include <LibWeb/Dump.h>
-#include <LibWeb/Frame/Frame.h>
+#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/Layout/LayoutFrame.h>
 #include <LibWeb/Layout/LayoutFrame.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
-#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {
 
 

+ 1 - 1
Libraries/LibWeb/HTML/HTMLInputElement.cpp

@@ -31,8 +31,8 @@
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Layout/LayoutWidget.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {

+ 1 - 1
Libraries/LibWeb/Layout/LayoutBox.cpp

@@ -27,7 +27,7 @@
 #include <LibGUI/Painter.h>
 #include <LibGUI/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
-#include <LibWeb/Frame/Frame.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutBox.h>
 #include <LibWeb/Layout/LayoutBox.h>
 
 

+ 1 - 1
Libraries/LibWeb/Layout/LayoutDocument.cpp

@@ -25,10 +25,10 @@
  */
  */
 
 
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutImage.h>
 #include <LibWeb/Layout/LayoutImage.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Layout/LayoutWidget.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/Painting/StackingContext.h>
 #include <LibWeb/Painting/StackingContext.h>
 
 
 namespace Web {
 namespace Web {

+ 1 - 1
Libraries/LibWeb/Layout/LayoutFrame.cpp

@@ -30,9 +30,9 @@
 #include <LibGfx/Font.h>
 #include <LibGfx/Font.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutFrame.h>
 #include <LibWeb/Layout/LayoutFrame.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web {
 namespace Web {

+ 1 - 1
Libraries/LibWeb/Layout/LayoutNode.cpp

@@ -27,11 +27,11 @@
 #include <LibGUI/Painter.h>
 #include <LibGUI/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Element.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutBlock.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Layout/LayoutReplaced.h>
 #include <LibWeb/Layout/LayoutReplaced.h>
+#include <LibWeb/Page/Frame.h>
 
 
 namespace Web {
 namespace Web {
 
 

+ 1 - 1
Libraries/LibWeb/Layout/LayoutWidget.cpp

@@ -30,8 +30,8 @@
 #include <LibGfx/Font.h>
 #include <LibGfx/Font.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Layout/LayoutWidget.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web {
 namespace Web {

+ 3 - 3
Libraries/LibWeb/Loader/FrameLoader.cpp

@@ -31,11 +31,11 @@
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
-#include <LibWeb/Frame/Frame.h>
+#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/Loader/FrameLoader.h>
 #include <LibWeb/Loader/FrameLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Page.h>
-#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
+#include <LibWeb/Page/Frame.h>
+#include <LibWeb/Page/Page.h>
 
 
 namespace Web {
 namespace Web {
 
 

+ 2 - 2
Libraries/LibWeb/Frame/EventHandler.cpp → Libraries/LibWeb/Page/EventHandler.cpp

@@ -28,11 +28,11 @@
 #include <LibGUI/Window.h>
 #include <LibGUI/Window.h>
 #include <LibJS/Runtime/Value.h>
 #include <LibJS/Runtime/Value.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/Frame/EventHandler.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
+#include <LibWeb/Page/EventHandler.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
 
 

+ 0 - 0
Libraries/LibWeb/Frame/EventHandler.h → Libraries/LibWeb/Page/EventHandler.h


+ 1 - 1
Libraries/LibWeb/Frame/Frame.cpp → Libraries/LibWeb/Page/Frame.cpp

@@ -26,9 +26,9 @@
 
 
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutWidget.h>
 #include <LibWeb/Layout/LayoutWidget.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web {
 namespace Web {

+ 1 - 2
Libraries/LibWeb/Frame/Frame.h → Libraries/LibWeb/Page/Frame.h

@@ -33,8 +33,8 @@
 #include <LibGfx/Bitmap.h>
 #include <LibGfx/Bitmap.h>
 #include <LibGfx/Rect.h>
 #include <LibGfx/Rect.h>
 #include <LibGfx/Size.h>
 #include <LibGfx/Size.h>
-#include <LibWeb/Frame/EventHandler.h>
 #include <LibWeb/Loader/FrameLoader.h>
 #include <LibWeb/Loader/FrameLoader.h>
+#include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/TreeNode.h>
 #include <LibWeb/TreeNode.h>
 
 
 namespace Web {
 namespace Web {
@@ -83,7 +83,6 @@ public:
     Gfx::IntPoint to_main_frame_position(const Gfx::IntPoint&);
     Gfx::IntPoint to_main_frame_position(const Gfx::IntPoint&);
     Gfx::IntRect to_main_frame_rect(const Gfx::IntRect&);
     Gfx::IntRect to_main_frame_rect(const Gfx::IntRect&);
 
 
-
 private:
 private:
     explicit Frame(DOM::Element& host_element, Frame& main_frame);
     explicit Frame(DOM::Element& host_element, Frame& main_frame);
     explicit Frame(Page&);
     explicit Frame(Page&);

+ 2 - 2
Libraries/LibWeb/Page.cpp → Libraries/LibWeb/Page/Page.cpp

@@ -24,8 +24,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  */
 
 
-#include <LibWeb/Frame/Frame.h>
-#include <LibWeb/Page.h>
+#include <LibWeb/Page/Frame.h>
+#include <LibWeb/Page/Page.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 
 
 namespace Web {
 namespace Web {

+ 0 - 0
Libraries/LibWeb/Page.h → Libraries/LibWeb/Page/Page.h


+ 3 - 3
Libraries/LibWeb/PageView.cpp

@@ -40,18 +40,18 @@
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
-#include <LibWeb/Frame/EventHandler.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
+#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/Layout/LayoutBreak.h>
 #include <LibWeb/Layout/LayoutBreak.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Layout/LayoutNode.h>
 #include <LibWeb/Layout/LayoutText.h>
 #include <LibWeb/Layout/LayoutText.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
+#include <LibWeb/Page/EventHandler.h>
+#include <LibWeb/Page/Frame.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/PageView.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <LibWeb/Painting/PaintContext.h>
-#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
 #include <stdio.h>
 #include <stdio.h>
 
 

+ 1 - 1
Libraries/LibWeb/PageView.h

@@ -29,7 +29,7 @@
 #include <AK/URL.h>
 #include <AK/URL.h>
 #include <LibGUI/ScrollableWidget.h>
 #include <LibGUI/ScrollableWidget.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
-#include <LibWeb/Page.h>
+#include <LibWeb/Page/Page.h>
 #include <LibWeb/WebViewHooks.h>
 #include <LibWeb/WebViewHooks.h>
 
 
 namespace Web {
 namespace Web {

+ 1 - 1
Services/WebContent/PageHost.cpp

@@ -29,8 +29,8 @@
 #include <AK/SharedBuffer.h>
 #include <AK/SharedBuffer.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/SystemTheme.h>
 #include <LibGfx/SystemTheme.h>
-#include <LibWeb/Frame/Frame.h>
 #include <LibWeb/Layout/LayoutDocument.h>
 #include <LibWeb/Layout/LayoutDocument.h>
+#include <LibWeb/Page/Frame.h>
 #include <WebContent/WebContentClientEndpoint.h>
 #include <WebContent/WebContentClientEndpoint.h>
 
 
 namespace WebContent {
 namespace WebContent {

+ 1 - 1
Services/WebContent/PageHost.h

@@ -26,7 +26,7 @@
 
 
 #pragma once
 #pragma once
 
 
-#include <LibWeb/Page.h>
+#include <LibWeb/Page/Page.h>
 
 
 namespace WebContent {
 namespace WebContent {