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

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

Issue 2826893003: Remove ScrollableArea::GetFrameViewBase and move ScheduleAnimation into subclasses. (Closed)
Patch Set: Remove UNREACHED Created 3 years, 8 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) 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 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 void FrameView::ScrollbarStyleChanged() { 2740 void FrameView::ScrollbarStyleChanged() {
2741 // FIXME: Why does this only apply to the main frame? 2741 // FIXME: Why does this only apply to the main frame?
2742 if (!frame_->IsMainFrame()) 2742 if (!frame_->IsMainFrame())
2743 return; 2743 return;
2744 AdjustScrollbarOpacity(); 2744 AdjustScrollbarOpacity();
2745 ContentsResized(); 2745 ContentsResized();
2746 UpdateScrollbars(); 2746 UpdateScrollbars();
2747 PositionScrollbarLayers(); 2747 PositionScrollbarLayers();
2748 } 2748 }
2749 2749
2750 bool FrameView::ScheduleAnimation() {
haraken 2017/04/19 09:44:07 It seems like we have too many proxy methods to ca
joelhockey 2017/04/19 10:27:54 2 CLs on the wey soon for this.
2751 return frame_->ScheduleAnimation(GetHostWindow());
2752 }
2753
2750 void FrameView::NotifyPageThatContentAreaWillPaint() const { 2754 void FrameView::NotifyPageThatContentAreaWillPaint() const {
2751 Page* page = frame_->GetPage(); 2755 Page* page = frame_->GetPage();
2752 if (!page) 2756 if (!page)
2753 return; 2757 return;
2754 2758
2755 ContentAreaWillPaint(); 2759 ContentAreaWillPaint();
2756 2760
2757 if (!scrollable_areas_) 2761 if (!scrollable_areas_)
2758 return; 2762 return;
2759 2763
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 ? horizontal_scrollbar_mode_ 4574 ? horizontal_scrollbar_mode_
4571 : vertical_scrollbar_mode_; 4575 : vertical_scrollbar_mode_;
4572 4576
4573 return mode == kScrollbarAuto || mode == kScrollbarAlwaysOn; 4577 return mode == kScrollbarAuto || mode == kScrollbarAlwaysOn;
4574 } 4578 }
4575 4579
4576 bool FrameView::ShouldPlaceVerticalScrollbarOnLeft() const { 4580 bool FrameView::ShouldPlaceVerticalScrollbarOnLeft() const {
4577 return false; 4581 return false;
4578 } 4582 }
4579 4583
4580 FrameViewBase* FrameView::GetFrameViewBase() {
4581 return this;
4582 }
4583
4584 LayoutRect FrameView::ScrollIntoView(const LayoutRect& rect_in_content, 4584 LayoutRect FrameView::ScrollIntoView(const LayoutRect& rect_in_content,
4585 const ScrollAlignment& align_x, 4585 const ScrollAlignment& align_x,
4586 const ScrollAlignment& align_y, 4586 const ScrollAlignment& align_y,
4587 ScrollType scroll_type) { 4587 ScrollType scroll_type) {
4588 LayoutRect view_rect(VisibleContentRect()); 4588 LayoutRect view_rect(VisibleContentRect());
4589 LayoutRect expose_rect = ScrollAlignment::GetRectToExpose( 4589 LayoutRect expose_rect = ScrollAlignment::GetRectToExpose(
4590 view_rect, rect_in_content, align_x, align_y); 4590 view_rect, rect_in_content, align_x, align_y);
4591 if (expose_rect != view_rect) { 4591 if (expose_rect != view_rect) {
4592 SetScrollOffset( 4592 SetScrollOffset(
4593 ScrollOffset(expose_rect.X().ToFloat(), expose_rect.Y().ToFloat()), 4593 ScrollOffset(expose_rect.X().ToFloat(), expose_rect.Y().ToFloat()),
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 void FrameView::SetAnimationHost( 5346 void FrameView::SetAnimationHost(
5347 std::unique_ptr<CompositorAnimationHost> host) { 5347 std::unique_ptr<CompositorAnimationHost> host) {
5348 animation_host_ = std::move(host); 5348 animation_host_ = std::move(host);
5349 } 5349 }
5350 5350
5351 LayoutUnit FrameView::CaretWidth() const { 5351 LayoutUnit FrameView::CaretWidth() const {
5352 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1)); 5352 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1));
5353 } 5353 }
5354 5354
5355 } // namespace blink 5355 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698