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

Unified Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1307203004: Revert "Reworks the clipping logic" and follow-up. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/DeprecatedPaintLayer.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp
index 29c0f4bca89cbee090098a58324a430b07e04553..fa3dcaebe2d009b85db04ad1fd94d96cc4acfe30 100644
--- a/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -376,6 +376,8 @@ void DeprecatedPaintLayer::updateTransform(const ComputedStyle* oldStyle, const
// DeprecatedPaintLayers with transforms act as clip rects roots, so clear the cached clip rects here.
m_clipper.clearClipRectsIncludingDescendants();
+ } else if (hasTransform) {
+ m_clipper.clearClipRectsIncludingDescendants(AbsoluteClipRects);
}
updateTransformationMatrix();
@@ -1400,10 +1402,7 @@ void DeprecatedPaintLayer::collectFragments(DeprecatedPaintLayerFragments& fragm
// Calculate clip rects relative to the enclosingPaginationLayer. The purpose of this call is to determine our bounds clipped to intermediate
// layers between us and the pagination context. It's important to minimize the number of fragments we need to create and this helps with that.
- // This code uses a non-standard root layer, which can populate our cache with unexpected values.
- // Thus we bypass the clip rect cache by ignoring |clipRectsCacheSlot| and passing UncachedClipRects.
- // TODO(chadarmstrong): If possible, this code should use the cache (one way would be by computing the root layer relative to |clipRectsCacheSlot|).
- ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), UncachedClipRects, inOverlayScrollbarSizeRelevancy);
+ ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy);
if (respectOverflowClip == IgnoreOverflowClip)
paginationClipRectsContext.setIgnoreOverflowClip();
LayoutRect layerBoundsInFlowThread;
@@ -1442,10 +1441,7 @@ void DeprecatedPaintLayer::collectFragments(DeprecatedPaintLayerFragments& fragm
ClipRect ancestorClipRect = dirtyRect;
if (const DeprecatedPaintLayer* paginationParentLayer = enclosingPaginationLayer()->parent()) {
const DeprecatedPaintLayer* ancestorLayer = rootLayerIsInsidePaginationLayer ? paginationParentLayer : rootLayer;
- // This code uses a non-standard root layer, which can populate our cache with unexpected values.
- // Thus we bypass the clip rect cache by ignoring |clipRectsCacheSlot| and passing UncachedClipRects.
- // TODO(chadarmstrong): If possible, this code should use the cache (one way would be by computing the root layer relative to |clipRectsCacheSlot|).
- ClipRectsContext clipRectsContext(ancestorLayer, UncachedClipRects, inOverlayScrollbarSizeRelevancy);
+ ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy);
if (respectOverflowClip == IgnoreOverflowClip)
clipRectsContext.setIgnoreOverflowClip();
ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipRect(clipRectsContext);
« no previous file with comments | « Source/core/layout/compositing/CompositingInputsUpdater.cpp ('k') | Source/core/paint/DeprecatedPaintLayerClipper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698