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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 { | 263 { |
| 264 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); | 264 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); |
| 265 | 265 |
| 266 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues | 266 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues |
| 267 // https://code.google.com/p/chromium/issues/detail?id=343756 | 267 // https://code.google.com/p/chromium/issues/detail?id=343756 |
| 268 DisableCompositingQueryAsserts disabler; | 268 DisableCompositingQueryAsserts disabler; |
| 269 | 269 |
| 270 RenderGeometryMap geometryMap(UseTransforms); | 270 RenderGeometryMap geometryMap(UseTransforms); |
| 271 if (this != rootLayer) | 271 if (this != rootLayer) |
| 272 geometryMap.pushMappingsToAncestor(parent(), 0); | 272 geometryMap.pushMappingsToAncestor(parent(), 0); |
| 273 updateLayerPositions(&geometryMap, flags); | 273 updateLayerPositions(&geometryMap, *rootLayer->renderer()->containerForRepai nt(), flags); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay erPositionsFlags flags) | 276 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, const Ren derLayerModelObject& repaintContainer, UpdateLayerPositionsFlags flags) |
| 277 { | 277 { |
| 278 updateLayerPosition(); // For relpositioned layers or non-positioned layers, | 278 updateLayerPosition(); // For relpositioned layers or non-positioned layers, |
| 279 // we need to keep in sync, since we may have shifted relative | 279 // we need to keep in sync, since we may have shifted relative |
| 280 // to our parent layer. | 280 // to our parent layer. |
| 281 if (geometryMap) | 281 if (geometryMap) |
| 282 geometryMap->pushMappingsToAncestor(this, parent()); | 282 geometryMap->pushMappingsToAncestor(this, parent()); |
| 283 | 283 |
| 284 // Clear our cached clip rect information. | 284 // Clear our cached clip rect information. |
| 285 m_clipper.clearClipRects(); | 285 m_clipper.clearClipRects(); |
| 286 | 286 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 298 | 298 |
| 299 updateDescendantDependentFlags(); | 299 updateDescendantDependentFlags(); |
| 300 | 300 |
| 301 if (flags & UpdatePagination) | 301 if (flags & UpdatePagination) |
| 302 updatePagination(); | 302 updatePagination(); |
| 303 else { | 303 else { |
| 304 m_isPaginated = false; | 304 m_isPaginated = false; |
| 305 m_enclosingPaginationLayer = 0; | 305 m_enclosingPaginationLayer = 0; |
| 306 } | 306 } |
| 307 | 307 |
| 308 const RenderLayerModelObject* newRepaintContainer = &repaintContainer; | |
| 309 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | |
| 310 bool establishesNewRepaintContainer = isRepaintContainer(); | |
| 311 newRepaintContainer = renderer()->adjustCompositedContainerForSpecialAnc estors(establishesNewRepaintContainer ? renderer() : &repaintContainer); | |
| 312 if (renderer()->previousPositionFromRepaintContainer() != renderer()->po sitionFromRepaintContainer(newRepaintContainer)) | |
|
leviw_travelin_and_unemployed
2014/05/28 20:51:55
This is unfortunate duplicate work. positionFromRe
leviw_travelin_and_unemployed
2014/05/28 21:02:00
Dan pointed out at RenderGeometryMap uses a FloatP
dsinclair
2014/06/02 18:14:34
Done.
| |
| 313 renderer()->setMayNeedInvalidation(true); | |
| 314 } | |
| 315 | |
| 308 repainter().repaintAfterLayout(flags & CheckForRepaint); | 316 repainter().repaintAfterLayout(flags & CheckForRepaint); |
| 309 | 317 |
| 310 // Go ahead and update the reflection's position and size. | 318 // Go ahead and update the reflection's position and size. |
| 311 if (m_reflectionInfo) | 319 if (m_reflectionInfo) |
| 312 m_reflectionInfo->reflection()->layout(); | 320 m_reflectionInfo->reflection()->layout(); |
| 313 | 321 |
| 314 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { | 322 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { |
| 315 updatePagination(); | 323 updatePagination(); |
| 316 flags |= UpdatePagination; | 324 flags |= UpdatePagination; |
| 317 } | 325 } |
| 318 | 326 |
| 319 if (renderer()->hasColumns()) | 327 if (renderer()->hasColumns()) |
| 320 flags |= UpdatePagination; | 328 flags |= UpdatePagination; |
| 321 | 329 |
| 322 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | 330 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
| 323 child->updateLayerPositions(geometryMap, flags); | 331 child->updateLayerPositions(geometryMap, *newRepaintContainer, flags); |
| 324 | 332 |
| 325 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) | 333 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) |
| 326 compositedLayerMapping()->setContentsNeedDisplay(); | 334 compositedLayerMapping()->setContentsNeedDisplay(); |
| 327 | 335 |
| 328 if (geometryMap) | 336 if (geometryMap) |
| 329 geometryMap->popMappingsToAncestor(parent()); | 337 geometryMap->popMappingsToAncestor(parent()); |
| 330 } | 338 } |
| 331 | 339 |
| 332 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() | 340 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() |
| 333 { | 341 { |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1522 m_parent->addChild(current, nextSib); | 1530 m_parent->addChild(current, nextSib); |
| 1523 | 1531 |
| 1524 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 1532 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 1525 current->renderer()->setShouldDoFullRepaintAfterLayout(true); | 1533 current->renderer()->setShouldDoFullRepaintAfterLayout(true); |
| 1526 else | 1534 else |
| 1527 current->repainter().setRepaintStatus(NeedsFullRepaint); | 1535 current->repainter().setRepaintStatus(NeedsFullRepaint); |
| 1528 | 1536 |
| 1529 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html | 1537 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html |
| 1530 DisableCompositingQueryAsserts disabler; | 1538 DisableCompositingQueryAsserts disabler; |
| 1531 | 1539 |
| 1532 current->updateLayerPositions(0); // FIXME: use geometry map. | 1540 current->updateLayerPositions(0, *renderer()->containerForRepaint()); // FIXME: use geometry map. |
| 1533 current = next; | 1541 current = next; |
| 1534 } | 1542 } |
| 1535 | 1543 |
| 1536 // Remove us from the parent. | 1544 // Remove us from the parent. |
| 1537 m_parent->removeChild(this); | 1545 m_parent->removeChild(this); |
| 1538 m_renderer->destroyLayer(); | 1546 m_renderer->destroyLayer(); |
| 1539 } | 1547 } |
| 1540 | 1548 |
| 1541 void RenderLayer::insertOnlyThisLayer() | 1549 void RenderLayer::insertOnlyThisLayer() |
| 1542 { | 1550 { |
| (...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4021 } | 4029 } |
| 4022 } | 4030 } |
| 4023 | 4031 |
| 4024 void showLayerTree(const WebCore::RenderObject* renderer) | 4032 void showLayerTree(const WebCore::RenderObject* renderer) |
| 4025 { | 4033 { |
| 4026 if (!renderer) | 4034 if (!renderer) |
| 4027 return; | 4035 return; |
| 4028 showLayerTree(renderer->enclosingLayer()); | 4036 showLayerTree(renderer->enclosingLayer()); |
| 4029 } | 4037 } |
| 4030 #endif | 4038 #endif |
| OLD | NEW |