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

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

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter 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/LayoutFlexibleBox.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
index 38f2c5f04b1c689c72c28af49cb434eeb2ab5ebd..9c230f22a3d7402b4fc3fc6d4eae186cd5c0a8f7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.h
@@ -47,6 +47,13 @@ class CORE_EXPORT LayoutFlexibleBox : public LayoutBlock {
static LayoutFlexibleBox* createAnonymous(Document*);
const char* name() const override { return "LayoutFlexibleBox"; }
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutBlock::approximateHeapMemoryUsage();
+ // TODO(pdr): Include memory from m_intrinsicSizeAlongMainAxis.
+ // TODO(pdr): Include memory from m_relaidOutChildren
+ return memory;
+ }
bool isFlexibleBox() const final { return true; }
void layoutBlock(bool relayoutChildren) final;

Powered by Google App Engine
This is Rietveld 408576698