Chromium Code Reviews| 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 |