mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Rename Web::Frame to Web::BrowsingContext
Our "frame" concept very closely matches what the web specs call a "browsing context", so let's rename it to that. :^) The "main frame" becomes the "top-level browsing context", and "sub-frames" are now "nested browsing contexts".
This commit is contained in:
parent
8be98af77c
commit
4190fd2199
43 changed files with 241 additions and 241 deletions
|
@ -15,7 +15,7 @@
|
|||
#include <LibWeb/Layout/InitialContainingBlockBox.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
@ -104,16 +104,16 @@ HitTestResult Node::hit_test(const Gfx::IntPoint& position, HitTestType type) co
|
|||
return result;
|
||||
}
|
||||
|
||||
const Frame& Node::frame() const
|
||||
const BrowsingContext& Node::browsing_context() const
|
||||
{
|
||||
VERIFY(document().frame());
|
||||
return *document().frame();
|
||||
VERIFY(document().browsing_context());
|
||||
return *document().browsing_context();
|
||||
}
|
||||
|
||||
Frame& Node::frame()
|
||||
BrowsingContext& Node::browsing_context()
|
||||
{
|
||||
VERIFY(document().frame());
|
||||
return *document().frame();
|
||||
VERIFY(document().browsing_context());
|
||||
return *document().browsing_context();
|
||||
}
|
||||
|
||||
const InitialContainingBlockBox& Node::root() const
|
||||
|
@ -140,7 +140,7 @@ void Node::set_needs_display()
|
|||
if (auto* block = containing_block()) {
|
||||
block->for_each_fragment([&](auto& fragment) {
|
||||
if (&fragment.layout_node() == this || is_ancestor_of(fragment.layout_node())) {
|
||||
frame().set_needs_display(enclosing_int_rect(fragment.absolute_rect()));
|
||||
browsing_context().set_needs_display(enclosing_int_rect(fragment.absolute_rect()));
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue