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 4080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4091 | 4091 |
4092 return scrollbar->TotalSize() - scrollbar->VisibleSize(); | 4092 return scrollbar->TotalSize() - scrollbar->VisibleSize(); |
4093 } | 4093 } |
4094 | 4094 |
4095 void FrameView::UpdateScrollOffset(const ScrollOffset& offset, | 4095 void FrameView::UpdateScrollOffset(const ScrollOffset& offset, |
4096 ScrollType scroll_type) { | 4096 ScrollType scroll_type) { |
4097 ScrollOffset scroll_delta = offset - scroll_offset_; | 4097 ScrollOffset scroll_delta = offset - scroll_offset_; |
4098 if (scroll_delta.IsZero()) | 4098 if (scroll_delta.IsZero()) |
4099 return; | 4099 return; |
4100 | 4100 |
4101 ShowOverlayScrollbars(); | |
4102 | |
4103 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 4101 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
4104 // Don't scroll the FrameView! | 4102 // Don't scroll the FrameView! |
4105 ASSERT_NOT_REACHED(); | 4103 ASSERT_NOT_REACHED(); |
4106 } | 4104 } |
4107 | 4105 |
4108 scroll_offset_ = offset; | 4106 scroll_offset_ = offset; |
4109 | 4107 |
4110 if (!ScrollbarsSuppressed()) | 4108 if (!ScrollbarsSuppressed()) |
4111 pending_scroll_delta_ += scroll_delta; | 4109 pending_scroll_delta_ += scroll_delta; |
4112 | 4110 |
(...skipping 24 matching lines...) Expand all Loading... |
4137 | 4135 |
4138 GetFrame().Loader().SaveScrollState(); | 4136 GetFrame().Loader().SaveScrollState(); |
4139 DidChangeScrollOffset(); | 4137 DidChangeScrollOffset(); |
4140 | 4138 |
4141 if (scroll_type == kCompositorScroll && frame_->IsMainFrame()) { | 4139 if (scroll_type == kCompositorScroll && frame_->IsMainFrame()) { |
4142 if (DocumentLoader* document_loader = frame_->Loader().GetDocumentLoader()) | 4140 if (DocumentLoader* document_loader = frame_->Loader().GetDocumentLoader()) |
4143 document_loader->GetInitialScrollState().was_scrolled_by_user = true; | 4141 document_loader->GetInitialScrollState().was_scrolled_by_user = true; |
4144 } | 4142 } |
4145 | 4143 |
4146 if (IsExplicitScrollType(scroll_type)) { | 4144 if (IsExplicitScrollType(scroll_type)) { |
| 4145 if (scroll_type != kCompositorScroll) |
| 4146 ShowOverlayScrollbars(); |
4147 ClearFragmentAnchor(); | 4147 ClearFragmentAnchor(); |
4148 ClearScrollAnchor(); | 4148 ClearScrollAnchor(); |
4149 } | 4149 } |
4150 } | 4150 } |
4151 | 4151 |
4152 void FrameView::DidChangeScrollOffset() { | 4152 void FrameView::DidChangeScrollOffset() { |
4153 GetFrame().Loader().Client()->DidChangeScrollOffset(); | 4153 GetFrame().Loader().Client()->DidChangeScrollOffset(); |
4154 if (GetFrame().IsMainFrame()) | 4154 if (GetFrame().IsMainFrame()) |
4155 GetFrame().GetPage()->GetChromeClient().MainFrameScrollOffsetChanged(); | 4155 GetFrame().GetPage()->GetChromeClient().MainFrameScrollOffsetChanged(); |
4156 } | 4156 } |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 void FrameView::SetAnimationHost( | 5374 void FrameView::SetAnimationHost( |
5375 std::unique_ptr<CompositorAnimationHost> host) { | 5375 std::unique_ptr<CompositorAnimationHost> host) { |
5376 animation_host_ = std::move(host); | 5376 animation_host_ = std::move(host); |
5377 } | 5377 } |
5378 | 5378 |
5379 LayoutUnit FrameView::CaretWidth() const { | 5379 LayoutUnit FrameView::CaretWidth() const { |
5380 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5380 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5381 } | 5381 } |
5382 | 5382 |
5383 } // namespace blink | 5383 } // namespace blink |
OLD | NEW |