mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibWeb: Rename Web::HtmlView => Web::PageView
This widget doesn't just view HTML, it views a web page. :^)
This commit is contained in:
parent
5f8cbe6a1b
commit
42243d2e06
24 changed files with 133 additions and 133 deletions
|
@ -51,7 +51,7 @@
|
|||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Frame.h>
|
||||
#include <LibWeb/HtmlView.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/Layout/LayoutDocument.h>
|
||||
#include <LibWeb/Layout/LayoutTreeBuilder.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
|
@ -368,7 +368,7 @@ Color Document::link_color() const
|
|||
return m_link_color.value();
|
||||
if (!frame())
|
||||
return Color::Blue;
|
||||
return frame()->html_view()->palette().link();
|
||||
return frame()->page_view()->palette().link();
|
||||
}
|
||||
|
||||
Color Document::active_link_color() const
|
||||
|
@ -377,7 +377,7 @@ Color Document::active_link_color() const
|
|||
return m_active_link_color.value();
|
||||
if (!frame())
|
||||
return Color::Red;
|
||||
return frame()->html_view()->palette().active_link();
|
||||
return frame()->page_view()->palette().active_link();
|
||||
}
|
||||
|
||||
Color Document::visited_link_color() const
|
||||
|
@ -386,7 +386,7 @@ Color Document::visited_link_color() const
|
|||
return m_visited_link_color.value();
|
||||
if (!frame())
|
||||
return Color::Magenta;
|
||||
return frame()->html_view()->palette().visited_link();
|
||||
return frame()->page_view()->palette().visited_link();
|
||||
}
|
||||
|
||||
JS::Interpreter& Document::interpreter()
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <LibWeb/DOM/HTMLFormElement.h>
|
||||
#include <LibWeb/DOM/HTMLInputElement.h>
|
||||
#include <LibWeb/Frame.h>
|
||||
#include <LibWeb/HtmlView.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/URLEncoder.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -72,7 +72,7 @@ void HTMLFormElement::submit(RefPtr<HTMLInputElement> submitter)
|
|||
url.set_query(url_encode(parameters));
|
||||
|
||||
// FIXME: We shouldn't let the form just do this willy-nilly.
|
||||
document().frame()->html_view()->load(url);
|
||||
document().frame()->page_view()->load(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <LibWeb/DOM/HTMLFormElement.h>
|
||||
#include <LibWeb/DOM/HTMLInputElement.h>
|
||||
#include <LibWeb/Frame.h>
|
||||
#include <LibWeb/HtmlView.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
#include <LibWeb/Layout/LayoutWidget.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -49,15 +49,15 @@ RefPtr<LayoutNode> HTMLInputElement::create_layout_node(const StyleProperties*)
|
|||
{
|
||||
ASSERT(document().frame());
|
||||
auto& frame = *document().frame();
|
||||
ASSERT(frame.html_view());
|
||||
auto& html_view = const_cast<HtmlView&>(*frame.html_view());
|
||||
ASSERT(frame.page_view());
|
||||
auto& page_view = const_cast<PageView&>(*frame.page_view());
|
||||
|
||||
if (type() == "hidden")
|
||||
return nullptr;
|
||||
|
||||
RefPtr<GUI::Widget> widget;
|
||||
if (type() == "submit") {
|
||||
auto& button = html_view.add<GUI::Button>(value());
|
||||
auto& button = page_view.add<GUI::Button>(value());
|
||||
int text_width = Gfx::Font::default_font().width(value());
|
||||
button.set_relative_rect(0, 0, text_width + 20, 20);
|
||||
button.on_click = [this](auto) {
|
||||
|
@ -68,7 +68,7 @@ RefPtr<LayoutNode> HTMLInputElement::create_layout_node(const StyleProperties*)
|
|||
};
|
||||
widget = button;
|
||||
} else {
|
||||
auto& text_box = html_view.add<GUI::TextBox>();
|
||||
auto& text_box = page_view.add<GUI::TextBox>();
|
||||
text_box.set_text(value());
|
||||
text_box.on_change = [this] {
|
||||
auto& widget = to<LayoutWidget>(layout_node())->widget();
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/Frame.h>
|
||||
#include <LibWeb/HtmlView.h>
|
||||
#include <LibWeb/PageView.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
|
@ -115,7 +115,7 @@ void Window::did_set_location_href(Badge<Bindings::LocationObject>, const String
|
|||
auto* frame = document().frame();
|
||||
if (!frame)
|
||||
return;
|
||||
auto* view = frame->html_view();
|
||||
auto* view = frame->page_view();
|
||||
if (!view)
|
||||
return;
|
||||
view->load(new_href);
|
||||
|
@ -126,7 +126,7 @@ void Window::did_call_location_reload(Badge<Bindings::LocationObject>)
|
|||
auto* frame = document().frame();
|
||||
if (!frame)
|
||||
return;
|
||||
auto* view = frame->html_view();
|
||||
auto* view = frame->page_view();
|
||||
if (!view)
|
||||
return;
|
||||
view->reload();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue