diff options
author | Matrix89 <Matrix89@protonmail.ch> | 2020-01-04 03:09:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-05 17:13:22 +0100 |
commit | 2dd35916e5b5307d85c74d7341379b3c0050ffdd (patch) | |
tree | 541585a38349651ef033fa3ac69432e47e469810 /Applications | |
parent | 2ced4c4ec745d1387be0e3a320596fd7b1597185 (diff) | |
download | serenity-2dd35916e5b5307d85c74d7341379b3c0050ffdd.zip |
Browser+LibHTML: Change the way computed styles are queried
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Browser/InspectorWidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Applications/Browser/InspectorWidget.cpp b/Applications/Browser/InspectorWidget.cpp index 946ac64f71..d684f28d58 100644 --- a/Applications/Browser/InspectorWidget.cpp +++ b/Applications/Browser/InspectorWidget.cpp @@ -20,10 +20,10 @@ InspectorWidget::InspectorWidget(GWidget* parent) node->document().set_inspected_node(node); if (node->is_element()) { auto element = to<Element>(*node); - if (element.resolved_style()) - m_style_table_view->set_model(StylePropertiesModel::create(*element.resolved_style())); - if (element.layout_node() && element.layout_node()->has_style()) - m_computed_style_table_view->set_model(StylePropertiesModel::create(element.layout_node()->style())); + 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())); + } } else { m_style_table_view->set_model(nullptr); m_computed_style_table_view->set_model(nullptr); |