| Index: third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..081996977e2bdd332cd20044ae515ce5d5bec1e7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/paint/BlockPaintInvalidator.h"
|
| +
|
| +#include "core/editing/FrameSelection.h"
|
| +#include "core/frame/LocalFrame.h"
|
| +#include "core/layout/LayoutBlock.h"
|
| +#include "core/paint/BoxPaintInvalidator.h"
|
| +#include "core/paint/PaintInvalidator.h"
|
| +
|
| +namespace blink {
|
| +
|
| +PaintInvalidationReason BlockPaintInvalidator::invalidatePaintIfNeeded()
|
| +{
|
| + PaintInvalidationReason reason = BoxPaintInvalidator(m_block, m_context).invalidatePaintIfNeeded();
|
| +
|
| + if (reason != PaintInvalidationNone && m_block.hasCaret()) {
|
| + FrameSelection& selection = m_block.frame()->selection();
|
| + selection.setCaretRectNeedsUpdate();
|
| + selection.invalidateCaretRect(true);
|
| + }
|
| + return reason;
|
| +}
|
| +
|
| +}
|
|
|