| OLD | NEW |
| 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 } | 1387 } |
| 1388 | 1388 |
| 1389 void FrameView::invalidateBackgroundAttachmentFixedObjects() | 1389 void FrameView::invalidateBackgroundAttachmentFixedObjects() |
| 1390 { | 1390 { |
| 1391 for (const auto& layoutObject : m_backgroundAttachmentFixedObjects) | 1391 for (const auto& layoutObject : m_backgroundAttachmentFixedObjects) |
| 1392 layoutObject->setShouldDoFullPaintInvalidation(); | 1392 layoutObject->setShouldDoFullPaintInvalidation(); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 bool FrameView::invalidateViewportConstrainedObjects() | 1395 bool FrameView::invalidateViewportConstrainedObjects() |
| 1396 { | 1396 { |
| 1397 bool fastPathAllowed = true; |
| 1397 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ | 1398 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ |
| 1398 LayoutObject* layoutObject = viewportConstrainedObject; | 1399 LayoutObject* layoutObject = viewportConstrainedObject; |
| 1399 LayoutItem layoutItem = LayoutItem(layoutObject); | 1400 LayoutItem layoutItem = LayoutItem(layoutObject); |
| 1400 ASSERT(layoutItem.style()->hasViewportConstrainedPosition()); | 1401 ASSERT(layoutItem.style()->hasViewportConstrainedPosition()); |
| 1401 ASSERT(layoutItem.hasLayer()); | 1402 ASSERT(layoutItem.hasLayer()); |
| 1402 PaintLayer* layer = LayoutBoxModel(layoutItem).layer(); | 1403 PaintLayer* layer = LayoutBoxModel(layoutItem).layer(); |
| 1403 | 1404 |
| 1404 if (layer->isPaintInvalidationContainer()) | 1405 if (layer->isPaintInvalidationContainer()) |
| 1405 continue; | 1406 continue; |
| 1406 | 1407 |
| 1407 if (layer->subtreeIsInvisible()) | 1408 if (layer->subtreeIsInvisible()) |
| 1408 continue; | 1409 continue; |
| 1409 | 1410 |
| 1410 // invalidate even if there is an ancestor with a filter that moves pixe
ls. | 1411 // invalidate even if there is an ancestor with a filter that moves pixe
ls. |
| 1411 layoutItem.setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); | 1412 layoutItem.setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); |
| 1412 | 1413 |
| 1413 TRACE_EVENT_INSTANT1( | 1414 TRACE_EVENT_INSTANT1( |
| 1414 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 1415 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
| 1415 "ScrollInvalidationTracking", | 1416 "ScrollInvalidationTracking", |
| 1416 TRACE_EVENT_SCOPE_THREAD, | 1417 TRACE_EVENT_SCOPE_THREAD, |
| 1417 "data", | 1418 "data", |
| 1418 InspectorScrollInvalidationTrackingEvent::data(*layoutObject)); | 1419 InspectorScrollInvalidationTrackingEvent::data(*layoutObject)); |
| 1419 | 1420 |
| 1420 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot | 1421 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot |
| 1421 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. | 1422 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. |
| 1422 if (layer->hasAncestorWithFilterThatMovesPixels()) | 1423 if (layer->hasAncestorWithFilterThatMovesPixels()) |
| 1423 return false; | 1424 fastPathAllowed = false; |
| 1424 } | 1425 } |
| 1425 return true; | 1426 return fastPathAllowed; |
| 1426 } | 1427 } |
| 1427 | 1428 |
| 1428 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) | 1429 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) |
| 1429 { | 1430 { |
| 1430 if (!contentsInCompositedLayer()) | 1431 if (!contentsInCompositedLayer()) |
| 1431 return false; | 1432 return false; |
| 1432 | 1433 |
| 1433 invalidateBackgroundAttachmentFixedObjects(); | 1434 invalidateBackgroundAttachmentFixedObjects(); |
| 1434 | 1435 |
| 1435 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { | 1436 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { |
| (...skipping 2794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4230 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4231 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4231 } | 4232 } |
| 4232 | 4233 |
| 4233 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4234 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4234 { | 4235 { |
| 4235 ASSERT(!layoutViewItem().isNull()); | 4236 ASSERT(!layoutViewItem().isNull()); |
| 4236 return *layoutView(); | 4237 return *layoutView(); |
| 4237 } | 4238 } |
| 4238 | 4239 |
| 4239 } // namespace blink | 4240 } // namespace blink |
| OLD | NEW |