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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp

Issue 1577433003: Statistics of LayoutBox rare data reasons Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 3 years, 9 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/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 256b397caaf59cb537cd978413d18291e05fb323..c31900d30c0e5357eb5135dab45c42c0980d6112 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -442,6 +442,18 @@ void ObjectPaintInvalidator::setLocationInBacking(const LayoutPoint& location) {
} else {
locationInBackingMap().set(&m_object, location);
m_object.getMutableForPainting().setHasPreviousLocationInBacking(true);
+ m_object.m_rareStat.addReason(ReasonLOPreviousLocation);
+
+ if (m_object.visualRect().isEmpty())
+ m_object.m_rareStat.addReason(ReasonLocationOffsetObject);
+ if (m_object.isBox())
+ m_object.m_rareStat.addReason(ReasonLocationOffsetBox);
+ if (m_object.isText())
+ m_object.m_rareStat.addReason(ReasonLocationOffsetText);
+ if (m_object.isLayoutInline())
+ m_object.m_rareStat.addReason(ReasonLocationOffsetInline);
+ if (m_object.isSVG())
+ m_object.m_rareStat.addReason(ReasonLocationOffsetSVG);
}
}

Powered by Google App Engine
This is Rietveld 408576698