OLD | NEW |
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 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 | 2114 |
2115 void FrameView::scrollbarExistenceDidChange() { | 2115 void FrameView::scrollbarExistenceDidChange() { |
2116 // We check to make sure the view is attached to a frame() as this method can | 2116 // We check to make sure the view is attached to a frame() as this method can |
2117 // be triggered before the view is attached by LocalFrame::createView(...) | 2117 // be triggered before the view is attached by LocalFrame::createView(...) |
2118 // setting various values such as setScrollBarModes(...) for example. An | 2118 // setting various values such as setScrollBarModes(...) for example. An |
2119 // ASSERT is triggered when a view is layout before being attached to a | 2119 // ASSERT is triggered when a view is layout before being attached to a |
2120 // frame(). | 2120 // frame(). |
2121 if (!frame().view()) | 2121 if (!frame().view()) |
2122 return; | 2122 return; |
2123 | 2123 |
2124 bool usesOverlayScrollbars = ScrollbarTheme::theme().usesOverlayScrollbars(); | 2124 Element* customScrollbarElement = nullptr; |
| 2125 |
| 2126 bool usesOverlayScrollbars = |
| 2127 ScrollbarTheme::theme().usesOverlayScrollbars() && |
| 2128 !shouldUseCustomScrollbars(customScrollbarElement); |
2125 | 2129 |
2126 // FIXME: this call to layout() could be called within FrameView::layout(), | 2130 // FIXME: this call to layout() could be called within FrameView::layout(), |
2127 // but before performLayout(), causing double-layout. See also | 2131 // but before performLayout(), causing double-layout. See also |
2128 // crbug.com/429242. | 2132 // crbug.com/429242. |
2129 if (!usesOverlayScrollbars && needsLayout()) | 2133 if (!usesOverlayScrollbars && needsLayout()) |
2130 layout(); | 2134 layout(); |
2131 | 2135 |
2132 if (!layoutViewItem().isNull() && layoutViewItem().usesCompositing()) { | 2136 if (!layoutViewItem().isNull() && layoutViewItem().usesCompositing()) { |
2133 layoutViewItem().compositor()->frameViewScrollbarsExistenceDidChange(); | 2137 layoutViewItem().compositor()->frameViewScrollbarsExistenceDidChange(); |
2134 | 2138 |
(...skipping 3125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5260 void FrameView::setAnimationHost( | 5264 void FrameView::setAnimationHost( |
5261 std::unique_ptr<CompositorAnimationHost> host) { | 5265 std::unique_ptr<CompositorAnimationHost> host) { |
5262 m_animationHost = std::move(host); | 5266 m_animationHost = std::move(host); |
5263 } | 5267 } |
5264 | 5268 |
5265 LayoutUnit FrameView::caretWidth() const { | 5269 LayoutUnit FrameView::caretWidth() const { |
5266 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5270 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
5267 } | 5271 } |
5268 | 5272 |
5269 } // namespace blink | 5273 } // namespace blink |
OLD | NEW |