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

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

Issue 2736213002: Fix caret paint invalidation issues (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
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 576381e0f7a23dae49da8521e18c93c24bd8a043..59bf27c32d81d944997dc859af6f4f8b577ec689 100644
--- a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
+++ b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
@@ -104,19 +104,16 @@ class CaretDisplayItemClient final : public DisplayItemClient {
LayoutRect m_localRect;
LayoutBlock* m_layoutBlock = nullptr;
- // This is set to the previous value of m_layoutBlock during
- // updateStyleAndLayoutIfNeeded() and can be used in invalidatePaintIfNeeded()
- // only.
- const LayoutBlock* m_previousLayoutBlock = nullptr;
-
// Visual rect of the caret in m_layoutBlock. This is updated by
// invalidatePaintIfNeeded().
LayoutRect m_visualRect;
- // This is set to the previous value of m_visualRect during
- // updateStyleAndLayoutIfNeeded() and can be used in invalidatePaintIfNeeded()
- // only.
- LayoutRect m_previousVisualRect;
+ // These are set to the previous value of m_layoutBlock and m_visualRect
+ // during updateStyleAndLayoutIfNeeded() if they haven't been set since the
+ // last paint invalidation. They can only be used in invalidatePaintIfNeeded()
+ // to invalidate the caret in the previous layout block.
+ const LayoutBlock* m_previousLayoutBlock = nullptr;
+ LayoutRect m_visualRectInPreviousLayoutBlock;
bool m_needsPaintInvalidation = false;
};

Powered by Google App Engine
This is Rietveld 408576698