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

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

Issue 23567020: overflow-y: hidden areas can still be scrolled vertically (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: overflow-y: hidden areas can still be scrolled vertically Created 7 years, 3 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/RenderBox.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/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
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698