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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2737043002: Fix caret paint invalidation issue on partial lifecycle updates (Closed)
Patch Set: Created 3 years, 9 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 1909121cd9c424bdd375af26ddd6f3daa3d25a7c..34b49e0629e2be0a4b73c345c3c65ce6b8bec237 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1365,6 +1365,7 @@ void FrameView::invalidateTreeIfNeeded(
void FrameView::invalidatePaintIfNeeded(
const PaintInvalidationState& paintInvalidationState) {
RELEASE_ASSERT(!layoutViewItem().isNull());
+ updateCaretsForPaintInvalidation();
if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState);
}
@@ -3345,9 +3346,6 @@ void FrameView::updateStyleAndLayoutIfNeededRecursiveInternal() {
if (frame().document()->hasFinishedParsing() &&
frame().loader().stateMachine()->committedFirstRealDocumentLoad())
m_isVisuallyNonEmpty = true;
-
- frame().selection().updateStyleAndLayoutIfNeeded();
- frame().page()->dragCaret().updateStyleAndLayoutIfNeeded();
}
void FrameView::invalidateTreeIfNeededRecursive() {
@@ -5256,4 +5254,10 @@ LayoutUnit FrameView::caretWidth() const {
return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
}
+void FrameView::updateCaretsForPaintInvalidation() {
+ m_frame->selection().updateForPaintInvalidation();
+ if (m_frame->isMainFrame())
chrishtr 2017/03/08 01:41:56 This conditional appears to be new. Is that correc
+ m_frame->page()->dragCaret().updateForPaintInvalidation();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698