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