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

Unified Diff: third_party/WebKit/Source/core/editing/FrameCaret.h

Issue 2161373002: Make FrameCaret to retrieve caret position from SelectionEditor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-21T11:26:04 Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/core/editing/FrameCaret.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/FrameCaret.h
diff --git a/third_party/WebKit/Source/core/editing/FrameCaret.h b/third_party/WebKit/Source/core/editing/FrameCaret.h
index 51b8a95fe250ccad0d0f6262d8d3c249b2a217c6..7af97347829e3ae29773a76ae95119e4197b820f 100644
--- a/third_party/WebKit/Source/core/editing/FrameCaret.h
+++ b/third_party/WebKit/Source/core/editing/FrameCaret.h
@@ -26,19 +26,20 @@
#ifndef FrameCaret_h
#define FrameCaret_h
+#include "core/CoreExport.h"
#include "core/editing/CaretBase.h"
#include "platform/geometry/IntRect.h"
namespace blink {
-class FrameCaret final : public CaretBase {
+class SelectionEditor;
+
+class CORE_EXPORT FrameCaret final : public CaretBase {
public:
- FrameCaret(LocalFrame*);
+ FrameCaret(LocalFrame*, const SelectionEditor&);
~FrameCaret() override;
- void setCaretPosition(const PositionWithAffinity&);
- void clear();
- bool isActive() const { return m_caretPosition.isNotNull(); }
+ bool isActive() const { return caretPosition().isNotNull(); }
void updateAppearance();
@@ -71,11 +72,15 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
+ friend class FrameSelectionTest;
+
+ const PositionWithAffinity caretPosition() const;
+
bool shouldBlinkCaret() const;
void caretBlinkTimerFired(Timer<FrameCaret>*);
bool caretPositionIsValidForDocument(const Document&) const;
- PositionWithAffinity m_caretPosition;
+ const Member<const SelectionEditor> m_selectionEditor;
const Member<LocalFrame> m_frame;
// The last node which painted the caret. Retained for clearing the old
// caret when it moves.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameCaret.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698