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

Unified Diff: third_party/WebKit/Source/core/paint/BlockPaintInvalidator.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/paint/BlockPaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h
index ff759f8b04eb10c9e199abdc3a8f3af52bbd64de..781fa28bb6199366a3a3e8d7cef59811b90795d5 100644
--- a/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h
@@ -12,6 +12,9 @@ namespace blink {
struct PaintInvalidatorContext;
class LayoutBlock;
+class LayoutRect;
+class LocalFrame;
+class DisplayItemClient;
class BlockPaintInvalidator {
STACK_ALLOCATED();
@@ -21,9 +24,25 @@ class BlockPaintInvalidator {
const PaintInvalidatorContext& context)
: m_block(block), m_context(context) {}
+ static void blockWillBeDestroyed(const LayoutBlock&);
+
+ // Called before paint invalidation tree walk to ensure that the blocks whose
+ // caret status changed will be reached during the tree walk.
+ static void setMayNeedPaintInvalidationForCaretsIfNeeded(
+ const LocalFrame& localFrameRoot);
+
PaintInvalidationReason invalidatePaintIfNeeded();
+ static void clearPreviousCaretVisualRects(const LayoutBlock&);
+
private:
+ // Returns new visual rect.
+ LayoutRect invalidateCaretIfNeeded(PaintInvalidationReason,
+ const LayoutRect& oldVisualRect,
+ const LayoutRect& newLocalRect,
+ const DisplayItemClient&);
+ void invalidateCaretsIfNeeded(PaintInvalidationReason);
+
const LayoutBlock& m_block;
const PaintInvalidatorContext& m_context;
};

Powered by Google App Engine
This is Rietveld 408576698