| 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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 scrollContentsIfNeeded(); | 1312 scrollContentsIfNeeded(); |
| 1313 | 1313 |
| 1314 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { | 1314 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) { |
| 1315 if (!child->isLocalFrame()) | 1315 if (!child->isLocalFrame()) |
| 1316 continue; | 1316 continue; |
| 1317 if (FrameView* view = toLocalFrame(child)->view()) | 1317 if (FrameView* view = toLocalFrame(child)->view()) |
| 1318 view->scrollContentsIfNeededRecursive(); | 1318 view->scrollContentsIfNeededRecursive(); |
| 1319 } | 1319 } |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 // FIXME: If we had a flag to force invalidations in a whole subtree, we could g
et rid of this function (crbug.com/410097). | |
| 1323 static void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(c
onst DeprecatedPaintLayer* layer) | |
| 1324 { | |
| 1325 layer->layoutObject()->setShouldDoFullPaintInvalidation(); | |
| 1326 | |
| 1327 for (DeprecatedPaintLayer* child = layer->firstChild(); child; child = child
->nextSibling()) { | |
| 1328 // Don't include paint invalidation rects for composited child layers; t
hey will paint themselves and have a different origin. | |
| 1329 if (child->isPaintInvalidationContainer()) | |
| 1330 continue; | |
| 1331 | |
| 1332 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(child
); | |
| 1333 } | |
| 1334 } | |
| 1335 | |
| 1336 bool FrameView::invalidateViewportConstrainedObjects() | 1322 bool FrameView::invalidateViewportConstrainedObjects() |
| 1337 { | 1323 { |
| 1338 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ | 1324 for (const auto& viewportConstrainedObject : *m_viewportConstrainedObjects)
{ |
| 1339 LayoutObject* layoutObject = viewportConstrainedObject; | 1325 LayoutObject* layoutObject = viewportConstrainedObject; |
| 1340 ASSERT(layoutObject->style()->hasViewportConstrainedPosition()); | 1326 ASSERT(layoutObject->style()->hasViewportConstrainedPosition()); |
| 1341 ASSERT(layoutObject->hasLayer()); | 1327 ASSERT(layoutObject->hasLayer()); |
| 1342 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(layoutObject)->laye
r(); | 1328 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(layoutObject)->laye
r(); |
| 1343 | 1329 |
| 1344 if (layer->isPaintInvalidationContainer()) | 1330 if (layer->isPaintInvalidationContainer()) |
| 1345 continue; | 1331 continue; |
| 1346 | 1332 |
| 1347 if (layer->subtreeIsInvisible()) | 1333 if (layer->subtreeIsInvisible()) |
| 1348 continue; | 1334 continue; |
| 1349 | 1335 |
| 1350 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot | 1336 // If the fixed layer has a blur/drop-shadow filter applied on at least
one of its parents, we cannot |
| 1351 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. | 1337 // scroll using the fast path, otherwise the outsets of the filter will
be moved around the page. |
| 1352 if (layer->hasAncestorWithFilterOutsets()) | 1338 if (layer->hasAncestorWithFilterOutsets()) |
| 1353 return false; | 1339 return false; |
| 1354 | 1340 |
| 1355 TRACE_EVENT_INSTANT1( | 1341 TRACE_EVENT_INSTANT1( |
| 1356 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), | 1342 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), |
| 1357 "ScrollInvalidationTracking", | 1343 "ScrollInvalidationTracking", |
| 1358 TRACE_EVENT_SCOPE_THREAD, | 1344 TRACE_EVENT_SCOPE_THREAD, |
| 1359 "data", | 1345 "data", |
| 1360 InspectorScrollInvalidationTrackingEvent::data(*layoutObject)); | 1346 InspectorScrollInvalidationTrackingEvent::data(*layoutObject)); |
| 1361 | 1347 |
| 1362 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(layer
); | 1348 layoutObject->setShouldDoFullPaintInvalidationIncludingNonCompositingDes
cendants(); |
| 1363 } | 1349 } |
| 1364 return true; | 1350 return true; |
| 1365 } | 1351 } |
| 1366 | 1352 |
| 1367 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) | 1353 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta) |
| 1368 { | 1354 { |
| 1369 if (!contentsInCompositedLayer() || hasSlowRepaintObjects()) | 1355 if (!contentsInCompositedLayer() || hasSlowRepaintObjects()) |
| 1370 return false; | 1356 return false; |
| 1371 | 1357 |
| 1372 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { | 1358 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1385 { | 1371 { |
| 1386 TRACE_EVENT0("blink", "FrameView::scrollContentsSlowPath"); | 1372 TRACE_EVENT0("blink", "FrameView::scrollContentsSlowPath"); |
| 1387 // We need full invalidation during slow scrolling. For slimming paint, full
invalidation | 1373 // We need full invalidation during slow scrolling. For slimming paint, full
invalidation |
| 1388 // of the LayoutView is not enough. We also need to invalidate all of the ob
jects. | 1374 // of the LayoutView is not enough. We also need to invalidate all of the ob
jects. |
| 1389 // FIXME: Find out what are enough to invalidate in slow path scrolling. crb
ug.com/451090#9. | 1375 // FIXME: Find out what are enough to invalidate in slow path scrolling. crb
ug.com/451090#9. |
| 1390 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { | 1376 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
| 1391 ASSERT(layoutView()); | 1377 ASSERT(layoutView()); |
| 1392 if (contentsInCompositedLayer()) | 1378 if (contentsInCompositedLayer()) |
| 1393 layoutView()->layer()->compositedDeprecatedPaintLayerMapping()->setC
ontentsNeedDisplay(); | 1379 layoutView()->layer()->compositedDeprecatedPaintLayerMapping()->setC
ontentsNeedDisplay(); |
| 1394 else | 1380 else |
| 1395 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(l
ayoutView()->layer()); | 1381 layoutView()->setShouldDoFullPaintInvalidationIncludingNonCompositin
gDescendants(); |
| 1396 } | 1382 } |
| 1397 | 1383 |
| 1398 if (contentsInCompositedLayer()) { | 1384 if (contentsInCompositedLayer()) { |
| 1399 IntRect updateRect = visibleContentRect(); | 1385 IntRect updateRect = visibleContentRect(); |
| 1400 ASSERT(layoutView()); | 1386 ASSERT(layoutView()); |
| 1401 // FIXME: We should not allow paint invalidation out of paint invalidati
on state. crbug.com/457415 | 1387 // FIXME: We should not allow paint invalidation out of paint invalidati
on state. crbug.com/457415 |
| 1402 DisablePaintInvalidationStateAsserts disabler; | 1388 DisablePaintInvalidationStateAsserts disabler; |
| 1403 layoutView()->invalidatePaintRectangle(LayoutRect(updateRect)); | 1389 layoutView()->invalidatePaintRectangle(LayoutRect(updateRect)); |
| 1404 } | 1390 } |
| 1405 if (LayoutPart* frameLayoutObject = m_frame->ownerLayoutObject()) { | 1391 if (LayoutPart* frameLayoutObject = m_frame->ownerLayoutObject()) { |
| (...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4020 | 4006 |
| 4021 if (!graphicsLayer) | 4007 if (!graphicsLayer) |
| 4022 return; | 4008 return; |
| 4023 | 4009 |
| 4024 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 4010 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
| 4025 | 4011 |
| 4026 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 4012 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 4027 } | 4013 } |
| 4028 | 4014 |
| 4029 } // namespace blink | 4015 } // namespace blink |
| OLD | NEW |