| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class FlexItem; | 40 class FlexItem; |
| 41 | 41 |
| 42 class CORE_EXPORT LayoutFlexibleBox : public LayoutBlock { | 42 class CORE_EXPORT LayoutFlexibleBox : public LayoutBlock { |
| 43 public: | 43 public: |
| 44 LayoutFlexibleBox(Element*); | 44 LayoutFlexibleBox(Element*); |
| 45 ~LayoutFlexibleBox() override; | 45 ~LayoutFlexibleBox() override; |
| 46 | 46 |
| 47 static LayoutFlexibleBox* createAnonymous(Document*); | 47 static LayoutFlexibleBox* createAnonymous(Document*); |
| 48 | 48 |
| 49 const char* name() const override { return "LayoutFlexibleBox"; } | 49 const char* name() const override { return "LayoutFlexibleBox"; } |
| 50 char objectSize() const override { return sizeof(this); } |
| 51 char approximateHeapMemoryUsage() const override { |
| 52 int memory = LayoutBlock::approximateHeapMemoryUsage(); |
| 53 // TODO(pdr): Include memory from m_intrinsicSizeAlongMainAxis. |
| 54 // TODO(pdr): Include memory from m_relaidOutChildren |
| 55 return memory; |
| 56 } |
| 50 | 57 |
| 51 bool isFlexibleBox() const final { return true; } | 58 bool isFlexibleBox() const final { return true; } |
| 52 void layoutBlock(bool relayoutChildren) final; | 59 void layoutBlock(bool relayoutChildren) final; |
| 53 | 60 |
| 54 int baselinePosition( | 61 int baselinePosition( |
| 55 FontBaseline, | 62 FontBaseline, |
| 56 bool firstLine, | 63 bool firstLine, |
| 57 LineDirectionMode, | 64 LineDirectionMode, |
| 58 LinePositionMode = PositionOnContainingLine) const override; | 65 LinePositionMode = PositionOnContainingLine) const override; |
| 59 int firstLineBoxBaseline() const override; | 66 int firstLineBoxBaseline() const override; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // This is SizeIsUnknown outside of layoutBlock() | 259 // This is SizeIsUnknown outside of layoutBlock() |
| 253 mutable SizeDefiniteness m_hasDefiniteHeight; | 260 mutable SizeDefiniteness m_hasDefiniteHeight; |
| 254 bool m_inLayout; | 261 bool m_inLayout; |
| 255 }; | 262 }; |
| 256 | 263 |
| 257 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 264 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
| 258 | 265 |
| 259 } // namespace blink | 266 } // namespace blink |
| 260 | 267 |
| 261 #endif // LayoutFlexibleBox_h | 268 #endif // LayoutFlexibleBox_h |
| OLD | NEW |