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

Unified Diff: Source/core/editing/Caret.cpp

Issue 23728003: Return Frame&, not Frame* from RenderView::frame() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed PopupMenuTest build Created 7 years, 3 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/css/resolver/StyleResolver.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Caret.cpp
diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp
index eb81c803c6eeb0d0e8ae7a16b6156f3e2ec289be..fce2545c25cf6c0ac89187ca5465b0cb6fd2b1f3 100644
--- a/Source/core/editing/Caret.cpp
+++ b/Source/core/editing/Caret.cpp
@@ -209,8 +209,11 @@ void CaretBase::repaintCaretForLocalRect(Node* node, const LayoutRect& rect)
bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditable) const
{
ASSERT(view);
- Frame* frame = view->frameView() ? view->frameView()->frame() : 0; // The frame where the selection started.
- bool caretBrowsing = frame && frame->settings() && frame->settings()->caretBrowsingEnabled();
+ bool caretBrowsing = false;
+ if (FrameView* frameView = view->frameView()) {
+ Frame& frame = frameView->frame(); // The frame where the selection started
+ caretBrowsing = frame.settings() && frame.settings()->caretBrowsingEnabled();
+ }
return (caretBrowsing || isContentEditable);
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698