Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 3551c07c7aabebba2e1a4930ec54a72f0828ca82..14deeec2794ddc0c17aee5437e32918c101314c0 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -900,8 +900,9 @@ bool EventHandler::scroll(ScrollDirection direction, ScrollGranularity granulari |
if (!node || !node->renderer()) |
return false; |
+ bool rootLayerScrolls = m_frame->settings() && m_frame->settings()->rootLayerScrolls(); |
RenderBox* curBox = node->renderer()->enclosingBox(); |
- while (curBox && !curBox->isRenderView()) { |
+ while (curBox && (rootLayerScrolls || !curBox->isRenderView())) { |
ScrollDirection physicalDirection = toPhysicalDirection( |
direction, curBox->isHorizontalWritingMode(), curBox->style()->slowIsFlippedBlocksWritingMode()); |