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

Unified Diff: Source/core/rendering/RenderLayerClipper.cpp

Issue 355293002: Remove pagination hacks in RenderLayerClipper::backgroundClipRect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerClipper.cpp
diff --git a/Source/core/rendering/RenderLayerClipper.cpp b/Source/core/rendering/RenderLayerClipper.cpp
index 653513654abdbaef80200bdc22f8ca6586ccfba3..474378df2b94f667e9bb2229455bf970867c049b 100644
--- a/Source/core/rendering/RenderLayerClipper.cpp
+++ b/Source/core/rendering/RenderLayerClipper.cpp
@@ -308,26 +308,16 @@ static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRect
ClipRect RenderLayerClipper::backgroundClipRect(const ClipRectsContext& context) const
{
ASSERT(m_renderer.layer()->parent());
+ ASSERT(m_renderer.view());
ClipRects parentRects;
-
- // If we cross into a different pagination context, then we can't rely on the cache.
- // Just switch over to using UncachedClipRects.
- if (context.usesCache() && m_renderer.layer()->parent()->enclosingPaginationLayer() != m_renderer.layer()->enclosingPaginationLayer()) {
- ClipRectsContext tempContext(context);
- tempContext.cacheSlot = UncachedClipRects;
- parentClipRects(tempContext, parentRects);
- } else {
- parentClipRects(context, parentRects);
- }
+ parentClipRects(context, parentRects);
ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, m_renderer.style()->position());
- RenderView* view = m_renderer.view();
- ASSERT(view);
// Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite.
- if (parentRects.fixed() && context.rootLayer->renderer() == view && backgroundClipRect != PaintInfo::infiniteRect())
- backgroundClipRect.move(view->frameView()->scrollOffsetForFixedPosition());
+ if (parentRects.fixed() && context.rootLayer->renderer() == m_renderer.view() && backgroundClipRect != PaintInfo::infiniteRect())
+ backgroundClipRect.move(m_renderer.view()->frameView()->scrollOffsetForFixedPosition());
return backgroundClipRect;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698