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

Unified Diff: sky/engine/core/editing/FrameSelection.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/EditorCommand.cpp ('k') | sky/engine/core/frame/Settings.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/FrameSelection.cpp
diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp
index 1673bbec12459ee165a3287697ca5a10c686f739..cb2d3743a9df61f16fb3e37fc73c37eb2ce9b199 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -1236,10 +1236,9 @@ void FrameSelection::invalidateCaretRect()
if (!m_caretBlinkTimer.isActive() && newNode == m_previousCaretNode && newRect == m_previousCaretRect)
return;
- RenderView* view = m_frame->document()->renderView();
- if (m_previousCaretNode && shouldRepaintCaret(view, m_previousCaretNode->isContentEditable()))
+ if (m_previousCaretNode && m_previousCaretNode->isContentEditable())
invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect);
- if (newNode && shouldRepaintCaret(view, newNode->isContentEditable()))
+ if (newNode && newNode->isContentEditable())
invalidateLocalCaretRect(newNode, newRect);
m_previousCaretNode = newNode;
@@ -1512,9 +1511,6 @@ bool FrameSelection::shouldBlinkCaret() const
if (!caretIsVisible() || !isCaret())
return false;
- if (m_frame->settings() && m_frame->settings()->caretBrowsingEnabled())
- return false;
-
Element* root = rootEditableElement();
if (!root)
return false;
@@ -1558,14 +1554,6 @@ void FrameSelection::setFocusedNodeIfNeeded()
if (isNone() || !isFocused())
return;
- bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
- if (caretBrowsing) {
- if (Element* anchor = enclosingAnchorElement(base())) {
- m_frame->page()->focusController().setFocusedElement(anchor, m_frame);
- return;
- }
- }
-
if (Element* target = rootEditableElement()) {
// Walk up the DOM tree to search for a node to focus.
while (target) {
@@ -1580,9 +1568,6 @@ void FrameSelection::setFocusedNodeIfNeeded()
}
m_frame->document()->setFocusedElement(nullptr);
}
-
- if (caretBrowsing)
- m_frame->page()->focusController().setFocusedElement(0, m_frame);
}
static String extractSelectedText(const FrameSelection& selection, TextIteratorBehavior behavior)
« no previous file with comments | « sky/engine/core/editing/EditorCommand.cpp ('k') | sky/engine/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698