Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorOverlay.cpp
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index c81ac7f44099bdcee008fba1e651b2715505fe89..fc2dfd0f4e9efc0d6a183804a147411dd4815aa6 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -141,7 +141,7 @@ static void contentsQuadToPage(const FrameView* mainView, const FrameView* view,
static bool buildNodeQuads(Node* node, Vector<FloatQuad>& quads)
{
RenderObject* renderer = node->renderer();
- Frame* containingFrame = node->document()->frame();
+ Frame* containingFrame = node->document().frame();
if (!renderer || !containingFrame)
return false;
@@ -214,7 +214,7 @@ static bool buildNodeQuads(Node* node, Vector<FloatQuad>& quads)
static void buildNodeHighlight(Node* node, const HighlightConfig& highlightConfig, Highlight* highlight)
{
RenderObject* renderer = node->renderer();
- Frame* containingFrame = node->document()->frame();
+ Frame* containingFrame = node->document().frame();
if (!renderer || !containingFrame)
return;
@@ -527,10 +527,10 @@ void InspectorOverlay::drawNodeHighlight()
RefPtr<JSONObject> highlightObject = buildObjectForHighlight(highlight);
Node* node = m_highlightNode.get();
- if (node->isElementNode() && m_nodeHighlightConfig.showInfo && node->renderer() && node->document()->frame()) {
+ if (node->isElementNode() && m_nodeHighlightConfig.showInfo && node->renderer() && node->document().frame()) {
RefPtr<JSONObject> elementInfo = JSONObject::create();
Element* element = toElement(node);
- bool isXHTML = element->document()->isXHTMLDocument();
+ bool isXHTML = element->document().isXHTMLDocument();
elementInfo->setString("tagName", isXHTML ? element->nodeName() : element->nodeName().lower());
elementInfo->setString("idValue", element->getIdAttribute());
HashSet<AtomicString> usedClassNames;
@@ -549,7 +549,7 @@ void InspectorOverlay::drawNodeHighlight()
}
RenderObject* renderer = node->renderer();
- Frame* containingFrame = node->document()->frame();
+ Frame* containingFrame = node->document().frame();
FrameView* containingView = containingFrame->view();
IntRect boundingBox = pixelSnappedIntRect(containingView->contentsToRootView(renderer->absoluteBoundingBoxRect()));
RenderBoxModelObject* modelObject = renderer->isBoxModelObject() ? toRenderBoxModelObject(renderer) : 0;
« no previous file with comments | « Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698