| 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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 } | 711 } |
| 712 | 712 |
| 713 void FrameView::AdjustViewSize() { | 713 void FrameView::AdjustViewSize() { |
| 714 if (suppress_adjust_view_size_) | 714 if (suppress_adjust_view_size_) |
| 715 return; | 715 return; |
| 716 | 716 |
| 717 LayoutViewItem layout_view_item = this->GetLayoutViewItem(); | 717 LayoutViewItem layout_view_item = this->GetLayoutViewItem(); |
| 718 if (layout_view_item.IsNull()) | 718 if (layout_view_item.IsNull()) |
| 719 return; | 719 return; |
| 720 | 720 |
| 721 ASSERT(frame_->View() == this); | 721 DCHECK_EQ(frame_->View(), this); |
| 722 | 722 |
| 723 const IntRect rect = layout_view_item.DocumentRect(); | 723 const IntRect rect = layout_view_item.DocumentRect(); |
| 724 const IntSize& size = rect.Size(); | 724 const IntSize& size = rect.Size(); |
| 725 | 725 |
| 726 const IntPoint origin(-rect.X(), -rect.Y()); | 726 const IntPoint origin(-rect.X(), -rect.Y()); |
| 727 if (ScrollOrigin() != origin) | 727 if (ScrollOrigin() != origin) |
| 728 SetScrollOrigin(origin); | 728 SetScrollOrigin(origin); |
| 729 | 729 |
| 730 SetContentsSize(size); | 730 SetContentsSize(size); |
| 731 } | 731 } |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 // here. | 1151 // here. |
| 1152 post_layout_tasks_timer_.StartOneShot(0, BLINK_FROM_HERE); | 1152 post_layout_tasks_timer_.StartOneShot(0, BLINK_FROM_HERE); |
| 1153 if (NeedsLayout()) | 1153 if (NeedsLayout()) |
| 1154 UpdateLayout(); | 1154 UpdateLayout(); |
| 1155 } | 1155 } |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 void FrameView::UpdateLayout() { | 1158 void FrameView::UpdateLayout() { |
| 1159 // We should never layout a Document which is not in a LocalFrame. | 1159 // We should never layout a Document which is not in a LocalFrame. |
| 1160 DCHECK(frame_); | 1160 DCHECK(frame_); |
| 1161 DCHECK(frame_->View() == this); | 1161 DCHECK_EQ(frame_->View(), this); |
| 1162 DCHECK(frame_->GetPage()); | 1162 DCHECK(frame_->GetPage()); |
| 1163 | 1163 |
| 1164 ScriptForbiddenScope forbid_script; | 1164 ScriptForbiddenScope forbid_script; |
| 1165 | 1165 |
| 1166 if (IsInPerformLayout() || ShouldThrottleRendering() || | 1166 if (IsInPerformLayout() || ShouldThrottleRendering() || |
| 1167 !frame_->GetDocument()->IsActive()) | 1167 !frame_->GetDocument()->IsActive()) |
| 1168 return; | 1168 return; |
| 1169 | 1169 |
| 1170 TRACE_EVENT0("blink,benchmark", "FrameView::layout"); | 1170 TRACE_EVENT0("blink,benchmark", "FrameView::layout"); |
| 1171 | 1171 |
| (...skipping 4227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5399 void FrameView::SetAnimationHost( | 5399 void FrameView::SetAnimationHost( |
| 5400 std::unique_ptr<CompositorAnimationHost> host) { | 5400 std::unique_ptr<CompositorAnimationHost> host) { |
| 5401 animation_host_ = std::move(host); | 5401 animation_host_ = std::move(host); |
| 5402 } | 5402 } |
| 5403 | 5403 |
| 5404 LayoutUnit FrameView::CaretWidth() const { | 5404 LayoutUnit FrameView::CaretWidth() const { |
| 5405 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5405 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
| 5406 } | 5406 } |
| 5407 | 5407 |
| 5408 } // namespace blink | 5408 } // namespace blink |
| OLD | NEW |