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

Unified Diff: sky/engine/core/editing/Caret.cpp

Issue 681553003: Remove a bunch of unused or never-set settings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/editing/Caret.h ('k') | sky/engine/core/editing/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/Caret.cpp
diff --git a/sky/engine/core/editing/Caret.cpp b/sky/engine/core/editing/Caret.cpp
index a783a3eedef700c6c6eaa87c9c0758bb2b8954bd..c25decef0cd7bc89759e2c0c8343658a98593e29 100644
--- a/sky/engine/core/editing/Caret.cpp
+++ b/sky/engine/core/editing/Caret.cpp
@@ -210,17 +210,6 @@ void CaretBase::invalidateLocalCaretRect(Node* node, const LayoutRect& rect)
caretPainter->invalidatePaintRectangle(inflatedRect);
}
-bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditable) const
-{
- ASSERT(view);
- bool caretBrowsing = false;
- if (FrameView* frameView = view->frameView()) {
- LocalFrame& frame = frameView->frame(); // The frame where the selection started
- caretBrowsing = frame.settings() && frame.settings()->caretBrowsingEnabled();
- }
- return (caretBrowsing || isContentEditable);
-}
-
void CaretBase::invalidateCaretRect(Node* node, bool caretRectChanged)
{
// EDIT FIXME: This is an unfortunate hack.
@@ -239,10 +228,8 @@ void CaretBase::invalidateCaretRect(Node* node, bool caretRectChanged)
if (caretRectChanged)
return;
- if (RenderView* view = node->document().renderView()) {
- if (shouldRepaintCaret(view, node->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)))
- invalidateLocalCaretRect(node, localCaretRectWithoutUpdate());
- }
+ if (node->isContentEditable(Node::UserSelectAllIsAlwaysNonEditable))
+ invalidateLocalCaretRect(node, localCaretRectWithoutUpdate());
}
void CaretBase::paintCaret(Node* node, GraphicsContext* context, const LayoutPoint& paintOffset, const LayoutRect& clipRect) const
« no previous file with comments | « sky/engine/core/editing/Caret.h ('k') | sky/engine/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698