| 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 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |