mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47: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
|
@ -10,7 +10,7 @@
|
|||
#include <LibWeb/InProcessWebView.h>
|
||||
#include <LibWeb/Layout/FrameBox.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlockBox.h>
|
||||
#include <LibWeb/Page/Frame.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
@ -25,7 +25,7 @@ FrameBox::~FrameBox()
|
|||
|
||||
void FrameBox::prepare_for_replaced_layout()
|
||||
{
|
||||
VERIFY(dom_node().content_frame());
|
||||
VERIFY(dom_node().nested_browsing_context());
|
||||
|
||||
set_has_intrinsic_width(true);
|
||||
set_has_intrinsic_height(true);
|
||||
|
@ -52,14 +52,14 @@ void FrameBox::paint(PaintContext& context, PaintPhase phase)
|
|||
context.painter().add_clip_rect(enclosing_int_rect(absolute_rect()));
|
||||
context.painter().translate(absolute_x(), absolute_y());
|
||||
|
||||
context.set_viewport_rect({ {}, dom_node().content_frame()->size() });
|
||||
context.set_viewport_rect({ {}, dom_node().nested_browsing_context()->size() });
|
||||
const_cast<Layout::InitialContainingBlockBox*>(hosted_layout_tree)->paint_all_phases(context);
|
||||
|
||||
context.set_viewport_rect(old_viewport_rect);
|
||||
context.painter().restore();
|
||||
|
||||
if constexpr (HIGHLIGHT_FOCUSED_FRAME_DEBUG) {
|
||||
if (dom_node().content_frame()->is_focused_frame()) {
|
||||
if (dom_node().nested_browsing_context()->is_focused_context()) {
|
||||
context.painter().draw_rect(absolute_rect().to_type<int>(), Color::Cyan);
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,8 @@ void FrameBox::did_set_rect()
|
|||
{
|
||||
ReplacedBox::did_set_rect();
|
||||
|
||||
VERIFY(dom_node().content_frame());
|
||||
dom_node().content_frame()->set_size(size().to_type<int>());
|
||||
VERIFY(dom_node().nested_browsing_context());
|
||||
dom_node().nested_browsing_context()->set_size(size().to_type<int>());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue