| 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 2654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2665 // If the filter fails to build, remove it from the layer. It will still att
empt to | 2665 // If the filter fails to build, remove it from the layer. It will still att
empt to |
| 2666 // go through regular processing (e.g. compositing), but never apply anythin
g. | 2666 // go through regular processing (e.g. compositing), but never apply anythin
g. |
| 2667 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) | 2667 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende
rer()->style()))) |
| 2668 filterInfo->setRenderer(nullptr); | 2668 filterInfo->setRenderer(nullptr); |
| 2669 } | 2669 } |
| 2670 | 2670 |
| 2671 void RenderLayer::filterNeedsPaintInvalidation() | 2671 void RenderLayer::filterNeedsPaintInvalidation() |
| 2672 { | 2672 { |
| 2673 } | 2673 } |
| 2674 | 2674 |
| 2675 void RenderLayer::addLayerHitTestRects(LayerHitTestRects& rects) const | |
| 2676 { | |
| 2677 computeSelfHitTestRects(rects); | |
| 2678 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) | |
| 2679 child->addLayerHitTestRects(rects); | |
| 2680 } | |
| 2681 | |
| 2682 void RenderLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const | |
| 2683 { | |
| 2684 if (!size().isEmpty()) { | |
| 2685 Vector<LayoutRect> rect; | |
| 2686 | |
| 2687 if (renderBox() && renderBox()->scrollsOverflow()) { | |
| 2688 // For scrolling layers, rects are taken to be in the space of the c
ontents. | |
| 2689 // We need to include the bounding box of the layer in the space of
its parent | |
| 2690 // (eg. for border / scroll bars) and if it's composited then the en
tire contents | |
| 2691 // as well as they may be on another composited layer. Skip reportin
g contents | |
| 2692 // for non-composited layers as they'll get projected to the same la
yer as the | |
| 2693 // bounding box. | |
| 2694 if (compositingState() != NotComposited) | |
| 2695 rect.append(m_scrollableArea->overflowRect()); | |
| 2696 | |
| 2697 rects.set(this, rect); | |
| 2698 if (const RenderLayer* parentLayer = parent()) { | |
| 2699 LayerHitTestRects::iterator iter = rects.find(parentLayer); | |
| 2700 if (iter == rects.end()) { | |
| 2701 rects.add(parentLayer, Vector<LayoutRect>()).storedValue->va
lue.append(physicalBoundingBox(parentLayer)); | |
| 2702 } else { | |
| 2703 iter->value.append(physicalBoundingBox(parentLayer)); | |
| 2704 } | |
| 2705 } | |
| 2706 } else { | |
| 2707 rect.append(logicalBoundingBox()); | |
| 2708 rects.set(this, rect); | |
| 2709 } | |
| 2710 } | |
| 2711 } | |
| 2712 | |
| 2713 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend
ants() | 2675 void RenderLayer::setShouldDoFullPaintInvalidationIncludingNonCompositingDescend
ants() |
| 2714 { | 2676 { |
| 2715 renderer()->setShouldDoFullPaintInvalidation(true); | 2677 renderer()->setShouldDoFullPaintInvalidation(true); |
| 2716 | 2678 |
| 2717 // Disable for reading compositingState() in isPaintInvalidationContainer()
below. | 2679 // Disable for reading compositingState() in isPaintInvalidationContainer()
below. |
| 2718 DisableCompositingQueryAsserts disabler; | 2680 DisableCompositingQueryAsserts disabler; |
| 2719 | 2681 |
| 2720 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ | 2682 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
{ |
| 2721 if (!child->isPaintInvalidationContainer()) | 2683 if (!child->isPaintInvalidationContainer()) |
| 2722 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); | 2684 child->setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2740 } | 2702 } |
| 2741 } | 2703 } |
| 2742 | 2704 |
| 2743 void showLayerTree(const blink::RenderObject* renderer) | 2705 void showLayerTree(const blink::RenderObject* renderer) |
| 2744 { | 2706 { |
| 2745 if (!renderer) | 2707 if (!renderer) |
| 2746 return; | 2708 return; |
| 2747 showLayerTree(renderer->enclosingLayer()); | 2709 showLayerTree(renderer->enclosingLayer()); |
| 2748 } | 2710 } |
| 2749 #endif | 2711 #endif |
| OLD | NEW |