| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index fa8b38802cb6b0846b7f5ea4280e7666a3efba79..e00f51476cdb872eb478c6c3c7e89273fa6f09c9 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -3038,15 +3038,21 @@ void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
|
|
|
| PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const
|
| {
|
| - if (!m_trackedObjectPaintInvalidations || m_trackedObjectPaintInvalidations->isEmpty())
|
| + if (!m_trackedObjectPaintInvalidations)
|
| return nullptr;
|
|
|
| RefPtr<JSONArray> result = JSONArray::create();
|
| - for (const auto& item : *m_trackedObjectPaintInvalidations) {
|
| - RefPtr<JSONObject> itemJSON = JSONObject::create();
|
| - itemJSON->setString("object", item.name);
|
| - itemJSON->setString("reason", paintInvalidationReasonToString(item.reason));
|
| - result->pushObject(itemJSON);
|
| + for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().traverseNext()) {
|
| + if (!frame->isLocalFrame())
|
| + continue;
|
| + if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()) {
|
| + for (const auto& item : *layoutView.frameView()->m_trackedObjectPaintInvalidations) {
|
| + RefPtr<JSONObject> itemJSON = JSONObject::create();
|
| + itemJSON->setString("object", item.name);
|
| + itemJSON->setString("reason", paintInvalidationReasonToString(item.reason));
|
| + result->pushObject(itemJSON);
|
| + }
|
| + }
|
| }
|
| return result;
|
| }
|
|
|