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 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3841 animating_scrollable_areas_ = new ScrollableAreaSet; | 3841 animating_scrollable_areas_ = new ScrollableAreaSet; |
3842 animating_scrollable_areas_->insert(scrollable_area); | 3842 animating_scrollable_areas_->insert(scrollable_area); |
3843 } | 3843 } |
3844 | 3844 |
3845 void FrameView::RemoveAnimatingScrollableArea(ScrollableArea* scrollable_area) { | 3845 void FrameView::RemoveAnimatingScrollableArea(ScrollableArea* scrollable_area) { |
3846 if (!animating_scrollable_areas_) | 3846 if (!animating_scrollable_areas_) |
3847 return; | 3847 return; |
3848 animating_scrollable_areas_->erase(scrollable_area); | 3848 animating_scrollable_areas_->erase(scrollable_area); |
3849 } | 3849 } |
3850 | 3850 |
3851 FrameView* FrameView::Root() const { | |
3852 const FrameView* top = this; | |
3853 while (top->Parent()) | |
3854 top = ToFrameView(top->Parent()); | |
3855 return const_cast<FrameView*>(top); | |
3856 } | |
3857 | |
3858 void FrameView::SetParent(FrameViewBase* parent_frame_view_base) { | 3851 void FrameView::SetParent(FrameViewBase* parent_frame_view_base) { |
3859 FrameView* parent = ToFrameView(parent_frame_view_base); | 3852 FrameView* parent = ToFrameView(parent_frame_view_base); |
3860 if (parent == parent_) | 3853 if (parent == parent_) |
3861 return; | 3854 return; |
3862 | 3855 |
3863 DCHECK(!parent || !parent_); | 3856 DCHECK(!parent || !parent_); |
3864 if (!parent || !parent->IsVisible()) | 3857 if (!parent || !parent->IsVisible()) |
3865 SetParentVisible(false); | 3858 SetParentVisible(false); |
3866 parent_ = parent; | 3859 parent_ = parent; |
3867 if (parent && parent->IsVisible()) | 3860 if (parent && parent->IsVisible()) |
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5393 void FrameView::SetAnimationHost( | 5386 void FrameView::SetAnimationHost( |
5394 std::unique_ptr<CompositorAnimationHost> host) { | 5387 std::unique_ptr<CompositorAnimationHost> host) { |
5395 animation_host_ = std::move(host); | 5388 animation_host_ = std::move(host); |
5396 } | 5389 } |
5397 | 5390 |
5398 LayoutUnit FrameView::CaretWidth() const { | 5391 LayoutUnit FrameView::CaretWidth() const { |
5399 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5392 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5400 } | 5393 } |
5401 | 5394 |
5402 } // namespace blink | 5395 } // namespace blink |
OLD | NEW |