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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2377283003: Don't use ScrollbarAlwaysOff for hide_scrollbars. (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 1edc270122be422811e0b4743c3bb9ecc75c7a5a..b36bd9b41cf92b20df3288b51af7f259710a50c8 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3338,6 +3338,10 @@ void FrameView::addChild(Widget* child)
void FrameView::setHasHorizontalScrollbar(bool hasBar)
{
+ DCHECK(m_frame->settings());
+ if (m_frame->settings()->hideScrollbars())
+ hasBar = false;
+
if (hasBar == !!m_horizontalScrollbar)
return;
@@ -3362,6 +3366,10 @@ void FrameView::setHasHorizontalScrollbar(bool hasBar)
void FrameView::setHasVerticalScrollbar(bool hasBar)
{
+ DCHECK(m_frame->settings());
+ if (m_frame->settings()->hideScrollbars())
+ hasBar = false;
+
if (hasBar == !!m_verticalScrollbar)
return;
@@ -3399,12 +3407,6 @@ void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve
verticalMode = ScrollbarAlwaysOff;
}
- DCHECK(m_frame->settings());
- if (m_frame->settings()->hideScrollbars()) {
- horizontalMode = ScrollbarAlwaysOff;
- verticalMode = ScrollbarAlwaysOff;
- }
-
if (horizontalMode != horizontalScrollbarMode() && !m_horizontalScrollbarLock) {
m_horizontalScrollbarMode = horizontalMode;
needsUpdate = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698