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

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

Issue 2599613002: [SPInvalidation] Fix caret paint invalidation in sub frames (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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/editing/FrameCaret.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameCaret.cpp b/third_party/WebKit/Source/core/editing/FrameCaret.cpp
index 1a65d873c38e59ed34523d1164bfaf41cb6c35cd..7efa3856c33c9a9d7ea1fcba430a669f98ed3c3f 100644
--- a/third_party/WebKit/Source/core/editing/FrameCaret.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameCaret.cpp
@@ -29,11 +29,12 @@
#include "core/editing/Editor.h"
#include "core/editing/SelectionEditor.h"
#include "core/editing/commands/CompositeEditCommand.h"
+#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/html/TextControlElement.h"
#include "core/layout/LayoutTheme.h"
-#include "core/layout/api/LayoutViewItem.h"
+#include "core/layout/api/LayoutPartItem.h"
#include "core/page/Page.h"
#include "core/paint/PaintLayer.h"
#include "public/platform/WebTraceLocation.h"
@@ -142,6 +143,13 @@ void FrameCaret::setCaretRectNeedsUpdate() {
if (Page* page = m_frame->page())
page->animator().scheduleVisualUpdate(m_frame->localFrameRoot());
+
+ // Ensure the frame will be checked for paint invalidation during
pdr. 2016/12/22 01:08:18 Without spinvalidation, how are carets marked as n
Xianzhu 2016/12/22 01:31:52 Without spinvalidation, we always walk all of the
+ // PrePaintTreeWalk.
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ if (auto layoutItem = m_frame->ownerLayoutItem())
pdr. 2016/12/22 01:08:18 I think with LayoutItem you need to check !layoutI
Xianzhu 2016/12/22 01:31:52 The above is equivalent to "if (auto* layoutObject
+ layoutItem.setMayNeedPaintInvalidation();
+ }
}
bool FrameCaret::caretPositionIsValidForDocument(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698