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

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

Issue 806223002: Remove unused/unneeded code from core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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/editing/Caret.h ('k') | Source/core/editing/CompositeEditCommand.h » ('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 a4fe6c68b01c6cb61b07c1b42ebddf63029846ba..9ad65040baf6ddeb9966c33ab7cbde5a862f1379 100644
--- a/Source/core/editing/Caret.cpp
+++ b/Source/core/editing/Caret.cpp
@@ -40,8 +40,7 @@
namespace blink {
CaretBase::CaretBase(CaretVisibility visibility)
- : m_caretRectNeedsUpdate(true)
- , m_caretVisibility(visibility)
+ : m_caretVisibility(visibility)
{
}
@@ -69,7 +68,6 @@ void DragCaretController::setCaretPosition(const VisiblePosition& position)
if (Node* node = m_position.deepEquivalent().deprecatedNode())
invalidateCaretRect(node);
m_position = position;
- setCaretRectNeedsUpdate();
Document* document = nullptr;
if (Node* node = m_position.deepEquivalent().deprecatedNode()) {
invalidateCaretRect(node);
@@ -166,8 +164,6 @@ bool CaretBase::updateCaretRect(Document* document, const PositionWithAffinity&
{
m_caretLocalRect = LayoutRect();
- m_caretRectNeedsUpdate = false;
-
if (caretPosition.position().isNull())
return false;
@@ -237,19 +233,6 @@ bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditabl
void CaretBase::invalidateCaretRect(Node* node, bool caretRectChanged)
{
- // EDIT FIXME: This is an unfortunate hack.
- // Basically, we can't trust this layout position since we
- // can't guarantee that the check to see if we are in unrendered
- // content will work at this point. We may have to wait for
- // a layout and re-render of the document to happen. So, resetting this
- // flag will cause another caret layout to happen the first time
- // that we try to paint the caret after this call. That one will work since
- // it happens after the document has accounted for any editing
- // changes which may have been done.
- // And, we need to leave this layout here so the caret moves right
- // away after clicking.
- m_caretRectNeedsUpdate = true;
-
if (caretRectChanged)
return;
« no previous file with comments | « Source/core/editing/Caret.h ('k') | Source/core/editing/CompositeEditCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698