| Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| index b826a3e0771feb27c2a01a0ab53f9e5245428e6c..f68b03126a1528907fc2446ca1824178dc1ec9dc 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| @@ -100,7 +100,9 @@ LayoutBlock::LayoutBlock(ContainerNode* node)
|
| m_descendantsWithFloatsMarkedForLayout(false),
|
| m_hasPositionedObjects(false),
|
| m_hasPercentHeightDescendants(false),
|
| - m_paginationStateChanged(false) {
|
| + m_paginationStateChanged(false),
|
| + m_hasPreviousCaretVisualRects(false),
|
| + m_caretsNeedPaintInvalidation(false) {
|
| // LayoutBlockFlow calls setChildrenInline(true).
|
| // By default, subclasses do not have inline children.
|
| }
|
| @@ -131,6 +133,8 @@ LayoutBlock::~LayoutBlock() {
|
| }
|
|
|
| void LayoutBlock::willBeDestroyed() {
|
| + BlockPaintInvalidator::blockWillBeDestroyed(*this);
|
| +
|
| if (!documentBeingDestroyed() && parent())
|
| parent()->dirtyLinesFromChangedChild(this);
|
|
|
| @@ -207,6 +211,10 @@ void LayoutBlock::styleDidChange(StyleDifference diff,
|
| const ComputedStyle* oldStyle) {
|
| LayoutBox::styleDidChange(diff, oldStyle);
|
|
|
| + // Carets are painted in text color.
|
| + if (diff.textDecorationOrColorChanged() && hasCaret())
|
| + setCaretsNeedPaintInvalidation();
|
| +
|
| const ComputedStyle& newStyle = styleRef();
|
|
|
| if (oldStyle && parent()) {
|
| @@ -1027,6 +1035,11 @@ PaintInvalidationReason LayoutBlock::invalidatePaintIfNeeded(
|
| return BlockPaintInvalidator(*this, context).invalidatePaintIfNeeded();
|
| }
|
|
|
| +void LayoutBlock::clearPreviousVisualRects() {
|
| + LayoutBox::clearPreviousVisualRects();
|
| + BlockPaintInvalidator::clearPreviousCaretVisualRects(*this);
|
| +}
|
| +
|
| void LayoutBlock::removePositionedObjects(
|
| LayoutObject* o,
|
| ContainingBlockState containingBlockState) {
|
|
|