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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

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/layout/LayoutBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index aca950dfdaef5226338fab9bb65e51c04b10e851..6f633aa628e0315c378b70d36a6ec68d51caf142 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -109,6 +109,8 @@ struct LayoutBoxRareData {
LayoutRect m_previousLayoutOverflowRect;
};
+CORE_EXPORT int* rareDataReasonCounts();
+
// LayoutBox implements the full CSS box model.
//
// LayoutBoxModelObject only introduces some abstractions for LayoutInline and
@@ -198,6 +200,7 @@ struct LayoutBoxRareData {
// (e.g. the overflows). Thus it is paramount to know which box a function is
// manipulating. Also of critical importance is the coordinate system used (see
// the COORDINATE SYSTEMS section in LayoutBoxModelObject).
+
class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
public:
explicit LayoutBox(ContainerNode*);
@@ -1555,6 +1558,7 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
LayoutBoxRareData& ensureRareData() {
if (!m_rareData)
m_rareData = WTF::makeUnique<LayoutBoxRareData>();
+ m_rareStat.addReason(ReasonLBRareData);
return *m_rareData.get();
}
@@ -1694,6 +1698,8 @@ inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper) {
}
m_inlineBoxWrapper = boxWrapper;
+ if (boxWrapper)
+ m_rareStat.addReason(ReasonLBInlineBoxWrapper);
}
inline bool LayoutBox::isForcedFragmentainerBreakValue(
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698