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

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

Issue 2665823002: Invalidate caret during paint invalidation (Closed)
Patch Set: Rebaseline Created 3 years, 11 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
Index: third_party/WebKit/Source/core/editing/DragCaret.h
diff --git a/third_party/WebKit/Source/core/editing/DragCaret.h b/third_party/WebKit/Source/core/editing/DragCaret.h
index a4a5597eb3f1bf7985d5c85cdd79cbc0403439d0..998cb785f69fe9aaebd6a7c0d4bcecae746ea54b 100644
--- a/third_party/WebKit/Source/core/editing/DragCaret.h
+++ b/third_party/WebKit/Source/core/editing/DragCaret.h
@@ -45,6 +45,14 @@ class DragCaret final : public GarbageCollectedFinalized<DragCaret>,
void paintDragCaret(LocalFrame*, GraphicsContext&, const LayoutPoint&) const;
+ // Returns the layout object responsible for painting the caret.
+ LayoutBlock* caretLayoutBlock() const;
+ // Caret rect in coords local to |caretLayoutBlock|.
+ LayoutRect caretLocalRect() const { return m_caretLocalRect; }
+
+ void setVisualRect(const LayoutRect& r) { m_caretBase->setVisualRect(r); }
+ const DisplayItemClient& getDisplayItemClient() const { return *m_caretBase; }
+
bool hasCaretIn(const LayoutBlock&) const;
bool isContentRichlyEditable() const;
@@ -58,15 +66,11 @@ class DragCaret final : public GarbageCollectedFinalized<DragCaret>,
private:
DragCaret();
- void invalidateCaretRect(Node*, const LayoutRect&);
-
// Implementations of |SynchronousMutationObserver|
void nodeChildrenWillBeRemoved(ContainerNode&) final;
void nodeWillBeRemoved(Node&) final;
PositionWithAffinity m_position;
- // caret rect in coords local to the layoutObject responsible for painting the
- // caret
LayoutRect m_caretLocalRect;
const std::unique_ptr<CaretDisplayItemClient> m_caretBase;
};

Powered by Google App Engine
This is Rietveld 408576698