Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(898)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2345403003: Add background attachment fixed main thread scrolling reason [spv2] (Closed)
Patch Set: Minor cleanup Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 return !layoutViewItem.isNull() && layoutViewItem.compositingState() == Pain tsIntoOwnBacking; 1339 return !layoutViewItem.isNull() && layoutViewItem.compositingState() == Pain tsIntoOwnBacking;
1340 } 1340 }
1341 1341
1342 void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object) 1342 void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object)
1343 { 1343 {
1344 ASSERT(!m_backgroundAttachmentFixedObjects.contains(object)); 1344 ASSERT(!m_backgroundAttachmentFixedObjects.contains(object));
1345 1345
1346 m_backgroundAttachmentFixedObjects.add(object); 1346 m_backgroundAttachmentFixedObjects.add(object);
1347 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( )) 1347 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( ))
1348 scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidCha nge(this); 1348 scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidCha nge(this);
1349
1350 // TODO(pdr): When slimming paint v2 is enabled, invalidate the scroll paint
1351 // property subtree for this so main thread scroll reasons are recomputed.
1349 } 1352 }
1350 1353
1351 void FrameView::removeBackgroundAttachmentFixedObject(LayoutObject* object) 1354 void FrameView::removeBackgroundAttachmentFixedObject(LayoutObject* object)
1352 { 1355 {
1353 ASSERT(m_backgroundAttachmentFixedObjects.contains(object)); 1356 ASSERT(m_backgroundAttachmentFixedObjects.contains(object));
1354 1357
1355 m_backgroundAttachmentFixedObjects.remove(object); 1358 m_backgroundAttachmentFixedObjects.remove(object);
1356 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( )) 1359 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( ))
1357 scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidCha nge(this); 1360 scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidCha nge(this);
1361
1362 // TODO(pdr): When slimming paint v2 is enabled, invalidate the scroll paint
1363 // property subtree for this so main thread scroll reasons are recomputed.
1358 } 1364 }
1359 1365
1360 void FrameView::addViewportConstrainedObject(LayoutObject* object) 1366 void FrameView::addViewportConstrainedObject(LayoutObject* object)
1361 { 1367 {
1362 if (!m_viewportConstrainedObjects) 1368 if (!m_viewportConstrainedObjects)
1363 m_viewportConstrainedObjects = wrapUnique(new ViewportConstrainedObjectS et); 1369 m_viewportConstrainedObjects = wrapUnique(new ViewportConstrainedObjectS et);
1364 1370
1365 if (!m_viewportConstrainedObjects->contains(object)) { 1371 if (!m_viewportConstrainedObjects->contains(object)) {
1366 m_viewportConstrainedObjects->add(object); 1372 m_viewportConstrainedObjects->add(object);
1367 1373
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
4357 } 4363 }
4358 4364
4359 bool FrameView::canThrottleRendering() const 4365 bool FrameView::canThrottleRendering() const
4360 { 4366 {
4361 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4367 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4362 return false; 4368 return false;
4363 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4369 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4364 } 4370 }
4365 4371
4366 } // namespace blink 4372 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698