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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.h

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 private: 233 private:
234 LayoutObjectChildList* virtualChildren() final { return children(); } 234 LayoutObjectChildList* virtualChildren() final { return children(); }
235 const LayoutObjectChildList* virtualChildren() const final { 235 const LayoutObjectChildList* virtualChildren() const final {
236 return children(); 236 return children();
237 } 237 }
238 const LayoutObjectChildList* children() const { return &m_children; } 238 const LayoutObjectChildList* children() const { return &m_children; }
239 LayoutObjectChildList* children() { return &m_children; } 239 LayoutObjectChildList* children() { return &m_children; }
240 240
241 bool isLayoutInline() const final { return true; } 241 bool isLayoutInline() const final { return true; }
242 char objectSize() const override { return sizeof(this); }
243 char approximateHeapMemoryUsage() const override {
244 int memory = LayoutBoxModelObject::approximateHeapMemoryUsage();
245 // TODO(pdr): Include the line box list (m_lineBoxes) memory.
246 return memory;
247 }
242 248
243 LayoutRect culledInlineVisualOverflowBoundingBox() const; 249 LayoutRect culledInlineVisualOverflowBoundingBox() const;
244 InlineBox* culledInlineFirstLineBox() const; 250 InlineBox* culledInlineFirstLineBox() const;
245 InlineBox* culledInlineLastLineBox() const; 251 InlineBox* culledInlineLastLineBox() const;
246 252
247 // For visualOverflowRect() only, to get bounding box of visual overflow of 253 // For visualOverflowRect() only, to get bounding box of visual overflow of
248 // line boxes. 254 // line boxes.
249 LayoutRect linesVisualOverflowBoundingBox() const; 255 LayoutRect linesVisualOverflowBoundingBox() const;
250 256
251 template <typename GeneratorContext> 257 template <typename GeneratorContext>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // All of the line boxes created for this inline flow. For example, 352 // All of the line boxes created for this inline flow. For example,
347 // <i>Hello<br>world.</i> will have two <i> line boxes. 353 // <i>Hello<br>world.</i> will have two <i> line boxes.
348 LineBoxList m_lineBoxes; 354 LineBoxList m_lineBoxes;
349 }; 355 };
350 356
351 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline()); 357 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline());
352 358
353 } // namespace blink 359 } // namespace blink
354 360
355 #endif // LayoutInline_h 361 #endif // LayoutInline_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImage.h ('k') | third_party/WebKit/Source/core/layout/LayoutListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698