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

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

Issue 2754993002: Fix caret invalidation when a block is removed (Closed)
Patch Set: Created 3 years, 9 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/CaretDisplayItemClient.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/CaretDisplayItemClient.h
diff --git a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
index 742a3c453cdbd002185f2a691a8d152fd35eb026..0dffbda55fe285fd072b35c2138d6ab234f4debc 100644
--- a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
+++ b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
@@ -56,18 +56,11 @@ class CaretDisplayItemClient final : public DisplayItemClient {
static LayoutRect computeCaretRect(const PositionWithAffinity& caretPosition);
static LayoutBlock* caretLayoutBlock(const Node*);
- // Called indirectly from LayoutObject::clearPreviousVisualRects().
- void clearPreviousVisualRect(const LayoutBlock& block) {
- if (shouldPaintCaret(block))
- m_visualRect = LayoutRect();
- }
+ // Called indirectly from LayoutBlock::clearPreviousVisualRects().
+ void clearPreviousVisualRect(const LayoutBlock&);
- void layoutBlockWillBeDestroyed(const LayoutBlock& block) {
- if (!shouldPaintCaret(block))
- return;
- m_visualRect = LayoutRect();
- m_layoutBlock = nullptr;
- }
+ // Called indirectly from LayoutBlock::willBeDestroyed().
+ void layoutBlockWillBeDestroyed(const LayoutBlock&);
// Called when a FrameView finishes layout. Updates style and geometry of the
// caret for paint invalidation and painting.
@@ -89,8 +82,9 @@ class CaretDisplayItemClient final : public DisplayItemClient {
String debugName() const final;
private:
- void invalidatePaintInCurrentLayoutBlock(const PaintInvalidatorContext&);
+ friend class CaretDisplayItemClientTest;
+ void invalidatePaintInCurrentLayoutBlock(const PaintInvalidatorContext&);
void invalidatePaintInPreviousLayoutBlock(const PaintInvalidatorContext&);
// These are updated by updateStyleAndLayoutIfNeeded().
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698