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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 value->SetInteger( | 1090 value->SetInteger( |
1091 "approximateBlankCharacterCount", | 1091 "approximateBlankCharacterCount", |
1092 FontFaceSet::ApproximateBlankCharacterCount(*frame_->GetDocument())); | 1092 FontFaceSet::ApproximateBlankCharacterCount(*frame_->GetDocument())); |
1093 return value; | 1093 return value; |
1094 } | 1094 } |
1095 | 1095 |
1096 #define PERFORM_LAYOUT_TRACE_CATEGORIES \ | 1096 #define PERFORM_LAYOUT_TRACE_CATEGORIES \ |
1097 "blink,benchmark,rail," TRACE_DISABLED_BY_DEFAULT("blink.debug.layout") | 1097 "blink,benchmark,rail," TRACE_DISABLED_BY_DEFAULT("blink.debug.layout") |
1098 | 1098 |
1099 void FrameView::PerformLayout(bool in_subtree_layout) { | 1099 void FrameView::PerformLayout(bool in_subtree_layout) { |
1100 ASSERT(in_subtree_layout || layout_subtree_root_list_.IsEmpty()); | 1100 DCHECK(in_subtree_layout || layout_subtree_root_list_.IsEmpty()); |
1101 | 1101 |
1102 int contents_height_before_layout = | 1102 int contents_height_before_layout = |
1103 GetLayoutViewItem().DocumentRect().Height(); | 1103 GetLayoutViewItem().DocumentRect().Height(); |
1104 TRACE_EVENT_BEGIN1(PERFORM_LAYOUT_TRACE_CATEGORIES, | 1104 TRACE_EVENT_BEGIN1(PERFORM_LAYOUT_TRACE_CATEGORIES, |
1105 "FrameView::performLayout", "contentsHeightBeforeLayout", | 1105 "FrameView::performLayout", "contentsHeightBeforeLayout", |
1106 contents_height_before_layout); | 1106 contents_height_before_layout); |
1107 PrepareLayoutAnalyzer(); | 1107 PrepareLayoutAnalyzer(); |
1108 | 1108 |
1109 ScriptForbiddenScope forbid_script; | 1109 ScriptForbiddenScope forbid_script; |
1110 | 1110 |
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3264 | 3264 |
3265 ForAllNonThrottledFrameViews([](FrameView& frame_view) { | 3265 ForAllNonThrottledFrameViews([](FrameView& frame_view) { |
3266 frame_view.Lifecycle().AdvanceTo(DocumentLifecycle::kPrePaintClean); | 3266 frame_view.Lifecycle().AdvanceTo(DocumentLifecycle::kPrePaintClean); |
3267 }); | 3267 }); |
3268 } | 3268 } |
3269 | 3269 |
3270 void FrameView::PaintTree() { | 3270 void FrameView::PaintTree() { |
3271 TRACE_EVENT0("blink", "FrameView::paintTree"); | 3271 TRACE_EVENT0("blink", "FrameView::paintTree"); |
3272 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); | 3272 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); |
3273 | 3273 |
3274 ASSERT(GetFrame() == GetPage()->MainFrame() || | 3274 DCHECK(GetFrame() == GetPage()->MainFrame() || |
3275 (!GetFrame().Tree().Parent()->IsLocalFrame())); | 3275 (!GetFrame().Tree().Parent()->IsLocalFrame())); |
3276 | 3276 |
3277 LayoutViewItem view = GetLayoutViewItem(); | 3277 LayoutViewItem view = GetLayoutViewItem(); |
3278 DCHECK(!view.IsNull()); | 3278 DCHECK(!view.IsNull()); |
3279 ForAllNonThrottledFrameViews([](FrameView& frame_view) { | 3279 ForAllNonThrottledFrameViews([](FrameView& frame_view) { |
3280 frame_view.Lifecycle().AdvanceTo(DocumentLifecycle::kInPaint); | 3280 frame_view.Lifecycle().AdvanceTo(DocumentLifecycle::kInPaint); |
3281 }); | 3281 }); |
3282 | 3282 |
3283 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 3283 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
3284 if (GetLayoutView()->Layer()->NeedsRepaint()) { | 3284 if (GetLayoutView()->Layer()->NeedsRepaint()) { |
(...skipping 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5424 void FrameView::SetAnimationHost( | 5424 void FrameView::SetAnimationHost( |
5425 std::unique_ptr<CompositorAnimationHost> host) { | 5425 std::unique_ptr<CompositorAnimationHost> host) { |
5426 animation_host_ = std::move(host); | 5426 animation_host_ = std::move(host); |
5427 } | 5427 } |
5428 | 5428 |
5429 LayoutUnit FrameView::CaretWidth() const { | 5429 LayoutUnit FrameView::CaretWidth() const { |
5430 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5430 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5431 } | 5431 } |
5432 | 5432 |
5433 } // namespace blink | 5433 } // namespace blink |
OLD | NEW |