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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.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 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EDisplay = EDisplay::kBlock); 222 EDisplay = EDisplay::kBlock);
223 LayoutBlock* createAnonymousBlock(EDisplay display = EDisplay::kBlock) const { 223 LayoutBlock* createAnonymousBlock(EDisplay display = EDisplay::kBlock) const {
224 return createAnonymousWithParentAndDisplay(this, display); 224 return createAnonymousWithParentAndDisplay(this, display);
225 } 225 }
226 226
227 LayoutBox* createAnonymousBoxWithSameTypeAs( 227 LayoutBox* createAnonymousBoxWithSameTypeAs(
228 const LayoutObject* parent) const override; 228 const LayoutObject* parent) const override;
229 229
230 int columnGap() const; 230 int columnGap() const;
231 231
232 char objectSize() const override { return sizeof(this); }
233
232 // Accessors for logical width/height and margins in the containing block's 234 // Accessors for logical width/height and margins in the containing block's
233 // block-flow direction. 235 // block-flow direction.
234 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { 236 LayoutUnit logicalWidthForChild(const LayoutBox& child) const {
235 return logicalWidthForChildSize(child.size()); 237 return logicalWidthForChildSize(child.size());
236 } 238 }
237 LayoutUnit logicalWidthForChildSize(LayoutSize childSize) const { 239 LayoutUnit logicalWidthForChildSize(LayoutSize childSize) const {
238 return isHorizontalWritingMode() ? childSize.width() : childSize.height(); 240 return isHorizontalWritingMode() ? childSize.width() : childSize.height();
239 } 241 }
240 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { 242 LayoutUnit logicalHeightForChild(const LayoutBox& child) const {
241 return isHorizontalWritingMode() ? child.size().height() 243 return isHorizontalWritingMode() ? child.size().height()
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // TODO(lunalu): Temporary in order to ensure compatibility with existing 566 // TODO(lunalu): Temporary in order to ensure compatibility with existing
565 // layout test results. 567 // layout test results.
566 virtual void adjustChildDebugRect(LayoutRect&) const {} 568 virtual void adjustChildDebugRect(LayoutRect&) const {}
567 }; 569 };
568 570
569 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 571 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
570 572
571 } // namespace blink 573 } // namespace blink
572 574
573 #endif // LayoutBlock_h 575 #endif // LayoutBlock_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBR.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698