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

Unified Diff: Source/core/rendering/RenderTheme.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/rendering/RenderTextControlSingleLine.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTheme.cpp
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index 22db462a15da33e5e3a50897ce9bb7a039e6330c..60eb7bbd384123d80914501725eec4db9d49332c 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -803,7 +803,7 @@ bool RenderTheme::isActive(const RenderObject* o) const
if (!node)
return false;
- Page* page = node->document()->page();
+ Page* page = node->document().page();
if (!page)
return false;
@@ -839,9 +839,9 @@ bool RenderTheme::isFocused(const RenderObject* o) const
return false;
node = node->focusDelegate();
- Document* document = node->document();
- Frame* frame = document->frame();
- return node == document->focusedElement() && node->shouldHaveFocusAppearance() && frame && frame->selection()->isFocusedAndActive();
+ Document& document = node->document();
+ Frame* frame = document.frame();
+ return node == document.focusedElement() && node->shouldHaveFocusAppearance() && frame && frame->selection()->isFocusedAndActive();
}
bool RenderTheme::isPressed(const RenderObject* o) const
« no previous file with comments | « Source/core/rendering/RenderTextControlSingleLine.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698