| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 if (!boundsComputed) { | 861 if (!boundsComputed) { |
| 862 // FIXME: If this layer's overlap bounds include its children, we don't
need to add its | 862 // FIXME: If this layer's overlap bounds include its children, we don't
need to add its |
| 863 // children's bounds to the overlap map. | 863 // children's bounds to the overlap map. |
| 864 layerBounds = enclosingIntRect(overlapMap.geometryMap().absoluteRect(lay
er->overlapBounds())); | 864 layerBounds = enclosingIntRect(overlapMap.geometryMap().absoluteRect(lay
er->overlapBounds())); |
| 865 // Empty rects never intersect, but we need them to for the purposes of
overlap testing. | 865 // Empty rects never intersect, but we need them to for the purposes of
overlap testing. |
| 866 if (layerBounds.isEmpty()) | 866 if (layerBounds.isEmpty()) |
| 867 layerBounds.setSize(IntSize(1, 1)); | 867 layerBounds.setSize(IntSize(1, 1)); |
| 868 boundsComputed = true; | 868 boundsComputed = true; |
| 869 } | 869 } |
| 870 | 870 |
| 871 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundClipRect(C
lipRectsContext(rootRenderLayer(), 0, AbsoluteClipRects)).rect()); // FIXME: Inc
orrect for CSS regions. | 871 IntRect clipRect = pixelSnappedIntRect(layer->clipper().backgroundClipRect(C
lipRectsContext(rootRenderLayer(), AbsoluteClipRects)).rect()); |
| 872 clipRect.intersect(layerBounds); | 872 clipRect.intersect(layerBounds); |
| 873 overlapMap.add(layer, clipRect); | 873 overlapMap.add(layer, clipRect); |
| 874 } | 874 } |
| 875 | 875 |
| 876 void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, Ren
derLayer* layer, RenderLayer* ancestorLayer) | 876 void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, Ren
derLayer* layer, RenderLayer* ancestorLayer) |
| 877 { | 877 { |
| 878 if (!canBeComposited(layer) || overlapMap.contains(layer)) | 878 if (!canBeComposited(layer) || overlapMap.contains(layer)) |
| 879 return; | 879 return; |
| 880 | 880 |
| 881 // A null ancestorLayer is an indication that 'layer' has already been pushe
d. | 881 // A null ancestorLayer is an indication that 'layer' has already been pushe
d. |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1819 if (next == compositingAncestor) { | 1819 if (next == compositingAncestor) { |
| 1820 computeClipRoot = curr; | 1820 computeClipRoot = curr; |
| 1821 break; | 1821 break; |
| 1822 } | 1822 } |
| 1823 curr = next; | 1823 curr = next; |
| 1824 } | 1824 } |
| 1825 | 1825 |
| 1826 if (!computeClipRoot || computeClipRoot == layer) | 1826 if (!computeClipRoot || computeClipRoot == layer) |
| 1827 return false; | 1827 return false; |
| 1828 | 1828 |
| 1829 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot,
0, TemporaryClipRects)).rect() != PaintInfo::infiniteRect(); // FIXME: Incorrec
t for CSS regions. | 1829 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot,
TemporaryClipRects)).rect() != PaintInfo::infiniteRect(); |
| 1830 } | 1830 } |
| 1831 | 1831 |
| 1832 // Return true if the given layer is a stacking context and has compositing chil
d | 1832 // Return true if the given layer is a stacking context and has compositing chil
d |
| 1833 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer | 1833 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer |
| 1834 // into the hierarchy between this layer and its children in the z-order hierarc
hy. | 1834 // into the hierarchy between this layer and its children in the z-order hierarc
hy. |
| 1835 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer
) const | 1835 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer
) const |
| 1836 { | 1836 { |
| 1837 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver
flowClip(); | 1837 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver
flowClip(); |
| 1838 } | 1838 } |
| 1839 | 1839 |
| (...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 } else if (graphicsLayer == m_scrollLayer.get()) { | 2741 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2742 name = "Frame Scrolling Layer"; | 2742 name = "Frame Scrolling Layer"; |
| 2743 } else { | 2743 } else { |
| 2744 ASSERT_NOT_REACHED(); | 2744 ASSERT_NOT_REACHED(); |
| 2745 } | 2745 } |
| 2746 | 2746 |
| 2747 return name; | 2747 return name; |
| 2748 } | 2748 } |
| 2749 | 2749 |
| 2750 } // namespace WebCore | 2750 } // namespace WebCore |
| OLD | NEW |