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

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

Issue 691863003: Add a setting to do frame scrolls through the root layer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | 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 1c00bb9dc13a2b72ff19aba0dfd7307159350383..03d971832c103093849e8bd6c82b96eb7f31d781 100644
--- a/Source/core/rendering/RenderLayerClipper.cpp
+++ b/Source/core/rendering/RenderLayerClipper.cpp
@@ -44,6 +44,7 @@
#include "config.h"
#include "core/rendering/RenderLayerClipper.h"
+#include "core/frame/Settings.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
@@ -272,7 +273,8 @@ void RenderLayerClipper::calculateRects(const ClipRectsContext& context, const L
void RenderLayerClipper::calculateClipRects(const ClipRectsContext& context, ClipRects& clipRects) const
{
- if (!m_renderer.layer()->parent()) {
+ bool rootLayerScrolls = m_renderer.document().settings() && m_renderer.document().settings()->rootLayerScrolls();
+ if (!m_renderer.layer()->parent() && !rootLayerScrolls) {
// The root layer's clip rect is always infinite.
clipRects.reset(PaintInfo::infiniteRect());
return;
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698