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

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

Issue 23450017: Scrolling allowed when overflow:hidden (seen on Acid2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Scrolling allowed when overflow:hidden (seen on Acid2) 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 | « LayoutTests/fast/events/resources/big-page-with-overflow-hidden-and-anchor-scroll.html ('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..79d7abca8f8a790687078a5018eba95f2afc8b4d 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -753,18 +753,11 @@ bool RenderBox::autoscrollInProgress() const
// There are two kinds of renderer that can autoscroll.
bool RenderBox::canAutoscroll() const
{
- // Check for a box that can be scrolled in its own right.
- if (canBeScrolledAndHasScrollableArea())
- return true;
+ if (node() && node()->isDocumentNode())
+ return view()->frameView()->isScrollable();
- // Check for a box that represents the top level of a web page.
- if (node() != &document())
- return false;
- Frame* frame = this->frame();
- if (!frame)
- return false;
- Page* page = frame->page();
- return page && page->mainFrame() == frame && frame->view()->isScrollable();
+ // Check for a box that can be scrolled in its own right.
+ return canBeScrolledAndHasScrollableArea();
}
// If specified point is in border belt, returned offset denotes direction of
« no previous file with comments | « LayoutTests/fast/events/resources/big-page-with-overflow-hidden-and-anchor-scroll.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698