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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: Add missing plumbing of hide_scrollbars preference. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 3337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3348 // If the page's overflow setting has disabled scrolling, do not allow anyth ing to override that setting. 3348 // If the page's overflow setting has disabled scrolling, do not allow anyth ing to override that setting.
3349 // http://crbug.com/426447 3349 // http://crbug.com/426447
3350 LayoutObject* viewport = viewportLayoutObject(); 3350 LayoutObject* viewport = viewportLayoutObject();
3351 if (viewport && !shouldIgnoreOverflowHidden()) { 3351 if (viewport && !shouldIgnoreOverflowHidden()) {
3352 if (viewport->style()->overflowX() == OverflowHidden) 3352 if (viewport->style()->overflowX() == OverflowHidden)
3353 horizontalMode = ScrollbarAlwaysOff; 3353 horizontalMode = ScrollbarAlwaysOff;
3354 if (viewport->style()->overflowY() == OverflowHidden) 3354 if (viewport->style()->overflowY() == OverflowHidden)
3355 verticalMode = ScrollbarAlwaysOff; 3355 verticalMode = ScrollbarAlwaysOff;
3356 } 3356 }
3357 3357
3358 if (m_frame->settings() && m_frame->settings()->hideScrollbars()) {
3359 horizontalMode = ScrollbarAlwaysOff;
3360 verticalMode = ScrollbarAlwaysOff;
3361 }
3362
3358 if (horizontalMode != horizontalScrollbarMode() && !m_horizontalScrollbarLoc k) { 3363 if (horizontalMode != horizontalScrollbarMode() && !m_horizontalScrollbarLoc k) {
3359 m_horizontalScrollbarMode = horizontalMode; 3364 m_horizontalScrollbarMode = horizontalMode;
3360 needsUpdate = true; 3365 needsUpdate = true;
3361 } 3366 }
3362 3367
3363 if (verticalMode != verticalScrollbarMode() && !m_verticalScrollbarLock) { 3368 if (verticalMode != verticalScrollbarMode() && !m_verticalScrollbarLock) {
3364 m_verticalScrollbarMode = verticalMode; 3369 m_verticalScrollbarMode = verticalMode;
3365 needsUpdate = true; 3370 needsUpdate = true;
3366 } 3371 }
3367 3372
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 } 4354 }
4350 4355
4351 bool FrameView::canThrottleRendering() const 4356 bool FrameView::canThrottleRendering() const
4352 { 4357 {
4353 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4358 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4354 return false; 4359 return false;
4355 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4360 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4356 } 4361 }
4357 4362
4358 } // namespace blink 4363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698