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

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

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/editing/CaretDisplayItemClient.cpp
diff --git a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp
index 88ef35c3a152c177b5e43fd1244ab872d89cf678..61e9d9065172eddc45487131429174d5c53c9272 100644
--- a/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp
+++ b/third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp
@@ -35,9 +35,7 @@
#include "core/layout/api/LayoutItem.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/paint/PaintInfo.h"
-#include "core/paint/PaintLayer.h"
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/GraphicsLayer.h"
#include "platform/graphics/paint/DrawingRecorder.h"
namespace blink {
@@ -113,28 +111,6 @@ LayoutRect CaretDisplayItemClient::computeCaretRect(
caretLocalRect);
}
-// TODO(yoichio): |node| is FrameSelection::m_previousCaretNode and this is bad
-// design. We should use only previous layoutObject or Rectangle to invalidate
-// old caret.
-void CaretDisplayItemClient::invalidateLocalCaretRect(Node* node,
- const LayoutRect& rect) {
- LayoutBlock* caretLayoutBlock = caretLayoutObject(node);
- if (!caretLayoutBlock)
- return;
-
- // FIXME: Need to over-paint 1 pixel to workaround some rounding problems.
- // https://bugs.webkit.org/show_bug.cgi?id=108283
- LayoutRect inflatedRect = rect;
- inflatedRect.inflate(LayoutUnit(1));
-
- // FIXME: We should not allow paint invalidation out of paint invalidation
- // state. crbug.com/457415
- DisablePaintInvalidationStateAsserts disabler;
-
- m_visualRect =
- node->layoutObject()->invalidatePaintRectangle(inflatedRect, this);
-}
-
void CaretDisplayItemClient::paintCaret(Node* node,
GraphicsContext& context,
const LayoutRect& caretLocalRect,

Powered by Google App Engine
This is Rietveld 408576698