| 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 eff218eb7134268d01e5389b289821cf744d68bf..6173fd65b7ae665e82127a48c82e7fb4e4cf4168 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -114,7 +114,6 @@ FrameView::FrameView(LocalFrame* frame)
|
| : m_frame(frame)
|
| , m_displayMode(WebDisplayModeBrowser)
|
| , m_canHaveScrollbars(true)
|
| - , m_slowRepaintObjectCount(0)
|
| , m_hasPendingLayout(false)
|
| , m_inSynchronousPostLayout(false)
|
| , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
|
| @@ -1204,22 +1203,22 @@ bool FrameView::contentsInCompositedLayer() const
|
| return layoutView && layoutView->compositingState() == PaintsIntoOwnBacking;
|
| }
|
|
|
| -void FrameView::addSlowRepaintObject()
|
| +void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object)
|
| {
|
| - if (!m_slowRepaintObjectCount++) {
|
| - if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
|
| - scrollingCoordinator->frameViewHasSlowRepaintObjectsDidChange(this);
|
| - }
|
| + ASSERT(!m_backgroundAttachmentFixedObjects.contains(object));
|
| +
|
| + m_backgroundAttachmentFixedObjects.add(object);
|
| + if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
|
| + scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidChange(this);
|
| }
|
|
|
| -void FrameView::removeSlowRepaintObject()
|
| +void FrameView::removeBackgroundAttachmentFixedObject(LayoutObject* object)
|
| {
|
| - ASSERT(m_slowRepaintObjectCount > 0);
|
| - m_slowRepaintObjectCount--;
|
| - if (!m_slowRepaintObjectCount) {
|
| - if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
|
| - scrollingCoordinator->frameViewHasSlowRepaintObjectsDidChange(this);
|
| - }
|
| + ASSERT(m_backgroundAttachmentFixedObjects.contains(object));
|
| +
|
| + m_backgroundAttachmentFixedObjects.remove(object);
|
| + if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
|
| + scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidChange(this);
|
| }
|
|
|
| void FrameView::addViewportConstrainedObject(LayoutObject* object)
|
| @@ -1286,6 +1285,12 @@ void FrameView::scrollContentsIfNeededRecursive()
|
| });
|
| }
|
|
|
| +void FrameView::invalidateBackgroundAttachmentFixedObjects()
|
| +{
|
| + for (const auto& layoutObject : m_backgroundAttachmentFixedObjects)
|
| + layoutObject->setShouldDoFullPaintInvalidation();
|
| +}
|
| +
|
| bool FrameView::invalidateViewportConstrainedObjects()
|
| {
|
| for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects) {
|
| @@ -1319,9 +1324,11 @@ bool FrameView::invalidateViewportConstrainedObjects()
|
|
|
| bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta)
|
| {
|
| - if (!contentsInCompositedLayer() || hasSlowRepaintObjects())
|
| + if (!contentsInCompositedLayer())
|
| return false;
|
|
|
| + invalidateBackgroundAttachmentFixedObjects();
|
| +
|
| if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()) {
|
| InspectorInstrumentation::didUpdateLayout(m_frame.get());
|
| return true;
|
|
|