Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2137013003: Output object paint invalidation information of sub frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsRebaseline Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 { 3031 {
3032 if (!m_trackedObjectPaintInvalidations) 3032 if (!m_trackedObjectPaintInvalidations)
3033 return; 3033 return;
3034 3034
3035 ObjectPaintInvalidation invalidation = { client.debugName(), reason }; 3035 ObjectPaintInvalidation invalidation = { client.debugName(), reason };
3036 m_trackedObjectPaintInvalidations->append(invalidation); 3036 m_trackedObjectPaintInvalidations->append(invalidation);
3037 } 3037 }
3038 3038
3039 PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const 3039 PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const
3040 { 3040 {
3041 if (!m_trackedObjectPaintInvalidations || m_trackedObjectPaintInvalidations- >isEmpty()) 3041 if (!m_trackedObjectPaintInvalidations)
3042 return nullptr; 3042 return nullptr;
3043 3043
3044 RefPtr<JSONArray> result = JSONArray::create(); 3044 RefPtr<JSONArray> result = JSONArray::create();
3045 for (const auto& item : *m_trackedObjectPaintInvalidations) { 3045 for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().trav erseNext()) {
3046 RefPtr<JSONObject> itemJSON = JSONObject::create(); 3046 if (!frame->isLocalFrame())
3047 itemJSON->setString("object", item.name); 3047 continue;
3048 itemJSON->setString("reason", paintInvalidationReasonToString(item.reaso n)); 3048 if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem() ) {
3049 result->pushObject(itemJSON); 3049 for (const auto& item : *layoutView.frameView()->m_trackedObjectPain tInvalidations) {
3050 RefPtr<JSONObject> itemJSON = JSONObject::create();
3051 itemJSON->setString("object", item.name);
3052 itemJSON->setString("reason", paintInvalidationReasonToString(it em.reason));
3053 result->pushObject(itemJSON);
3054 }
3055 }
3050 } 3056 }
3051 return result; 3057 return result;
3052 } 3058 }
3053 3059
3054 void FrameView::addResizerArea(LayoutBox& resizerBox) 3060 void FrameView::addResizerArea(LayoutBox& resizerBox)
3055 { 3061 {
3056 if (!m_resizerAreas) 3062 if (!m_resizerAreas)
3057 m_resizerAreas = wrapUnique(new ResizerAreaSet); 3063 m_resizerAreas = wrapUnique(new ResizerAreaSet);
3058 m_resizerAreas->add(&resizerBox); 3064 m_resizerAreas->add(&resizerBox);
3059 } 3065 }
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
4258 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4264 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4259 } 4265 }
4260 4266
4261 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4267 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4262 { 4268 {
4263 ASSERT(!layoutViewItem().isNull()); 4269 ASSERT(!layoutViewItem().isNull());
4264 return *layoutView(); 4270 return *layoutView();
4265 } 4271 }
4266 4272
4267 } // namespace blink 4273 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698