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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
389 | 389 |
390 if (paintBehavior & PaintBehaviorFlattenCompositingLayers) { | 390 if (paintBehavior & PaintBehaviorFlattenCompositingLayers) { |
391 TransformationMatrix matrix = *m_transform; | 391 TransformationMatrix matrix = *m_transform; |
392 makeMatrixRenderable(matrix, false /* flatten 3d */); | 392 makeMatrixRenderable(matrix, false /* flatten 3d */); |
393 return matrix; | 393 return matrix; |
394 } | 394 } |
395 | 395 |
396 return *m_transform; | 396 return *m_transform; |
397 } | 397 } |
398 | 398 |
399 RenderLayer* RenderLayer::enclosingOverflowClipLayer(IncludeSelfOrNot includeSel f) const | |
400 { | |
401 const RenderLayer* layer = (includeSelf == IncludeSelf) ? this : parent(); | |
402 while (layer) { | |
403 if (layer->renderer()->hasOverflowClip()) | |
404 return const_cast<RenderLayer*>(layer); | |
405 | |
406 layer = layer->parent(); | |
407 } | |
408 return 0; | |
409 } | |
410 | |
411 static bool checkContainingBlockChainForPagination(RenderLayerModelObject* rende rer, RenderBox* ancestorColumnsRenderer) | 399 static bool checkContainingBlockChainForPagination(RenderLayerModelObject* rende rer, RenderBox* ancestorColumnsRenderer) |
412 { | 400 { |
413 RenderView* view = renderer->view(); | 401 RenderView* view = renderer->view(); |
414 RenderLayerModelObject* prevBlock = renderer; | 402 RenderLayerModelObject* prevBlock = renderer; |
415 RenderBlock* containingBlock; | 403 RenderBlock* containingBlock; |
416 for (containingBlock = renderer->containingBlock(); | 404 for (containingBlock = renderer->containingBlock(); |
417 containingBlock && containingBlock != view && containingBlock != ancest orColumnsRenderer; | 405 containingBlock && containingBlock != view && containingBlock != ancest orColumnsRenderer; |
418 containingBlock = containingBlock->containingBlock()) | 406 containingBlock = containingBlock->containingBlock()) |
419 prevBlock = containingBlock; | 407 prevBlock = containingBlock; |
420 | 408 |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1446 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP oint& location) const | 1434 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutP oint& location) const |
1447 { | 1435 { |
1448 if (ancestorLayer == this) | 1436 if (ancestorLayer == this) |
1449 return; | 1437 return; |
1450 | 1438 |
1451 const RenderLayer* currLayer = this; | 1439 const RenderLayer* currLayer = this; |
1452 while (currLayer && currLayer != ancestorLayer) | 1440 while (currLayer && currLayer != ancestorLayer) |
1453 currLayer = accumulateOffsetTowardsAncestor(currLayer, ancestorLayer, lo cation); | 1441 currLayer = accumulateOffsetTowardsAncestor(currLayer, ancestorLayer, lo cation); |
1454 } | 1442 } |
1455 | 1443 |
1456 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR ect& rect) const | |
1457 { | |
1458 LayoutPoint delta; | |
1459 convertToLayerCoords(ancestorLayer, delta); | |
1460 rect.move(-delta.x(), -delta.y()); | |
1461 } | |
1462 | |
1463 void RenderLayer::didUpdateNeedsCompositedScrolling() | 1444 void RenderLayer::didUpdateNeedsCompositedScrolling() |
1464 { | 1445 { |
1465 updateSelfPaintingLayer(); | 1446 updateSelfPaintingLayer(); |
1466 } | 1447 } |
1467 | 1448 |
1468 void RenderLayer::updateReflectionInfo(const RenderStyle* oldStyle) | 1449 void RenderLayer::updateReflectionInfo(const RenderStyle* oldStyle) |
1469 { | 1450 { |
1470 ASSERT(!oldStyle || !renderer()->style()->reflectionDataEquivalent(oldStyle) ); | 1451 ASSERT(!oldStyle || !renderer()->style()->reflectionDataEquivalent(oldStyle) ); |
1471 if (renderer()->hasReflection()) { | 1452 if (renderer()->hasReflection()) { |
1472 if (!m_reflectionInfo) | 1453 if (!m_reflectionInfo) |
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3433 } | 3414 } |
3434 | 3415 |
3435 bool RenderLayer::hasVisibleBoxDecorations() const | 3416 bool RenderLayer::hasVisibleBoxDecorations() const |
3436 { | 3417 { |
3437 if (!hasVisibleContent()) | 3418 if (!hasVisibleContent()) |
3438 return false; | 3419 return false; |
3439 | 3420 |
3440 return hasBoxDecorationsOrBackground() || hasOverflowControls(); | 3421 return hasBoxDecorationsOrBackground() || hasOverflowControls(); |
3441 } | 3422 } |
3442 | 3423 |
3443 bool RenderLayer::isVisuallyNonEmpty() const | |
Julien - ping for review
2014/10/02 16:47:49
I swore I had seen a patch use this function, but
| |
3444 { | |
3445 ASSERT(!m_visibleDescendantStatusDirty); | |
3446 | |
3447 if (hasVisibleContent() && hasNonEmptyChildRenderers()) | |
3448 return true; | |
3449 | |
3450 if (renderer()->isReplaced() || renderer()->hasMask()) | |
3451 return true; | |
3452 | |
3453 if (hasVisibleBoxDecorations()) | |
3454 return true; | |
3455 | |
3456 return false; | |
3457 } | |
3458 | |
3459 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) | 3424 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) |
3460 { | 3425 { |
3461 if (!newStyle->hasFilter() && (!oldStyle || !oldStyle->hasFilter())) | 3426 if (!newStyle->hasFilter() && (!oldStyle || !oldStyle->hasFilter())) |
3462 return; | 3427 return; |
3463 | 3428 |
3464 updateOrRemoveFilterClients(); | 3429 updateOrRemoveFilterClients(); |
3465 updateOrRemoveFilterEffectRenderer(); | 3430 updateOrRemoveFilterEffectRenderer(); |
3466 } | 3431 } |
3467 | 3432 |
3468 bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const Ren derStyle* oldStyle) | 3433 bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const Ren derStyle* oldStyle) |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3702 } | 3667 } |
3703 } | 3668 } |
3704 | 3669 |
3705 void showLayerTree(const blink::RenderObject* renderer) | 3670 void showLayerTree(const blink::RenderObject* renderer) |
3706 { | 3671 { |
3707 if (!renderer) | 3672 if (!renderer) |
3708 return; | 3673 return; |
3709 showLayerTree(renderer->enclosingLayer()); | 3674 showLayerTree(renderer->enclosingLayer()); |
3710 } | 3675 } |
3711 #endif | 3676 #endif |
OLD | NEW |