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

Unified 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 side-by-side diff with in-line comments
Download patch
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;
}
« 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