| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 // If the child is composited, but not a stacking context, it may paint | 692 // If the child is composited, but not a stacking context, it may paint |
| 693 // negative z-index descendants into an ancestor's GraphicsLayer. | 693 // negative z-index descendants into an ancestor's GraphicsLayer. |
| 694 m_isAllScrollingContentComposited = false; | 694 m_isAllScrollingContentComposited = false; |
| 695 return; | 695 return; |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 } | 698 } |
| 699 | 699 |
| 700 void PaintLayer::updateDescendantDependentFlags() { | 700 void PaintLayer::updateDescendantDependentFlags() { |
| 701 if (m_needsDescendantDependentFlagsUpdate) { | 701 if (m_needsDescendantDependentFlagsUpdate) { |
| 702 bool oldHasNonIsolatedDescendantWithBlendMode = |
| 703 m_hasNonIsolatedDescendantWithBlendMode; |
| 702 m_hasVisibleDescendant = false; | 704 m_hasVisibleDescendant = false; |
| 703 m_hasNonIsolatedDescendantWithBlendMode = false; | 705 m_hasNonIsolatedDescendantWithBlendMode = false; |
| 704 m_hasDescendantWithClipPath = false; | 706 m_hasDescendantWithClipPath = false; |
| 705 m_hasRootScrollerAsDescendant = false; | 707 m_hasRootScrollerAsDescendant = false; |
| 706 | 708 |
| 707 for (PaintLayer* child = firstChild(); child; | 709 for (PaintLayer* child = firstChild(); child; |
| 708 child = child->nextSibling()) { | 710 child = child->nextSibling()) { |
| 709 child->updateDescendantDependentFlags(); | 711 child->updateDescendantDependentFlags(); |
| 710 | 712 |
| 711 if (child->m_hasVisibleContent || child->m_hasVisibleDescendant) | 713 if (child->m_hasVisibleContent || child->m_hasVisibleDescendant) |
| 712 m_hasVisibleDescendant = true; | 714 m_hasVisibleDescendant = true; |
| 713 | 715 |
| 714 m_hasNonIsolatedDescendantWithBlendMode |= | 716 m_hasNonIsolatedDescendantWithBlendMode |= |
| 715 (!child->stackingNode()->isStackingContext() && | 717 (!child->stackingNode()->isStackingContext() && |
| 716 child->hasNonIsolatedDescendantWithBlendMode()) || | 718 child->hasNonIsolatedDescendantWithBlendMode()) || |
| 717 child->layoutObject()->styleRef().hasBlendMode(); | 719 child->layoutObject()->styleRef().hasBlendMode(); |
| 718 | 720 |
| 719 m_hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || | 721 m_hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || |
| 720 child->layoutObject()->hasClipPath(); | 722 child->layoutObject()->hasClipPath(); |
| 721 | 723 |
| 722 m_hasRootScrollerAsDescendant |= child->hasRootScrollerAsDescendant() || | 724 m_hasRootScrollerAsDescendant |= child->hasRootScrollerAsDescendant() || |
| 723 (child == | 725 (child == |
| 724 child->layoutObject() | 726 child->layoutObject() |
| 725 ->document() | 727 ->document() |
| 726 .rootScrollerController() | 728 .rootScrollerController() |
| 727 .rootScrollerPaintLayer()); | 729 .rootScrollerPaintLayer()); |
| 728 } | 730 } |
| 729 | 731 |
| 732 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && |
| 733 oldHasNonIsolatedDescendantWithBlendMode != |
| 734 static_cast<bool>(m_hasNonIsolatedDescendantWithBlendMode)) |
| 735 layoutObject()->setNeedsPaintPropertyUpdate(); |
| 730 m_needsDescendantDependentFlagsUpdate = false; | 736 m_needsDescendantDependentFlagsUpdate = false; |
| 731 } | 737 } |
| 732 | 738 |
| 733 bool previouslyHasVisibleContent = m_hasVisibleContent; | 739 bool previouslyHasVisibleContent = m_hasVisibleContent; |
| 734 if (layoutObject()->style()->visibility() == EVisibility::Visible) { | 740 if (layoutObject()->style()->visibility() == EVisibility::Visible) { |
| 735 m_hasVisibleContent = true; | 741 m_hasVisibleContent = true; |
| 736 } else { | 742 } else { |
| 737 // layer may be hidden but still have some visible content, check for this | 743 // layer may be hidden but still have some visible content, check for this |
| 738 m_hasVisibleContent = false; | 744 m_hasVisibleContent = false; |
| 739 LayoutObject* r = layoutObject()->slowFirstChild(); | 745 LayoutObject* r = layoutObject()->slowFirstChild(); |
| (...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 } | 3288 } |
| 3283 | 3289 |
| 3284 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3290 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3285 if (!layoutObject) { | 3291 if (!layoutObject) { |
| 3286 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3292 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3287 return; | 3293 return; |
| 3288 } | 3294 } |
| 3289 showLayerTree(layoutObject->enclosingLayer()); | 3295 showLayerTree(layoutObject->enclosingLayer()); |
| 3290 } | 3296 } |
| 3291 #endif | 3297 #endif |
| OLD | NEW |