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

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

Issue 2744443003: Correct overlay scrollbar check FrameView::scrollbarExistenceDidChange (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 2103
2104 void FrameView::scrollbarExistenceDidChange() { 2104 void FrameView::scrollbarExistenceDidChange() {
2105 // We check to make sure the view is attached to a frame() as this method can 2105 // We check to make sure the view is attached to a frame() as this method can
2106 // be triggered before the view is attached by LocalFrame::createView(...) 2106 // be triggered before the view is attached by LocalFrame::createView(...)
2107 // setting various values such as setScrollBarModes(...) for example. An 2107 // setting various values such as setScrollBarModes(...) for example. An
2108 // ASSERT is triggered when a view is layout before being attached to a 2108 // ASSERT is triggered when a view is layout before being attached to a
2109 // frame(). 2109 // frame().
2110 if (!frame().view()) 2110 if (!frame().view())
2111 return; 2111 return;
2112 2112
2113 bool usesOverlayScrollbars = ScrollbarTheme::theme().usesOverlayScrollbars(); 2113 Element* customScrollbarElement = nullptr;
2114
2115 bool usesOverlayScrollbars =
2116 ScrollbarTheme::theme().usesOverlayScrollbars() &&
2117 !shouldUseCustomScrollbars(customScrollbarElement);
2114 2118
2115 // FIXME: this call to layout() could be called within FrameView::layout(), 2119 // FIXME: this call to layout() could be called within FrameView::layout(),
2116 // but before performLayout(), causing double-layout. See also 2120 // but before performLayout(), causing double-layout. See also
2117 // crbug.com/429242. 2121 // crbug.com/429242.
2118 if (!usesOverlayScrollbars && needsLayout()) 2122 if (!usesOverlayScrollbars && needsLayout())
2119 layout(); 2123 layout();
2120 2124
2121 if (!layoutViewItem().isNull() && layoutViewItem().usesCompositing()) { 2125 if (!layoutViewItem().isNull() && layoutViewItem().usesCompositing()) {
2122 layoutViewItem().compositor()->frameViewScrollbarsExistenceDidChange(); 2126 layoutViewItem().compositor()->frameViewScrollbarsExistenceDidChange();
2123 2127
(...skipping 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after
5253 void FrameView::setAnimationHost( 5257 void FrameView::setAnimationHost(
5254 std::unique_ptr<CompositorAnimationHost> host) { 5258 std::unique_ptr<CompositorAnimationHost> host) {
5255 m_animationHost = std::move(host); 5259 m_animationHost = std::move(host);
5256 } 5260 }
5257 5261
5258 LayoutUnit FrameView::caretWidth() const { 5262 LayoutUnit FrameView::caretWidth() const {
5259 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5263 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5260 } 5264 }
5261 5265
5262 } // namespace blink 5266 } // namespace blink
OLDNEW
« 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