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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTextFragment.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/LayoutTextFragment.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextFragment.h b/third_party/WebKit/Source/core/layout/LayoutTextFragment.h
index ea1b4d4bfa4593ed287432cf11cfebd50d474fc9..deff713337fd9ee70d16e0e8ba012fa517f1b025 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextFragment.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTextFragment.h
@@ -50,6 +50,12 @@ class LayoutTextFragment final : public LayoutText {
unsigned length);
bool isTextFragment() const override { return true; }
+ char objectSize() const override { return sizeof(this); }
+ char approximateHeapMemoryUsage() const override {
+ int memory = LayoutText::approximateHeapMemoryUsage();
+ // TODO(pdr): Include memory from m_contentString?
+ return memory;
+ }
bool canBeSelectionLeaf() const override {
return node() && hasEditableStyle(*node());

Powered by Google App Engine
This is Rietveld 408576698