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

Unified Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 465333004: Non-composited, fixed position should trigger main thread scrolling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix comment Created 6 years, 4 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 | « Source/core/rendering/compositing/CompositingReasonFinder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/CompositingReasonFinder.cpp
diff --git a/Source/core/rendering/compositing/CompositingReasonFinder.cpp b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
index 61451afd06f3e8c32ca10be225f5526102a0d41a..6f6ce3d3ca2cfbe9708b2d3820d7b70576ed9138 100644
--- a/Source/core/rendering/compositing/CompositingReasonFinder.cpp
+++ b/Source/core/rendering/compositing/CompositingReasonFinder.cpp
@@ -149,7 +149,7 @@ CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons
directReasons |= CompositingReasonOverflowScrollingTouch;
}
- if (requiresCompositingForPositionFixed(renderer))
+ if (requiresCompositingForPositionFixed(layer))
directReasons |= CompositingReasonPositionFixed;
directReasons |= renderer->additionalCompositingReasons();
@@ -166,15 +166,13 @@ bool CompositingReasonFinder::requiresCompositingForAnimation(RenderStyle* style
return style->shouldCompositeForCurrentAnimations();
}
-bool CompositingReasonFinder::requiresCompositingForPositionFixed(RenderObject* renderer) const
+bool CompositingReasonFinder::requiresCompositingForPositionFixed(const RenderLayer* layer) const
{
if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
return false;
// Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
// They will stay fixed wrt the container rather than the enclosing frame.
- return renderer->style()->position() == FixedPosition
- && renderer->container() == &m_renderView
- && m_renderView.frameView()->isScrollable();
+ return layer->scrollsWithViewport() && m_renderView.frameView()->isScrollable();
}
}
« no previous file with comments | « Source/core/rendering/compositing/CompositingReasonFinder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698