| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| index 22c9acdecad7fc9b01f776650e8885a8d5bcc3b9..8ccfd94ac1df8591b0525b2082a01eacd27c33cd 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
|
| @@ -1472,7 +1472,6 @@ StyleDifference LayoutObject::adjustStyleDifference(
|
|
|
| // When transform, opacity, etc. change, paint properties will also change
|
| // so we need to mark this object as needing an update.
|
| - // TODO(pdr): Also update in the non-spv2 codepath?
|
| getMutableForPainting().setNeedsPaintPropertyUpdate();
|
| }
|
| } else {
|
| @@ -2508,7 +2507,7 @@ LayoutObject* LayoutObject::container(const LayoutBoxModelObject* ancestor,
|
| return o;
|
| }
|
|
|
| -LayoutObject* LayoutObject::paintInvalidationParent() const {
|
| +inline LayoutObject* LayoutObject::paintInvalidationParent() const {
|
| if (isLayoutView())
|
| return LayoutAPIShim::layoutObjectFrom(frame()->ownerLayoutItem());
|
| if (isColumnSpanAll())
|
| @@ -2516,6 +2515,10 @@ LayoutObject* LayoutObject::paintInvalidationParent() const {
|
| return parent();
|
| }
|
|
|
| +LayoutObject* LayoutObject::slowPaintInvalidationParentForTesting() const {
|
| + return paintInvalidationParent();
|
| +}
|
| +
|
| bool LayoutObject::isSelectionBorder() const {
|
| SelectionState st = getSelectionState();
|
| return st == SelectionStart || st == SelectionEnd || st == SelectionBoth;
|
| @@ -2724,6 +2727,27 @@ void LayoutObject::willBeRemovedFromTree() {
|
| }
|
| }
|
|
|
| +void LayoutObject::setNeedsPaintPropertyUpdate() {
|
| + m_bitfields.setNeedsPaintPropertyUpdate(true);
|
| +
|
| + // Mark all ancestors as having a descendant needing paint property updates.
|
| + // |paintInvalidationParent()| is used to ensure we continue marking across
|
| + // frame boundaries.
|
| + LayoutObject* ancestor = paintInvalidationParent();
|
| + while (ancestor && !ancestor->descendantNeedsPaintPropertyUpdate()) {
|
| + ancestor->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true);
|
| + ancestor = ancestor->paintInvalidationParent();
|
| + }
|
| +}
|
| +
|
| +void LayoutObject::setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling() {
|
| + LayoutObject* ancestor = paintInvalidationParent();
|
| + while (ancestor) {
|
| + ancestor->setNeedsPaintPropertyUpdate();
|
| + ancestor = ancestor->paintInvalidationParent();
|
| + }
|
| +}
|
| +
|
| void LayoutObject::maybeClearIsScrollAnchorObject() {
|
| if (!m_bitfields.isScrollAnchorObject())
|
| return;
|
|
|