Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 66f69da739efb2b2e5f3a5767ab01d4d59e8b263..7a7de9483daff075984f9f5ad0f951f46cdecc54 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -731,7 +731,18 @@ bool RenderBox::canBeScrolledAndHasScrollableArea() const |
bool RenderBox::canBeProgramaticallyScrolled() const |
{ |
- return (hasOverflowClip() && (scrollsOverflow() || (node() && node()->rendererIsEditable()))) || (node() && node()->isDocumentNode()); |
+ Node* node = this->node(); |
+ if (node && node->isDocumentNode()) |
+ return true; |
+ |
+ if (!hasOverflowClip()) |
+ return false; |
+ |
+ bool hasScrollableOverflow = hasScrollableOverflowX() || hasScrollableOverflowY(); |
+ if (scrollsOverflow() && hasScrollableOverflow) |
+ return true; |
+ |
+ return node && node->rendererIsEditable(); |
} |
bool RenderBox::usesCompositedScrolling() const |