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

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

Issue 2698313003: Fix caret paint invalidation when moving between blocks (Closed)
Patch Set: - Created 3 years, 10 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 2c740f516e5d0ab355188a9d6a217f3575a613fc..576381e0f7a23dae49da8521e18c93c24bd8a043 100644
--- a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
+++ b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h
@@ -91,19 +91,33 @@ class CaretDisplayItemClient final : public DisplayItemClient {
String debugName() const final;
private:
+ void invalidatePaintInCurrentLayoutBlock(
+ const PaintInvalidatorContext&,
+ PaintInvalidationReason layoutBlockPaintInvalidationReason);
+
+ void invalidatePaintInPreviousLayoutBlock(
+ const PaintInvalidatorContext&,
+ PaintInvalidationReason layoutBlockPaintInvalidationReason);
+
// These are updated by updateStyleAndLayoutIfNeeded().
Color m_color;
LayoutRect m_localRect;
LayoutBlock* m_layoutBlock = nullptr;
- // This is set to the previous m_layoutBlock if m_layoutLayout will change
- // during updateStyleAndLayoutIfNeeded() and can be used in
- // invalidatePaintIfNeeded() only.
+ // This is set to the previous value of m_layoutBlock during
+ // updateStyleAndLayoutIfNeeded() and can be used in invalidatePaintIfNeeded()
+ // only.
const LayoutBlock* m_previousLayoutBlock = nullptr;
- // This is updated by invalidatePaintIfNeeded().
+ // 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;
+
bool m_needsPaintInvalidation = false;
};

Powered by Google App Engine
This is Rietveld 408576698