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

Unified Diff: third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp

Issue 2354023002: Fix caret invalidation in slimmingPaintInvalidation path (Closed)
Patch Set: - Created 4 years, 3 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 | « third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..081996977e2bdd332cd20044ae515ce5d5bec1e7
--- /dev/null
+++ b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/paint/BlockPaintInvalidator.h"
+
+#include "core/editing/FrameSelection.h"
+#include "core/frame/LocalFrame.h"
+#include "core/layout/LayoutBlock.h"
+#include "core/paint/BoxPaintInvalidator.h"
+#include "core/paint/PaintInvalidator.h"
+
+namespace blink {
+
+PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded()
+{
+ PaintInvalidationReason reason = BoxPaintInvalidator(m_block, m_context).invalidatePaintIfNeeded();
+
+ if (reason != PaintInvalidationNone && m_block.hasCaret()) {
+ FrameSelection& selection = m_block.frame()->selection();
+ selection.setCaretRectNeedsUpdate();
+ selection.invalidateCaretRect(true);
+ }
+ return reason;
+}
+
+}
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698