Skip to content

Commit

Permalink
LibWeb: Move the Page/Frame/EventHandler classes into Page/
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Jul 28, 2020
1 parent 481e838 commit ef711f5
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Applications/Browser/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
#include <LibWeb/DOM/Element.h>
#include <LibWeb/DOMTreeModel.h>
#include <LibWeb/Dump.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutBlock.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutInline.h>
#include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/WebContentView.h>

Expand Down
6 changes: 3 additions & 3 deletions Libraries/LibWeb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ set(SOURCES
DOMTreeModel.cpp
Dump.cpp
FontCache.cpp
Frame/EventHandler.cpp
Frame/Frame.cpp
HTML/CanvasRenderingContext2D.cpp
HTML/HTMLAnchorElement.cpp
HTML/HTMLBRElement.cpp
Expand Down Expand Up @@ -105,7 +103,9 @@ set(SOURCES
Loader/ImageResource.cpp
Loader/Resource.cpp
Loader/ResourceLoader.cpp
Page.cpp
Page/EventHandler.cpp
Page/Frame.cpp
Page/Page.cpp
PageView.cpp
Painting/StackingContext.cpp
SVG/SVGElement.cpp
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/CSS/StyleValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <LibGfx/Palette.h>
#include <LibWeb/CSS/StyleValue.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Loader/LoadRequest.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web::CSS {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/DOM/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#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>
Expand All @@ -55,6 +54,7 @@
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutTreeBuilder.h>
#include <LibWeb/Origin.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/SVG/TagNames.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/DOM/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Timer.h>
#include <LibWeb/DOM/Window.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web::DOM {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLFormElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <AK/StringBuilder.h>
#include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/URLEncoder.h>

Expand Down
6 changes: 3 additions & 3 deletions Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
#include <LibGUI/TextBox.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/Dump.h>
#include <LibWeb/HTML/HTMLFormElement.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/LayoutWidget.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>

namespace Web::HTML {

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/HTML/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include <LibWeb/DOM/Event.h>
#include <LibWeb/HTML/HTMLFormElement.h>
#include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web::HTML {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LayoutBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <LibGUI/Painter.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/HTMLBodyElement.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/Layout/LayoutBlock.h>
#include <LibWeb/Layout/LayoutBox.h>

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LayoutDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
*/

#include <LibWeb/Dump.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutImage.h>
#include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/Painting/StackingContext.h>

namespace Web {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LayoutFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutFrame.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web {
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LayoutNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include <LibGUI/Painter.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutBlock.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Layout/LayoutReplaced.h>
#include <LibWeb/Page/Frame.h>

namespace Web {

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/Layout/LayoutWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <LibGfx/Font.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web {
Expand Down
6 changes: 3 additions & 3 deletions Libraries/LibWeb/Loader/FrameLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/ElementFactory.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/ResourceLoader.h>
#include <LibWeb/Page.h>
#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/Page/Page.h>

namespace Web {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#include <LibGUI/Window.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Frame/EventHandler.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/HTML/HTMLIFrameElement.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/UIEvents/MouseEvent.h>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

#include <LibWeb/DOM/Document.h>
#include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutWidget.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>

namespace Web {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <LibGfx/Bitmap.h>
#include <LibGfx/Rect.h>
#include <LibGfx/Size.h>
#include <LibWeb/Frame/EventHandler.h>
#include <LibWeb/Loader/FrameLoader.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/TreeNode.h>

namespace Web {
Expand Down Expand Up @@ -83,7 +83,6 @@ class Frame : public TreeNode<Frame> {
Gfx::IntPoint to_main_frame_position(const Gfx::IntPoint&);
Gfx::IntRect to_main_frame_rect(const Gfx::IntRect&);


private:
explicit Frame(DOM::Element& host_element, Frame& main_frame);
explicit Frame(Page&);
Expand Down
4 changes: 2 additions & 2 deletions Libraries/LibWeb/Page.cpp → Libraries/LibWeb/Page/Page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* 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>

namespace Web {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions Libraries/LibWeb/PageView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
#include <LibWeb/DOM/ElementFactory.h>
#include <LibWeb/DOM/Text.h>
#include <LibWeb/Dump.h>
#include <LibWeb/Frame/EventHandler.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/HTML/HTMLImageElement.h>
#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/Layout/LayoutBreak.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutNode.h>
#include <LibWeb/Layout/LayoutText.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/PageView.h>
#include <LibWeb/Painting/PaintContext.h>
#include <LibWeb/HTML/Parser/HTMLDocumentParser.h>
#include <LibWeb/UIEvents/MouseEvent.h>
#include <stdio.h>

Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibWeb/PageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <AK/URL.h>
#include <LibGUI/ScrollableWidget.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Page.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/WebViewHooks.h>

namespace Web {
Expand Down
2 changes: 1 addition & 1 deletion Services/WebContent/PageHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include <AK/SharedBuffer.h>
#include <LibGfx/Painter.h>
#include <LibGfx/SystemTheme.h>
#include <LibWeb/Frame/Frame.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Page/Frame.h>
#include <WebContent/WebContentClientEndpoint.h>

namespace WebContent {
Expand Down
2 changes: 1 addition & 1 deletion Services/WebContent/PageHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#pragma once

#include <LibWeb/Page.h>
#include <LibWeb/Page/Page.h>

namespace WebContent {

Expand Down

0 comments on commit ef711f5

Please sign in to comment.