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 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3433 } | 3421 } |
3434 | 3422 |
3435 bool RenderLayer::hasVisibleBoxDecorations() const | 3423 bool RenderLayer::hasVisibleBoxDecorations() const |
3436 { | 3424 { |
3437 if (!hasVisibleContent()) | 3425 if (!hasVisibleContent()) |
3438 return false; | 3426 return false; |
3439 | 3427 |
3440 return hasBoxDecorationsOrBackground() || hasOverflowControls(); | 3428 return hasBoxDecorationsOrBackground() || hasOverflowControls(); |
3441 } | 3429 } |
3442 | 3430 |
3443 bool RenderLayer::isVisuallyNonEmpty() const | |
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) | 3431 void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle*
newStyle) |
3460 { | 3432 { |
3461 if (!newStyle->hasFilter() && (!oldStyle || !oldStyle->hasFilter())) | 3433 if (!newStyle->hasFilter() && (!oldStyle || !oldStyle->hasFilter())) |
3462 return; | 3434 return; |
3463 | 3435 |
3464 updateOrRemoveFilterClients(); | 3436 updateOrRemoveFilterClients(); |
3465 updateOrRemoveFilterEffectRenderer(); | 3437 updateOrRemoveFilterEffectRenderer(); |
3466 } | 3438 } |
3467 | 3439 |
3468 bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const Ren
derStyle* oldStyle) | 3440 bool RenderLayer::attemptDirectCompositingUpdate(StyleDifference diff, const Ren
derStyle* oldStyle) |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3702 } | 3674 } |
3703 } | 3675 } |
3704 | 3676 |
3705 void showLayerTree(const blink::RenderObject* renderer) | 3677 void showLayerTree(const blink::RenderObject* renderer) |
3706 { | 3678 { |
3707 if (!renderer) | 3679 if (!renderer) |
3708 return; | 3680 return; |
3709 showLayerTree(renderer->enclosingLayer()); | 3681 showLayerTree(renderer->enclosingLayer()); |
3710 } | 3682 } |
3711 #endif | 3683 #endif |
OLD | NEW |