Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 { | 256 { |
| 257 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); | 257 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); |
| 258 | 258 |
| 259 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues | 259 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues |
| 260 // https://code.google.com/p/chromium/issues/detail?id=343756 | 260 // https://code.google.com/p/chromium/issues/detail?id=343756 |
| 261 DisableCompositingQueryAsserts disabler; | 261 DisableCompositingQueryAsserts disabler; |
| 262 | 262 |
| 263 RenderGeometryMap geometryMap(UseTransforms); | 263 RenderGeometryMap geometryMap(UseTransforms); |
| 264 if (this != rootLayer) | 264 if (this != rootLayer) |
| 265 geometryMap.pushMappingsToAncestor(parent(), 0); | 265 geometryMap.pushMappingsToAncestor(parent(), 0); |
| 266 updateLayerPositions(&geometryMap, flags); | 266 updateLayerPositions(&geometryMap, rootLayer->renderer()->containerForRepain t(), flags); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay erPositionsFlags flags) | 269 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, const Ren derLayerModelObject* paintInvalidationContainer, UpdateLayerPositionsFlags flags ) |
| 270 { | 270 { |
| 271 updateLayerPosition(); // For relpositioned layers or non-positioned layers, | 271 updateLayerPosition(); // For relpositioned layers or non-positioned layers, |
| 272 // we need to keep in sync, since we may have shifted relative | 272 // we need to keep in sync, since we may have shifted relative |
| 273 // to our parent layer. | 273 // to our parent layer. |
| 274 if (geometryMap) | 274 if (geometryMap) |
| 275 geometryMap->pushMappingsToAncestor(this, parent()); | 275 geometryMap->pushMappingsToAncestor(this, parent()); |
| 276 | 276 |
| 277 // Clear our cached clip rect information. | 277 // Clear our cached clip rect information. |
| 278 m_clipper.clearClipRects(); | 278 m_clipper.clearClipRects(); |
| 279 | 279 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 291 | 291 |
| 292 updateDescendantDependentFlags(); | 292 updateDescendantDependentFlags(); |
| 293 | 293 |
| 294 if (flags & UpdatePagination) | 294 if (flags & UpdatePagination) |
| 295 updatePagination(); | 295 updatePagination(); |
| 296 else { | 296 else { |
| 297 m_isPaginated = false; | 297 m_isPaginated = false; |
| 298 m_enclosingPaginationLayer = 0; | 298 m_enclosingPaginationLayer = 0; |
| 299 } | 299 } |
| 300 | 300 |
| 301 const RenderLayerModelObject* newPaintInvalidationContainer = paintInvalidat ionContainer; | |
| 302 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | |
| 303 bool establishesNewPaintInvalidationContainer = isRepaintContainer(); | |
| 304 newPaintInvalidationContainer = renderer()->adjustCompositedContainerFor SpecialAncestors(establishesNewPaintInvalidationContainer ? renderer() : paintIn validationContainer); | |
| 305 | |
| 306 if (geometryMap) { | |
| 307 LayoutPoint offset = renderer()->isBox() ? toRenderBox(renderer())-> location() : LayoutPoint(); | |
| 308 if (renderer()->previousPositionFromPaintInvalidationContainer() != geometryMap->mapToContainer(offset, newPaintInvalidationContainer)) | |
| 309 renderer()->setMayNeedPaintInvalidation(true); | |
|
leviw_travelin_and_unemployed
2014/06/02 20:47:21
I still don't love this We're only okay because we
dsinclair
2014/06/02 20:58:07
Done. Is this better?
| |
| 310 } | |
| 311 } | |
| 312 | |
| 301 repainter().repaintAfterLayout(flags & CheckForRepaint); | 313 repainter().repaintAfterLayout(flags & CheckForRepaint); |
| 302 | 314 |
| 303 // Go ahead and update the reflection's position and size. | 315 // Go ahead and update the reflection's position and size. |
| 304 if (m_reflectionInfo) | 316 if (m_reflectionInfo) |
| 305 m_reflectionInfo->reflection()->layout(); | 317 m_reflectionInfo->reflection()->layout(); |
| 306 | 318 |
| 307 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { | 319 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { |
| 308 updatePagination(); | 320 updatePagination(); |
| 309 flags |= UpdatePagination; | 321 flags |= UpdatePagination; |
| 310 } | 322 } |
| 311 | 323 |
| 312 if (renderer()->hasColumns()) | 324 if (renderer()->hasColumns()) |
| 313 flags |= UpdatePagination; | 325 flags |= UpdatePagination; |
| 314 | 326 |
| 315 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 327 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
| 316 child->updateLayerPositions(geometryMap, flags); | 328 child->updateLayerPositions(geometryMap, newPaintInvalidationContainer, flags); |
| 317 | 329 |
| 318 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) | 330 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) |
| 319 compositedLayerMapping()->setContentsNeedDisplay(); | 331 compositedLayerMapping()->setContentsNeedDisplay(); |
| 320 | 332 |
| 321 if (geometryMap) | 333 if (geometryMap) |
| 322 geometryMap->popMappingsToAncestor(parent()); | 334 geometryMap->popMappingsToAncestor(parent()); |
| 323 } | 335 } |
| 324 | 336 |
| 325 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() | 337 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() |
| 326 { | 338 { |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1476 m_parent->addChild(current, nextSib); | 1488 m_parent->addChild(current, nextSib); |
| 1477 | 1489 |
| 1478 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1490 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 1479 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e); | 1491 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e); |
| 1480 else | 1492 else |
| 1481 current->repainter().setRepaintStatus(NeedsFullRepaint); | 1493 current->repainter().setRepaintStatus(NeedsFullRepaint); |
| 1482 | 1494 |
| 1483 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html | 1495 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html |
| 1484 DisableCompositingQueryAsserts disabler; | 1496 DisableCompositingQueryAsserts disabler; |
| 1485 | 1497 |
| 1486 current->updateLayerPositions(0); // FIXME: use geometry map. | 1498 current->updateLayerPositions(0, 0); // FIXME: use geometry map. |
| 1487 current = next; | 1499 current = next; |
| 1488 } | 1500 } |
| 1489 | 1501 |
| 1490 // Remove us from the parent. | 1502 // Remove us from the parent. |
| 1491 m_parent->removeChild(this); | 1503 m_parent->removeChild(this); |
| 1492 m_renderer->destroyLayer(); | 1504 m_renderer->destroyLayer(); |
| 1493 } | 1505 } |
| 1494 | 1506 |
| 1495 void RenderLayer::insertOnlyThisLayer() | 1507 void RenderLayer::insertOnlyThisLayer() |
| 1496 { | 1508 { |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3927 } | 3939 } |
| 3928 } | 3940 } |
| 3929 | 3941 |
| 3930 void showLayerTree(const WebCore::RenderObject* renderer) | 3942 void showLayerTree(const WebCore::RenderObject* renderer) |
| 3931 { | 3943 { |
| 3932 if (!renderer) | 3944 if (!renderer) |
| 3933 return; | 3945 return; |
| 3934 showLayerTree(renderer->enclosingLayer()); | 3946 showLayerTree(renderer->enclosingLayer()); |
| 3935 } | 3947 } |
| 3936 #endif | 3948 #endif |
| OLD | NEW |