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

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

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: check for presence of settings using DCHECK + sync. Created 4 years, 2 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 m_innerViewportScrollLayer->removeAllChildren(); 418 m_innerViewportScrollLayer->removeAllChildren();
419 m_innerViewportScrollLayer->addChild(currentLayerTreeRoot); 419 m_innerViewportScrollLayer->addChild(currentLayerTreeRoot);
420 } 420 }
421 421
422 void VisualViewport::initializeScrollbars() 422 void VisualViewport::initializeScrollbars()
423 { 423 {
424 // Do nothing if not attached to layer tree yet - will initialize upon attac h. 424 // Do nothing if not attached to layer tree yet - will initialize upon attac h.
425 if (!m_innerViewportContainerLayer) 425 if (!m_innerViewportContainerLayer)
426 return; 426 return;
427 427
428 if (visualViewportSuppliesScrollbars()) { 428 if (visualViewportSuppliesScrollbars() && !frameHost().settings().hideScroll bars()) {
429 if (!m_overlayScrollbarHorizontal->parent()) 429 if (!m_overlayScrollbarHorizontal->parent())
430 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal .get()); 430 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal .get());
431 if (!m_overlayScrollbarVertical->parent()) 431 if (!m_overlayScrollbarVertical->parent())
432 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.g et()); 432 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.g et());
433 } else { 433 } else {
434 m_overlayScrollbarHorizontal->removeFromParent(); 434 m_overlayScrollbarHorizontal->removeFromParent();
435 m_overlayScrollbarVertical->removeFromParent(); 435 m_overlayScrollbarVertical->removeFromParent();
436 } 436 }
437 437
438 setupScrollbar(WebScrollbar::Horizontal); 438 setupScrollbar(WebScrollbar::Horizontal);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 } else if (graphicsLayer == m_rootTransformLayer.get()) { 838 } else if (graphicsLayer == m_rootTransformLayer.get()) {
839 name = "Root Transform Layer"; 839 name = "Root Transform Layer";
840 } else { 840 } else {
841 ASSERT_NOT_REACHED(); 841 ASSERT_NOT_REACHED();
842 } 842 }
843 843
844 return name; 844 return name;
845 } 845 }
846 846
847 } // namespace blink 847 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698