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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 335743002: updateLayerPositionsAfterLayout shouldn't have a RenderGeometryMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 m_subpixelAccumulation = size; 251 m_subpixelAccumulation = size;
252 } 252 }
253 253
254 void RenderLayer::updateLayerPositionsAfterLayout(const RenderLayer* rootLayer, UpdateLayerPositionsFlags flags) 254 void RenderLayer::updateLayerPositionsAfterLayout(const RenderLayer* rootLayer, UpdateLayerPositionsFlags flags)
255 { 255 {
256 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t"); 256 TRACE_EVENT0("blink_rendering", "RenderLayer::updateLayerPositionsAfterLayou t");
257 257
258 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues 258 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues
259 // https://code.google.com/p/chromium/issues/detail?id=343756 259 // https://code.google.com/p/chromium/issues/detail?id=343756
260 DisableCompositingQueryAsserts disabler; 260 DisableCompositingQueryAsserts disabler;
261 261 updateLayerPositionRecursive(flags);
262 RenderGeometryMap geometryMap(UseTransforms);
263 if (this != rootLayer)
264 geometryMap.pushMappingsToAncestor(parent(), 0);
265 updateLayerPositionRecursive(&geometryMap, flags);
266 } 262 }
267 263
268 void RenderLayer::updateLayerPositionRecursive(RenderGeometryMap* geometryMap, U pdateLayerPositionsFlags flags) 264 void RenderLayer::updateLayerPositionRecursive(UpdateLayerPositionsFlags flags)
269 { 265 {
270 updateLayerPosition(); 266 updateLayerPosition();
271 267
272 if (geometryMap)
273 geometryMap->pushMappingsToAncestor(this, parent());
274
275 // Clear our cached clip rect information. 268 // Clear our cached clip rect information.
276 m_clipper.clearClipRects(); 269 m_clipper.clearClipRects();
277 270
278 if (hasOverflowControls()) { 271 if (hasOverflowControls()) {
279 LayoutPoint offsetFromRoot; 272 // FIXME: We should figure out the right time to position the overflow c ontrols.
280 if (geometryMap) 273 // This call appears to be necessary to pass some layout test that use E ventSender,
281 offsetFromRoot = LayoutPoint(geometryMap->absolutePoint(FloatPoint() )); 274 // presumably because the normal time to position the controls is during paint. We
282 else { 275 // probably shouldn't position the overflow controls during paint either ...
283 // FIXME: It looks suspicious to call convertToLayerCoords here 276 scrollableArea()->positionOverflowControls(IntSize());
284 // as canUseConvertToLayerCoords may be true for an ancestor layer.
285 convertToLayerCoords(root(), offsetFromRoot);
286 }
287 scrollableArea()->positionOverflowControls(toIntSize(roundedIntPoint(off setFromRoot)));
288 } 277 }
289 278
290 updateDescendantDependentFlags(); 279 updateDescendantDependentFlags();
291 280
292 if (flags & UpdatePagination) 281 if (flags & UpdatePagination)
293 updatePagination(); 282 updatePagination();
294 else { 283 else {
295 m_isPaginated = false; 284 m_isPaginated = false;
296 m_enclosingPaginationLayer = 0; 285 m_enclosingPaginationLayer = 0;
297 } 286 }
298 287
299 repainter().repaintAfterLayout(flags & CheckForRepaint); 288 repainter().repaintAfterLayout(flags & CheckForRepaint);
300 289
301 // Go ahead and update the reflection's position and size. 290 // Go ahead and update the reflection's position and size.
302 if (m_reflectionInfo) 291 if (m_reflectionInfo)
303 m_reflectionInfo->reflection()->layout(); 292 m_reflectionInfo->reflection()->layout();
304 293
305 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) { 294 if (useRegionBasedColumns() && renderer()->isRenderFlowThread()) {
306 updatePagination(); 295 updatePagination();
307 flags |= UpdatePagination; 296 flags |= UpdatePagination;
308 } 297 }
309 298
310 if (renderer()->hasColumns()) 299 if (renderer()->hasColumns())
311 flags |= UpdatePagination; 300 flags |= UpdatePagination;
312 301
313 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 302 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
314 child->updateLayerPositionRecursive(geometryMap, flags); 303 child->updateLayerPositionRecursive(flags);
315 304
316 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor()) 305 if ((flags & NeedsFullRepaintInBacking) && hasCompositedLayerMapping() && !c ompositedLayerMapping()->paintsIntoCompositedAncestor())
317 compositedLayerMapping()->setContentsNeedDisplay(); 306 compositedLayerMapping()->setContentsNeedDisplay();
318
319 if (geometryMap)
320 geometryMap->popMappingsToAncestor(parent());
321 } 307 }
322 308
323 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant() 309 void RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant()
324 { 310 {
325 for (RenderLayer* layer = this; layer; layer = layer->parent()) { 311 for (RenderLayer* layer = this; layer; layer = layer->parent()) {
326 if (!layer->m_hasSelfPaintingLayerDescendantDirty && layer->hasSelfPaint ingLayerDescendant()) 312 if (!layer->m_hasSelfPaintingLayerDescendantDirty && layer->hasSelfPaint ingLayerDescendant())
327 break; 313 break;
328 314
329 layer->m_hasSelfPaintingLayerDescendantDirty = false; 315 layer->m_hasSelfPaintingLayerDescendantDirty = false;
330 layer->m_hasSelfPaintingLayerDescendant = true; 316 layer->m_hasSelfPaintingLayerDescendant = true;
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 m_parent->addChild(current, nextSib); 1427 m_parent->addChild(current, nextSib);
1442 1428
1443 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 1429 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1444 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e); 1430 current->renderer()->setShouldDoFullPaintInvalidationAfterLayout(tru e);
1445 else 1431 else
1446 current->repainter().setRepaintStatus(NeedsFullRepaint); 1432 current->repainter().setRepaintStatus(NeedsFullRepaint);
1447 1433
1448 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html 1434 // Hits in compositing/overflow/automatically-opt-into-composited-scroll ing-part-1.html
1449 DisableCompositingQueryAsserts disabler; 1435 DisableCompositingQueryAsserts disabler;
1450 1436
1451 current->updateLayerPositionRecursive(0); 1437 current->updateLayerPositionRecursive();
1452 current = next; 1438 current = next;
1453 } 1439 }
1454 1440
1455 // Remove us from the parent. 1441 // Remove us from the parent.
1456 m_parent->removeChild(this); 1442 m_parent->removeChild(this);
1457 m_renderer->destroyLayer(); 1443 m_renderer->destroyLayer();
1458 } 1444 }
1459 1445
1460 void RenderLayer::insertOnlyThisLayer() 1446 void RenderLayer::insertOnlyThisLayer()
1461 { 1447 {
(...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 } 3831 }
3846 } 3832 }
3847 3833
3848 void showLayerTree(const WebCore::RenderObject* renderer) 3834 void showLayerTree(const WebCore::RenderObject* renderer)
3849 { 3835 {
3850 if (!renderer) 3836 if (!renderer)
3851 return; 3837 return;
3852 showLayerTree(renderer->enclosingLayer()); 3838 showLayerTree(renderer->enclosingLayer());
3853 } 3839 }
3854 #endif 3840 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698