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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 , m_scrollbarsSuppressed(false) | 154 , m_scrollbarsSuppressed(false) |
| 155 , m_inUpdateScrollbars(false) | 155 , m_inUpdateScrollbars(false) |
| 156 , m_frameTimingRequestsDirty(true) | 156 , m_frameTimingRequestsDirty(true) |
| 157 , m_viewportIntersectionValid(false) | 157 , m_viewportIntersectionValid(false) |
| 158 , m_hiddenForThrottling(false) | 158 , m_hiddenForThrottling(false) |
| 159 , m_crossOriginForThrottling(false) | 159 , m_crossOriginForThrottling(false) |
| 160 , m_subtreeThrottled(false) | 160 , m_subtreeThrottled(false) |
| 161 , m_isUpdatingAllLifecyclePhases(false) | 161 , m_isUpdatingAllLifecyclePhases(false) |
| 162 , m_scrollAnchor(this) | 162 , m_scrollAnchor(this) |
| 163 , m_needsScrollbarsUpdate(false) | 163 , m_needsScrollbarsUpdate(false) |
| 164 , m_suppressAdjustViewSize(false) | |
| 164 { | 165 { |
| 165 ASSERT(m_frame); | 166 ASSERT(m_frame); |
| 166 init(); | 167 init(); |
| 167 } | 168 } |
| 168 | 169 |
| 169 FrameView* FrameView::create(LocalFrame* frame) | 170 FrameView* FrameView::create(LocalFrame* frame) |
| 170 { | 171 { |
| 171 FrameView* view = new FrameView(frame); | 172 FrameView* view = new FrameView(frame); |
| 172 view->show(); | 173 view->show(); |
| 173 return view; | 174 return view; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 524 return; | 525 return; |
| 525 | 526 |
| 526 updateScrollableAreaSet(); | 527 updateScrollableAreaSet(); |
| 527 | 528 |
| 528 page->chromeClient().contentsSizeChanged(m_frame.get(), size); | 529 page->chromeClient().contentsSizeChanged(m_frame.get(), size); |
| 529 frame().loader().restoreScrollPositionAndViewState(); | 530 frame().loader().restoreScrollPositionAndViewState(); |
| 530 } | 531 } |
| 531 | 532 |
| 532 void FrameView::adjustViewSize() | 533 void FrameView::adjustViewSize() |
| 533 { | 534 { |
| 535 if (m_suppressAdjustViewSize) | |
| 536 return; | |
| 537 | |
| 534 LayoutViewItem layoutViewItem = this->layoutViewItem(); | 538 LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| 535 if (layoutViewItem.isNull()) | 539 if (layoutViewItem.isNull()) |
| 536 return; | 540 return; |
| 537 | 541 |
| 538 ASSERT(m_frame->view() == this); | 542 ASSERT(m_frame->view() == this); |
| 539 | 543 |
| 540 const IntRect rect = layoutViewItem.documentRect(); | 544 const IntRect rect = layoutViewItem.documentRect(); |
| 541 const IntSize& size = rect.size(); | 545 const IntSize& size = rect.size(); |
| 542 | 546 |
| 543 const IntPoint origin(-rect.x(), -rect.y()); | 547 const IntPoint origin(-rect.x(), -rect.y()); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1032 } | 1036 } |
| 1033 | 1037 |
| 1034 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.deb ug.layout"), "LayoutTree", | 1038 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.deb ug.layout"), "LayoutTree", |
| 1035 this, TracedLayoutObject::create(*layoutView(), false)); | 1039 this, TracedLayoutObject::create(*layoutView(), false)); |
| 1036 | 1040 |
| 1037 performLayout(inSubtreeLayout); | 1041 performLayout(inSubtreeLayout); |
| 1038 | 1042 |
| 1039 ASSERT(m_layoutSubtreeRootList.isEmpty()); | 1043 ASSERT(m_layoutSubtreeRootList.isEmpty()); |
| 1040 } // Reset m_layoutSchedulingEnabled to its previous value. | 1044 } // Reset m_layoutSchedulingEnabled to its previous value. |
| 1041 | 1045 |
| 1042 if (!inSubtreeLayout && !document->printing()) | 1046 if (!inSubtreeLayout && !document->printing()) { |
| 1043 adjustViewSize(); | 1047 adjustViewSize(); |
| 1048 if (needsLayout()) { | |
| 1049 TemporaryChange<bool> suppressAdjustViewSize(m_suppressAdjustViewSiz e, true); | |
|
chrishtr
2016/05/31 19:58:15
WebViewImpl::layoutUpdated will do this layout alr
Xianzhu
2016/05/31 20:22:54
I'm using the case in crbug.com/611290. On m51, it
chrishtr
2016/05/31 20:31:38
Ok then it appears we need a more general version
Xianzhu
2016/05/31 20:54:27
I would like to investigate this but the change wo
| |
| 1050 layout(); | |
|
chrishtr
2016/05/31 20:31:38
Does it make more sense to push this down into adj
Xianzhu
2016/05/31 20:54:27
This applies to the call site in FrameView::forceL
| |
| 1051 } | |
| 1052 } | |
| 1044 | 1053 |
| 1045 m_frameTimingRequestsDirty = true; | 1054 m_frameTimingRequestsDirty = true; |
| 1046 | 1055 |
| 1047 // FIXME: Could find the common ancestor layer of all dirty subtrees and mar k from there. crbug.com/462719 | 1056 // FIXME: Could find the common ancestor layer of all dirty subtrees and mar k from there. crbug.com/462719 |
| 1048 layoutViewItem().enclosingLayer()->updateLayerPositionsAfterLayout(); | 1057 layoutViewItem().enclosingLayer()->updateLayerPositionsAfterLayout(); |
| 1049 | 1058 |
| 1050 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.debug.l ayout"), "LayoutTree", | 1059 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink.debug.l ayout"), "LayoutTree", |
| 1051 this, TracedLayoutObject::create(*layoutView(), true)); | 1060 this, TracedLayoutObject::create(*layoutView(), true)); |
| 1052 | 1061 |
| 1053 layoutViewItem().compositor()->didLayout(); | 1062 layoutViewItem().compositor()->didLayout(); |
| (...skipping 3061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4115 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); | 4124 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); |
| 4116 } | 4125 } |
| 4117 | 4126 |
| 4118 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4127 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4119 { | 4128 { |
| 4120 ASSERT(!layoutViewItem().isNull()); | 4129 ASSERT(!layoutViewItem().isNull()); |
| 4121 return *layoutView(); | 4130 return *layoutView(); |
| 4122 } | 4131 } |
| 4123 | 4132 |
| 4124 } // namespace blink | 4133 } // namespace blink |
| OLD | NEW |