Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 if (next == compositingAncestor) { 1806 if (next == compositingAncestor) {
1807 computeClipRoot = curr; 1807 computeClipRoot = curr;
1808 break; 1808 break;
1809 } 1809 }
1810 curr = next; 1810 curr = next;
1811 } 1811 }
1812 1812
1813 if (!computeClipRoot || computeClipRoot == layer) 1813 if (!computeClipRoot || computeClipRoot == layer)
1814 return false; 1814 return false;
1815 1815
1816 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot, 0, TemporaryClipRects)).rect() != PaintInfo::infiniteRect(); // FIXME: Incorrec t for CSS regions. 1816 return layer->clipper().backgroundClipRect(ClipRectsContext(computeClipRoot, TemporaryClipRects)).rect() != PaintInfo::infiniteRect();
1817 } 1817 }
1818 1818
1819 // Return true if the given layer is a stacking context and has compositing chil d 1819 // Return true if the given layer is a stacking context and has compositing chil d
1820 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer 1820 // layers that it needs to clip. In this case we insert a clipping GraphicsLayer
1821 // into the hierarchy between this layer and its children in the z-order hierarc hy. 1821 // into the hierarchy between this layer and its children in the z-order hierarc hy.
1822 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer ) const 1822 bool RenderLayerCompositor::clipsCompositingDescendants(const RenderLayer* layer ) const
1823 { 1823 {
1824 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver flowClip(); 1824 return layer->hasCompositingDescendant() && layer->renderer()->hasClipOrOver flowClip();
1825 } 1825 }
1826 1826
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2728 } else if (graphicsLayer == m_scrollLayer.get()) { 2728 } else if (graphicsLayer == m_scrollLayer.get()) {
2729 name = "Frame Scrolling Layer"; 2729 name = "Frame Scrolling Layer";
2730 } else { 2730 } else {
2731 ASSERT_NOT_REACHED(); 2731 ASSERT_NOT_REACHED();
2732 } 2732 }
2733 2733
2734 return name; 2734 return name;
2735 } 2735 }
2736 2736
2737 } // namespace WebCore 2737 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderLayerStackingNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698