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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.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-2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return child.y() + marginBeforeForChild(*child.layoutObject()); 342 return child.y() + marginBeforeForChild(*child.layoutObject());
343 343
344 return child.y() + child.layoutObject()->marginTop(); 344 return child.y() + child.layoutObject()->marginTop();
345 } 345 }
346 346
347 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject&, 347 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject&,
348 const LayoutPoint&) const; 348 const LayoutPoint&) const;
349 349
350 const char* name() const override { return "LayoutBlockFlow"; } 350 const char* name() const override { return "LayoutBlockFlow"; }
351 351
352 char objectSize() const override { return sizeof(this); }
353 char approximateHeapMemoryUsage() const override {
354 int memory = LayoutBlock::approximateHeapMemoryUsage();
355 if (m_rareData)
356 memory += sizeof(LayoutBlockFlowRareData);
357 if (m_floatingObjects)
358 memory += sizeof(FloatingObjects);
359 return memory;
360 }
361
352 FloatingObject* insertFloatingObject(LayoutBox&); 362 FloatingObject* insertFloatingObject(LayoutBox&);
353 363
354 // Position and lay out all floats that have not yet been positioned. 364 // Position and lay out all floats that have not yet been positioned.
355 // 365 //
356 // This will mark them as "placed", which means that they have found their 366 // This will mark them as "placed", which means that they have found their
357 // final location in this layout pass. 367 // final location in this layout pass.
358 // 368 //
359 // |logicalTopMarginEdge| is the minimum logical top for the floats. The 369 // |logicalTopMarginEdge| is the minimum logical top for the floats. The
360 // final logical top of the floats will also be affected by clearance and 370 // final logical top of the floats will also be affected by clearance and
361 // space available after having positioned earlier floats. 371 // space available after having positioned earlier floats.
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 void positionDialog(); 965 void positionDialog();
956 966
957 // END METHODS DEFINED IN LayoutBlockFlowLine 967 // END METHODS DEFINED IN LayoutBlockFlowLine
958 }; 968 };
959 969
960 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 970 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
961 971
962 } // namespace blink 972 } // namespace blink
963 973
964 #endif // LayoutBlockFlow_h 974 #endif // LayoutBlockFlow_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698