| 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 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3121 checkDoesNotNeedLayout(); | 3121 checkDoesNotNeedLayout(); |
| 3122 | 3122 |
| 3123 // FIXME: Calling layout() shouldn't trigger script execution or have any | 3123 // FIXME: Calling layout() shouldn't trigger script execution or have any |
| 3124 // observable effects on the frame tree but we're not quite there yet. | 3124 // observable effects on the frame tree but we're not quite there yet. |
| 3125 HeapVector<Member<FrameView>> frameViews; | 3125 HeapVector<Member<FrameView>> frameViews; |
| 3126 for (Frame* child = m_frame->tree().firstChild(); child; | 3126 for (Frame* child = m_frame->tree().firstChild(); child; |
| 3127 child = child->tree().nextSibling()) { | 3127 child = child->tree().nextSibling()) { |
| 3128 if (!child->isLocalFrame()) | 3128 if (!child->isLocalFrame()) |
| 3129 continue; | 3129 continue; |
| 3130 if (FrameView* view = toLocalFrame(child)->view()) | 3130 if (FrameView* view = toLocalFrame(child)->view()) |
| 3131 frameViews.append(view); | 3131 frameViews.push_back(view); |
| 3132 } | 3132 } |
| 3133 | 3133 |
| 3134 for (const auto& frameView : frameViews) | 3134 for (const auto& frameView : frameViews) |
| 3135 frameView->updateStyleAndLayoutIfNeededRecursiveInternal(); | 3135 frameView->updateStyleAndLayoutIfNeededRecursiveInternal(); |
| 3136 | 3136 |
| 3137 // These asserts ensure that parent frames are clean, when child frames | 3137 // These asserts ensure that parent frames are clean, when child frames |
| 3138 // finished updating layout and style. | 3138 // finished updating layout and style. |
| 3139 checkDoesNotNeedLayout(); | 3139 checkDoesNotNeedLayout(); |
| 3140 #if DCHECK_IS_ON() | 3140 #if DCHECK_IS_ON() |
| 3141 m_frame->document()->layoutView()->assertLaidOut(); | 3141 m_frame->document()->layoutView()->assertLaidOut(); |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 TRACE_EVENT_SCOPE_GLOBAL, "enabled", | 3463 TRACE_EVENT_SCOPE_GLOBAL, "enabled", |
| 3464 trackPaintInvalidations); | 3464 trackPaintInvalidations); |
| 3465 } | 3465 } |
| 3466 | 3466 |
| 3467 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, | 3467 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, |
| 3468 PaintInvalidationReason reason) { | 3468 PaintInvalidationReason reason) { |
| 3469 if (!m_trackedObjectPaintInvalidations) | 3469 if (!m_trackedObjectPaintInvalidations) |
| 3470 return; | 3470 return; |
| 3471 | 3471 |
| 3472 ObjectPaintInvalidation invalidation = {client.debugName(), reason}; | 3472 ObjectPaintInvalidation invalidation = {client.debugName(), reason}; |
| 3473 m_trackedObjectPaintInvalidations->append(invalidation); | 3473 m_trackedObjectPaintInvalidations->push_back(invalidation); |
| 3474 } | 3474 } |
| 3475 | 3475 |
| 3476 std::unique_ptr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() | 3476 std::unique_ptr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() |
| 3477 const { | 3477 const { |
| 3478 if (!m_trackedObjectPaintInvalidations) | 3478 if (!m_trackedObjectPaintInvalidations) |
| 3479 return nullptr; | 3479 return nullptr; |
| 3480 | 3480 |
| 3481 std::unique_ptr<JSONArray> result = JSONArray::create(); | 3481 std::unique_ptr<JSONArray> result = JSONArray::create(); |
| 3482 for (Frame* frame = m_frame->tree().top(); frame; | 3482 for (Frame* frame = m_frame->tree().top(); frame; |
| 3483 frame = frame->tree().traverseNext()) { | 3483 frame = frame->tree().traverseNext()) { |
| (...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4698 DCHECK(m_frame->isMainFrame()); | 4698 DCHECK(m_frame->isMainFrame()); |
| 4699 return m_initialViewportSize.width(); | 4699 return m_initialViewportSize.width(); |
| 4700 } | 4700 } |
| 4701 | 4701 |
| 4702 int FrameView::initialViewportHeight() const { | 4702 int FrameView::initialViewportHeight() const { |
| 4703 DCHECK(m_frame->isMainFrame()); | 4703 DCHECK(m_frame->isMainFrame()); |
| 4704 return m_initialViewportSize.height(); | 4704 return m_initialViewportSize.height(); |
| 4705 } | 4705 } |
| 4706 | 4706 |
| 4707 } // namespace blink | 4707 } // namespace blink |
| OLD | NEW |