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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // (see 'border-collapse'). 81 // (see 'border-collapse').
82 // Also there is no margin on table cell (or any internal table element). 82 // Also there is no margin on table cell (or any internal table element).
83 // 83 //
84 // LayoutTableCell is positioned with respect to the enclosing 84 // LayoutTableCell is positioned with respect to the enclosing
85 // LayoutTableSection. See callers of 85 // LayoutTableSection. See callers of
86 // LayoutTableSection::setLogicalPositionForCell() for when it is placed. 86 // LayoutTableSection::setLogicalPositionForCell() for when it is placed.
87 class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow { 87 class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
88 public: 88 public:
89 explicit LayoutTableCell(Element*); 89 explicit LayoutTableCell(Element*);
90 90
91 char objectSize() const override { return sizeof(this); }
92 char approximateHeapMemoryUsage() const override {
93 int memory = LayoutBlockFlow::approximateHeapMemoryUsage();
94 if (m_collapsedBorderValues)
95 memory += sizeof(CollapsedBorderValues);
96 if (m_rowBackgroundDisplayItemClient)
97 memory += sizeof(RowBackgroundDisplayItemClient);
98 return memory;
99 }
100
91 unsigned colSpan() const { 101 unsigned colSpan() const {
92 if (!m_hasColSpan) 102 if (!m_hasColSpan)
93 return 1; 103 return 1;
94 return parseColSpanFromDOM(); 104 return parseColSpanFromDOM();
95 } 105 }
96 unsigned rowSpan() const { 106 unsigned rowSpan() const {
97 if (!m_hasRowSpan) 107 if (!m_hasRowSpan)
98 return 1; 108 return 1;
99 return parseRowSpanFromDOM(); 109 return parseRowSpanFromDOM();
100 } 110 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return toLayoutTableCell(firstChild()); 481 return toLayoutTableCell(firstChild());
472 } 482 }
473 483
474 inline LayoutTableCell* LayoutTableRow::lastCell() const { 484 inline LayoutTableCell* LayoutTableRow::lastCell() const {
475 return toLayoutTableCell(lastChild()); 485 return toLayoutTableCell(lastChild());
476 } 486 }
477 487
478 } // namespace blink 488 } // namespace blink
479 489
480 #endif // LayoutTableCell_h 490 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCaption.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698