Chromium Code Reviews| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 835 m_analyzer->reset(); | 835 m_analyzer->reset(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 PassOwnPtr<TracedValue> FrameView::analyzerCounters() | 838 PassOwnPtr<TracedValue> FrameView::analyzerCounters() |
| 839 { | 839 { |
| 840 if (!m_analyzer) | 840 if (!m_analyzer) |
| 841 return TracedValue::create(); | 841 return TracedValue::create(); |
| 842 OwnPtr<TracedValue> value = m_analyzer->toTracedValue(); | 842 OwnPtr<TracedValue> value = m_analyzer->toTracedValue(); |
| 843 value->setString("host", layoutView()->document().location()->host()); | 843 value->setString("host", layoutView()->document().location()->host()); |
| 844 value->setString("frame", String::format("0x%" PRIxPTR, reinterpret_cast<uin tptr_t>(m_frame.get()))); | 844 value->setString("frame", String::format("0x%" PRIxPTR, reinterpret_cast<uin tptr_t>(m_frame.get()))); |
| 845 value->setInteger("contentsHeightAfterLayout", layoutView()->documentRect(). height()); | |
| 846 value->setInteger("visibleHeight", visibleHeight()); | |
| 845 return value.release(); | 847 return value.release(); |
| 846 } | 848 } |
| 847 | 849 |
| 848 #define PERFORM_LAYOUT_TRACE_CATEGORIES "blink,benchmark," TRACE_DISABLED_BY_DEF AULT("blink.debug.layout") | 850 #define PERFORM_LAYOUT_TRACE_CATEGORIES "blink,benchmark," TRACE_DISABLED_BY_DEF AULT("blink.debug.layout") |
| 849 | 851 |
| 850 void FrameView::performLayout(bool inSubtreeLayout) | 852 void FrameView::performLayout(bool inSubtreeLayout) |
| 851 { | 853 { |
| 852 ASSERT(inSubtreeLayout || m_layoutSubtreeRootList.isEmpty()); | 854 ASSERT(inSubtreeLayout || m_layoutSubtreeRootList.isEmpty()); |
| 853 | 855 |
| 854 TRACE_EVENT_BEGIN0(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayou t"); | 856 TRACE_EVENT_BEGIN1(PERFORM_LAYOUT_TRACE_CATEGORIES, "FrameView::performLayou t", "contentsHeightBeforeLayout", layoutView()->documentRect().height()); |
|
benjhayden
2016/05/09 20:00:50
newline before "contentsHeightBeforeLayout", pleas
Kunihiko Sakamoto
2016/05/10 02:12:29
Done.
| |
| 855 prepareLayoutAnalyzer(); | 857 prepareLayoutAnalyzer(); |
| 856 | 858 |
| 857 ScriptForbiddenScope forbidScript; | 859 ScriptForbiddenScope forbidScript; |
| 858 | 860 |
| 859 ASSERT(!isInPerformLayout()); | 861 ASSERT(!isInPerformLayout()); |
| 860 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout); | 862 lifecycle().advanceTo(DocumentLifecycle::InPerformLayout); |
| 861 | 863 |
| 862 // performLayout is the actual guts of layout(). | 864 // performLayout is the actual guts of layout(). |
| 863 // FIXME: The 300 other lines in layout() probably belong in other helper fu nctions | 865 // FIXME: The 300 other lines in layout() probably belong in other helper fu nctions |
| 864 // so that a single human could understand what layout() is actually doing. | 866 // so that a single human could understand what layout() is actually doing. |
| (...skipping 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4104 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4106 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
| 4105 } | 4107 } |
| 4106 | 4108 |
| 4107 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4109 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4108 { | 4110 { |
| 4109 ASSERT(layoutView()); | 4111 ASSERT(layoutView()); |
| 4110 return *layoutView(); | 4112 return *layoutView(); |
| 4111 } | 4113 } |
| 4112 | 4114 |
| 4113 } // namespace blink | 4115 } // namespace blink |
| OLD | NEW |