1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibWeb: Move everything into the Web namespace

This commit is contained in:
Andreas Kling 2020-03-07 10:27:02 +01:00
parent 6a3b12664a
commit 7a6c4a72d5
143 changed files with 593 additions and 45 deletions

View file

@ -41,13 +41,13 @@ InspectorWidget::InspectorWidget()
auto& splitter = add<GUI::VerticalSplitter>();
m_dom_tree_view = splitter.add<GUI::TreeView>();
m_dom_tree_view->on_selection = [this](auto& index) {
auto* node = static_cast<Node*>(index.internal_data());
auto* node = static_cast<Web::Node*>(index.internal_data());
node->document().set_inspected_node(node);
if (node->is_element()) {
auto element = to<Element>(*node);
auto element = Web::to<Web::Element>(*node);
if (element.resolved_style()) {
m_style_table_view->set_model(StylePropertiesModel::create(*element.resolved_style()));
m_computed_style_table_view->set_model(StylePropertiesModel::create(*element.computed_style()));
m_style_table_view->set_model(Web::StylePropertiesModel::create(*element.resolved_style()));
m_computed_style_table_view->set_model(Web::StylePropertiesModel::create(*element.computed_style()));
}
} else {
m_style_table_view->set_model(nullptr);
@ -68,10 +68,10 @@ InspectorWidget::~InspectorWidget()
{
}
void InspectorWidget::set_document(Document* document)
void InspectorWidget::set_document(Web::Document* document)
{
if (m_document == document)
return;
m_document = document;
m_dom_tree_view->set_model(DOMTreeModel::create(*document));
m_dom_tree_view->set_model(Web::DOMTreeModel::create(*document));
}