mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:32:43 +00:00 
			
		
		
		
	LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock
The "Box" suffix added nothing here.
This commit is contained in:
		
							parent
							
								
									e90ccf6a20
								
							
						
					
					
						commit
						e91edcaa28
					
				
					 31 changed files with 71 additions and 71 deletions
				
			
		|  | @ -30,7 +30,7 @@ | |||
| #include <LibGUI/Widget.h> | ||||
| #include <LibJS/Interpreter.h> | ||||
| #include <LibWeb/Dump.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Loader/ResourceLoader.h> | ||||
| #include <LibWeb/OutOfProcessWebView.h> | ||||
| 
 | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ | |||
| #include <LibJS/Interpreter.h> | ||||
| #include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h> | ||||
| #include <LibWeb/Layout/BlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Loader/ResourceLoader.h> | ||||
| #include <LibWeb/OutOfProcessWebView.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
|  |  | |||
|  | @ -172,7 +172,7 @@ set(SOURCES | |||
|     Layout/FormattingContext.cpp | ||||
|     Layout/FrameBox.cpp | ||||
|     Layout/ImageBox.cpp | ||||
|     Layout/InitialContainingBlockBox.cpp | ||||
|     Layout/InitialContainingBlock.cpp | ||||
|     Layout/InlineFormattingContext.cpp | ||||
|     Layout/InlineNode.cpp | ||||
|     Layout/Label.cpp | ||||
|  |  | |||
|  | @ -46,7 +46,7 @@ | |||
| #include <LibWeb/HTML/HTMLScriptElement.h> | ||||
| #include <LibWeb/HTML/HTMLTitleElement.h> | ||||
| #include <LibWeb/Layout/BlockFormattingContext.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/TreeBuilder.h> | ||||
| #include <LibWeb/Namespace.h> | ||||
| #include <LibWeb/Origin.h> | ||||
|  | @ -404,7 +404,7 @@ void Document::update_layout() | |||
| 
 | ||||
|     if (!m_layout_root) { | ||||
|         Layout::TreeBuilder tree_builder; | ||||
|         m_layout_root = static_ptr_cast<Layout::InitialContainingBlockBox>(tree_builder.build(*this)); | ||||
|         m_layout_root = static_ptr_cast<Layout::InitialContainingBlock>(tree_builder.build(*this)); | ||||
|     } | ||||
| 
 | ||||
|     Layout::BlockFormattingContext root_formatting_context(*m_layout_root, nullptr); | ||||
|  | @ -442,7 +442,7 @@ void Document::update_style() | |||
| 
 | ||||
| RefPtr<Layout::Node> Document::create_layout_node() | ||||
| { | ||||
|     return adopt_ref(*new Layout::InitialContainingBlockBox(*this, CSS::StyleProperties::create())); | ||||
|     return adopt_ref(*new Layout::InitialContainingBlock(*this, CSS::StyleProperties::create())); | ||||
| } | ||||
| 
 | ||||
| void Document::set_link_color(Color color) | ||||
|  | @ -460,14 +460,14 @@ void Document::set_visited_link_color(Color color) | |||
|     m_visited_link_color = color; | ||||
| } | ||||
| 
 | ||||
| const Layout::InitialContainingBlockBox* Document::layout_node() const | ||||
| const Layout::InitialContainingBlock* Document::layout_node() const | ||||
| { | ||||
|     return static_cast<const Layout::InitialContainingBlockBox*>(Node::layout_node()); | ||||
|     return static_cast<const Layout::InitialContainingBlock*>(Node::layout_node()); | ||||
| } | ||||
| 
 | ||||
| Layout::InitialContainingBlockBox* Document::layout_node() | ||||
| Layout::InitialContainingBlock* Document::layout_node() | ||||
| { | ||||
|     return static_cast<Layout::InitialContainingBlockBox*>(Node::layout_node()); | ||||
|     return static_cast<Layout::InitialContainingBlock*>(Node::layout_node()); | ||||
| } | ||||
| 
 | ||||
| void Document::set_inspected_node(Node* node) | ||||
|  |  | |||
|  | @ -147,8 +147,8 @@ public: | |||
| 
 | ||||
|     virtual bool is_child_allowed(const Node&) const override; | ||||
| 
 | ||||
|     const Layout::InitialContainingBlockBox* layout_node() const; | ||||
|     Layout::InitialContainingBlockBox* layout_node(); | ||||
|     const Layout::InitialContainingBlock* layout_node() const; | ||||
|     Layout::InitialContainingBlock* layout_node(); | ||||
| 
 | ||||
|     void schedule_style_update(); | ||||
|     void schedule_forced_layout(); | ||||
|  | @ -309,7 +309,7 @@ private: | |||
| 
 | ||||
|     RefPtr<Window> m_window; | ||||
| 
 | ||||
|     RefPtr<Layout::InitialContainingBlockBox> m_layout_root; | ||||
|     RefPtr<Layout::InitialContainingBlock> m_layout_root; | ||||
| 
 | ||||
|     Optional<Color> m_link_color; | ||||
|     Optional<Color> m_active_link_color; | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ | |||
| #include <LibWeb/DOM/ProcessingInstruction.h> | ||||
| #include <LibWeb/DOM/ShadowRoot.h> | ||||
| #include <LibWeb/HTML/HTMLAnchorElement.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/Node.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <LibWeb/Origin.h> | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ | |||
| #include <LibWeb/DOM/Timer.h> | ||||
| #include <LibWeb/DOM/Window.h> | ||||
| #include <LibWeb/HighResolutionTime/Performance.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <LibWeb/Page/Page.h> | ||||
| 
 | ||||
|  |  | |||
|  | @ -168,7 +168,7 @@ class Box; | |||
| class ButtonBox; | ||||
| class CheckBox; | ||||
| class FormattingContext; | ||||
| class InitialContainingBlockBox; | ||||
| class InitialContainingBlock; | ||||
| class InlineFormattingContext; | ||||
| class Label; | ||||
| class LabelableNode; | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ | |||
| #include <LibWeb/HTML/HTMLAnchorElement.h> | ||||
| #include <LibWeb/HTML/Parser/HTMLDocumentParser.h> | ||||
| #include <LibWeb/InProcessWebView.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <LibWeb/Loader/ResourceLoader.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
|  | @ -299,16 +299,16 @@ bool InProcessWebView::load(const URL& url) | |||
|     return page().top_level_browsing_context().loader().load(url, FrameLoader::Type::Navigation); | ||||
| } | ||||
| 
 | ||||
| const Layout::InitialContainingBlockBox* InProcessWebView::layout_root() const | ||||
| const Layout::InitialContainingBlock* InProcessWebView::layout_root() const | ||||
| { | ||||
|     return document() ? document()->layout_node() : nullptr; | ||||
| } | ||||
| 
 | ||||
| Layout::InitialContainingBlockBox* InProcessWebView::layout_root() | ||||
| Layout::InitialContainingBlock* InProcessWebView::layout_root() | ||||
| { | ||||
|     if (!document()) | ||||
|         return nullptr; | ||||
|     return const_cast<Layout::InitialContainingBlockBox*>(document()->layout_node()); | ||||
|     return const_cast<Layout::InitialContainingBlock*>(document()->layout_node()); | ||||
| } | ||||
| 
 | ||||
| void InProcessWebView::page_did_request_scroll_into_view(const Gfx::IntRect& rect) | ||||
|  |  | |||
|  | @ -32,8 +32,8 @@ public: | |||
| 
 | ||||
|     void set_document(DOM::Document*); | ||||
| 
 | ||||
|     const Layout::InitialContainingBlockBox* layout_root() const; | ||||
|     Layout::InitialContainingBlockBox* layout_root(); | ||||
|     const Layout::InitialContainingBlock* layout_root() const; | ||||
|     Layout::InitialContainingBlock* layout_root(); | ||||
| 
 | ||||
|     void reload(); | ||||
|     bool load(const URL&); | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ | |||
| #include <LibGfx/Painter.h> | ||||
| #include <LibWeb/Dump.h> | ||||
| #include <LibWeb/Layout/BlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/InlineFormattingContext.h> | ||||
| #include <LibWeb/Layout/ReplacedBox.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ | |||
| #include <LibWeb/Layout/BlockBox.h> | ||||
| #include <LibWeb/Layout/BlockFormattingContext.h> | ||||
| #include <LibWeb/Layout/Box.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/InlineFormattingContext.h> | ||||
| #include <LibWeb/Layout/ListItemBox.h> | ||||
| #include <LibWeb/Layout/ReplacedBox.h> | ||||
|  | @ -28,7 +28,7 @@ BlockFormattingContext::~BlockFormattingContext() | |||
| 
 | ||||
| bool BlockFormattingContext::is_initial() const | ||||
| { | ||||
|     return is<InitialContainingBlockBox>(context_box()); | ||||
|     return is<InitialContainingBlock>(context_box()); | ||||
| } | ||||
| 
 | ||||
| void BlockFormattingContext::run(Box& box, LayoutMode layout_mode) | ||||
|  | @ -526,7 +526,7 @@ void BlockFormattingContext::layout_initial_containing_block(LayoutMode layout_m | |||
| { | ||||
|     auto viewport_rect = context_box().browsing_context().viewport_rect(); | ||||
| 
 | ||||
|     auto& icb = verify_cast<Layout::InitialContainingBlockBox>(context_box()); | ||||
|     auto& icb = verify_cast<Layout::InitialContainingBlock>(context_box()); | ||||
|     icb.build_stacking_context_tree(); | ||||
| 
 | ||||
|     icb.set_width(viewport_rect.width()); | ||||
|  |  | |||
|  | @ -394,7 +394,7 @@ StackingContext* Box::enclosing_stacking_context() | |||
|         VERIFY(ancestor_box.stacking_context()); | ||||
|         return ancestor_box.stacking_context(); | ||||
|     } | ||||
|     // We should always reach the Layout::InitialContainingBlockBox stacking context.
 | ||||
|     // We should always reach the Layout::InitialContainingBlock stacking context.
 | ||||
|     VERIFY_NOT_REACHED(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
| #include <LibWeb/Layout/BlockFormattingContext.h> | ||||
| #include <LibWeb/Layout/Box.h> | ||||
| #include <LibWeb/Layout/FlexFormattingContext.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| 
 | ||||
| namespace Web::Layout { | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
| #include <LibGfx/Painter.h> | ||||
| #include <LibWeb/DOM/Document.h> | ||||
| #include <LibWeb/Layout/FrameBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| 
 | ||||
| namespace Web::Layout { | ||||
|  | @ -52,7 +52,7 @@ void FrameBox::paint(PaintContext& context, PaintPhase phase) | |||
|         context.painter().translate(absolute_x(), absolute_y()); | ||||
| 
 | ||||
|         context.set_viewport_rect({ {}, dom_node().nested_browsing_context()->size() }); | ||||
|         const_cast<Layout::InitialContainingBlockBox*>(hosted_layout_tree)->paint_all_phases(context); | ||||
|         const_cast<Layout::InitialContainingBlock*>(hosted_layout_tree)->paint_all_phases(context); | ||||
| 
 | ||||
|         context.set_viewport_rect(old_viewport_rect); | ||||
|         context.painter().restore(); | ||||
|  |  | |||
|  | @ -1,27 +1,27 @@ | |||
| /*
 | ||||
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> | ||||
|  * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> | ||||
|  * | ||||
|  * SPDX-License-Identifier: BSD-2-Clause | ||||
|  */ | ||||
| 
 | ||||
| #include <LibGfx/Painter.h> | ||||
| #include <LibWeb/Dump.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <LibWeb/Painting/StackingContext.h> | ||||
| 
 | ||||
| namespace Web::Layout { | ||||
| 
 | ||||
| InitialContainingBlockBox::InitialContainingBlockBox(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style) | ||||
| InitialContainingBlock::InitialContainingBlock(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style) | ||||
|     : BlockBox(document, &document, move(style)) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| InitialContainingBlockBox::~InitialContainingBlockBox() | ||||
| InitialContainingBlock::~InitialContainingBlock() | ||||
| { | ||||
| } | ||||
| 
 | ||||
| void InitialContainingBlockBox::build_stacking_context_tree() | ||||
| void InitialContainingBlock::build_stacking_context_tree() | ||||
| { | ||||
|     if (stacking_context()) | ||||
|         return; | ||||
|  | @ -42,18 +42,18 @@ void InitialContainingBlockBox::build_stacking_context_tree() | |||
|     }); | ||||
| } | ||||
| 
 | ||||
| void InitialContainingBlockBox::paint_all_phases(PaintContext& context) | ||||
| void InitialContainingBlock::paint_all_phases(PaintContext& context) | ||||
| { | ||||
|     context.painter().translate(-context.viewport_rect().location()); | ||||
|     stacking_context()->paint(context); | ||||
| } | ||||
| 
 | ||||
| HitTestResult InitialContainingBlockBox::hit_test(const Gfx::IntPoint& position, HitTestType type) const | ||||
| HitTestResult InitialContainingBlock::hit_test(const Gfx::IntPoint& position, HitTestType type) const | ||||
| { | ||||
|     return stacking_context()->hit_test(position, type); | ||||
| } | ||||
| 
 | ||||
| void InitialContainingBlockBox::recompute_selection_states() | ||||
| void InitialContainingBlock::recompute_selection_states() | ||||
| { | ||||
|     SelectionState state = SelectionState::None; | ||||
| 
 | ||||
|  | @ -79,13 +79,13 @@ void InitialContainingBlockBox::recompute_selection_states() | |||
|     }); | ||||
| } | ||||
| 
 | ||||
| void InitialContainingBlockBox::set_selection(const LayoutRange& selection) | ||||
| void InitialContainingBlock::set_selection(const LayoutRange& selection) | ||||
| { | ||||
|     m_selection = selection; | ||||
|     recompute_selection_states(); | ||||
| } | ||||
| 
 | ||||
| void InitialContainingBlockBox::set_selection_end(const LayoutPosition& position) | ||||
| void InitialContainingBlock::set_selection_end(const LayoutPosition& position) | ||||
| { | ||||
|     m_selection.set_end(position); | ||||
|     recompute_selection_states(); | ||||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> | ||||
|  * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> | ||||
|  * | ||||
|  * SPDX-License-Identifier: BSD-2-Clause | ||||
|  */ | ||||
|  | @ -11,10 +11,10 @@ | |||
| 
 | ||||
| namespace Web::Layout { | ||||
| 
 | ||||
| class InitialContainingBlockBox final : public BlockBox { | ||||
| class InitialContainingBlock final : public BlockBox { | ||||
| public: | ||||
|     explicit InitialContainingBlockBox(DOM::Document&, NonnullRefPtr<CSS::StyleProperties>); | ||||
|     virtual ~InitialContainingBlockBox() override; | ||||
|     explicit InitialContainingBlock(DOM::Document&, NonnullRefPtr<CSS::StyleProperties>); | ||||
|     virtual ~InitialContainingBlock() override; | ||||
| 
 | ||||
|     const DOM::Document& dom_node() const { return static_cast<const DOM::Document&>(*Node::dom_node()); } | ||||
| 
 | ||||
|  | @ -37,6 +37,6 @@ private: | |||
| }; | ||||
| 
 | ||||
| template<> | ||||
| inline bool Node::fast_is<InitialContainingBlockBox>() const { return is_initial_containing_block_box(); } | ||||
| inline bool Node::fast_is<InitialContainingBlock>() const { return is_initial_containing_block_box(); } | ||||
| 
 | ||||
| } | ||||
|  | @ -9,7 +9,7 @@ | |||
| #include <LibGfx/StylePainter.h> | ||||
| #include <LibWeb/DOM/Document.h> | ||||
| #include <LibWeb/DOM/Element.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/Label.h> | ||||
| #include <LibWeb/Layout/LabelableNode.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
| 
 | ||||
| #include <AK/Utf8View.h> | ||||
| #include <LibGfx/Painter.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/LineBoxFragment.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <LibWeb/Painting/PaintContext.h> | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ | |||
| #include <LibWeb/HTML/HTMLHtmlElement.h> | ||||
| #include <LibWeb/Layout/BlockBox.h> | ||||
| #include <LibWeb/Layout/FormattingContext.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/Node.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
|  | @ -36,7 +36,7 @@ Node::~Node() | |||
| 
 | ||||
| bool Node::can_contain_boxes_with_position_absolute() const | ||||
| { | ||||
|     return computed_values().position() != CSS::Position::Static || is<InitialContainingBlockBox>(*this); | ||||
|     return computed_values().position() != CSS::Position::Static || is<InitialContainingBlock>(*this); | ||||
| } | ||||
| 
 | ||||
| const BlockBox* Node::containing_block() const | ||||
|  | @ -120,13 +120,13 @@ BrowsingContext& Node::browsing_context() | |||
|     return *document().browsing_context(); | ||||
| } | ||||
| 
 | ||||
| const InitialContainingBlockBox& Node::root() const | ||||
| const InitialContainingBlock& Node::root() const | ||||
| { | ||||
|     VERIFY(document().layout_node()); | ||||
|     return *document().layout_node(); | ||||
| } | ||||
| 
 | ||||
| InitialContainingBlockBox& Node::root() | ||||
| InitialContainingBlock& Node::root() | ||||
| { | ||||
|     VERIFY(document().layout_node()); | ||||
|     return *document().layout_node(); | ||||
|  |  | |||
|  | @ -68,8 +68,8 @@ public: | |||
|     const BrowsingContext& browsing_context() const; | ||||
|     BrowsingContext& browsing_context(); | ||||
| 
 | ||||
|     const InitialContainingBlockBox& root() const; | ||||
|     InitialContainingBlockBox& root(); | ||||
|     const InitialContainingBlock& root() const; | ||||
|     InitialContainingBlock& root(); | ||||
| 
 | ||||
|     bool is_root_element() const; | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ | |||
| #include <LibWeb/DOM/ParentNode.h> | ||||
| #include <LibWeb/DOM/ShadowRoot.h> | ||||
| #include <LibWeb/Dump.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/Node.h> | ||||
| #include <LibWeb/Layout/TableBox.h> | ||||
| #include <LibWeb/Layout/TableCellBox.h> | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
| #include <AK/StringBuilder.h> | ||||
| #include <LibWeb/DOM/Document.h> | ||||
| #include <LibWeb/DOM/Element.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <ctype.h> | ||||
| #include <stdio.h> | ||||
|  | @ -99,7 +99,7 @@ GUI::Variant LayoutTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole | |||
| { | ||||
|     auto& node = *static_cast<Layout::Node*>(index.internal_data()); | ||||
|     if (role == GUI::ModelRole::Icon) { | ||||
|         if (is<Layout::InitialContainingBlockBox>(node)) | ||||
|         if (is<Layout::InitialContainingBlock>(node)) | ||||
|             return m_document_icon; | ||||
|         if (is<Layout::TextNode>(node)) | ||||
|             return m_text_icon; | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
| #include <LibWeb/DOM/Window.h> | ||||
| #include <LibWeb/HTML/HTMLAnchorElement.h> | ||||
| #include <LibWeb/Layout/BreakNode.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/TextNode.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <LibWeb/Page/Page.h> | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
| #include <LibWeb/DOM/Position.h> | ||||
| #include <LibWeb/DOM/Range.h> | ||||
| #include <LibWeb/DOM/Text.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Layout/LayoutPosition.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <LibWeb/Page/EditEventHandler.h> | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ | |||
| #include <LibWeb/HTML/HTMLAnchorElement.h> | ||||
| #include <LibWeb/HTML/HTMLIFrameElement.h> | ||||
| #include <LibWeb/HTML/HTMLImageElement.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <LibWeb/Page/EventHandler.h> | ||||
| #include <LibWeb/Page/Page.h> | ||||
|  | @ -97,14 +97,14 @@ EventHandler::~EventHandler() | |||
| { | ||||
| } | ||||
| 
 | ||||
| const Layout::InitialContainingBlockBox* EventHandler::layout_root() const | ||||
| const Layout::InitialContainingBlock* EventHandler::layout_root() const | ||||
| { | ||||
|     if (!m_frame.document()) | ||||
|         return nullptr; | ||||
|     return m_frame.document()->layout_node(); | ||||
| } | ||||
| 
 | ||||
| Layout::InitialContainingBlockBox* EventHandler::layout_root() | ||||
| Layout::InitialContainingBlock* EventHandler::layout_root() | ||||
| { | ||||
|     if (!m_frame.document()) | ||||
|         return nullptr; | ||||
|  |  | |||
|  | @ -39,8 +39,8 @@ private: | |||
|     bool focus_next_element(); | ||||
|     bool focus_previous_element(); | ||||
| 
 | ||||
|     Layout::InitialContainingBlockBox* layout_root(); | ||||
|     const Layout::InitialContainingBlockBox* layout_root() const; | ||||
|     Layout::InitialContainingBlock* layout_root(); | ||||
|     const Layout::InitialContainingBlock* layout_root() const; | ||||
| 
 | ||||
|     BrowsingContext& m_frame; | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ | |||
| #include <AK/StringBuilder.h> | ||||
| #include <LibGfx/Painter.h> | ||||
| #include <LibWeb/Layout/Box.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Painting/StackingContext.h> | ||||
| 
 | ||||
| namespace Web::Layout { | ||||
|  | @ -128,12 +128,12 @@ void StackingContext::paint(PaintContext& context) | |||
| HitTestResult StackingContext::hit_test(const Gfx::IntPoint& position, HitTestType type) const | ||||
| { | ||||
|     HitTestResult result; | ||||
|     if (!is<InitialContainingBlockBox>(m_box)) { | ||||
|     if (!is<InitialContainingBlock>(m_box)) { | ||||
|         result = m_box.hit_test(position, type); | ||||
|     } else { | ||||
|         // NOTE: InitialContainingBlockBox::hit_test() merely calls StackingContext::hit_test()
 | ||||
|         // NOTE: InitialContainingBlock::hit_test() merely calls StackingContext::hit_test()
 | ||||
|         //       so we call its base class instead.
 | ||||
|         result = verify_cast<InitialContainingBlockBox>(m_box).BlockBox::hit_test(position, type); | ||||
|         result = verify_cast<InitialContainingBlock>(m_box).BlockBox::hit_test(position, type); | ||||
|     } | ||||
| 
 | ||||
|     int z_index = m_box.computed_values().z_index().value_or(0); | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ | |||
| #include <LibWeb/Cookie/ParsedCookie.h> | ||||
| #include <LibWeb/DOM/Document.h> | ||||
| #include <LibWeb/Dump.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Loader/ResourceLoader.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <WebContent/ClientConnection.h> | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ | |||
| #include <LibGfx/Painter.h> | ||||
| #include <LibGfx/SystemTheme.h> | ||||
| #include <LibWeb/Cookie/ParsedCookie.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlockBox.h> | ||||
| #include <LibWeb/Layout/InitialContainingBlock.h> | ||||
| #include <LibWeb/Page/BrowsingContext.h> | ||||
| #include <WebContent/WebContentClientEndpoint.h> | ||||
| 
 | ||||
|  | @ -46,7 +46,7 @@ void PageHost::set_palette_impl(const Gfx::PaletteImpl& impl) | |||
|     m_palette_impl = impl; | ||||
| } | ||||
| 
 | ||||
| Web::Layout::InitialContainingBlockBox* PageHost::layout_root() | ||||
| Web::Layout::InitialContainingBlock* PageHost::layout_root() | ||||
| { | ||||
|     auto* document = page().top_level_browsing_context().document(); | ||||
|     if (!document) | ||||
|  |  | |||
|  | @ -63,7 +63,7 @@ private: | |||
| 
 | ||||
|     explicit PageHost(ClientConnection&); | ||||
| 
 | ||||
|     Web::Layout::InitialContainingBlockBox* layout_root(); | ||||
|     Web::Layout::InitialContainingBlock* layout_root(); | ||||
|     void setup_palette(); | ||||
| 
 | ||||
|     ClientConnection& m_client; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling