| OLD | NEW |
| 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, 2006, 2007, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #ifndef LayoutBoxModelObject_h | 24 #ifndef LayoutBoxModelObject_h |
| 25 #define LayoutBoxModelObject_h | 25 #define LayoutBoxModelObject_h |
| 26 | 26 |
| 27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
| 28 #include "core/layout/BackgroundBleedAvoidance.h" | 28 #include "core/layout/BackgroundBleedAvoidance.h" |
| 29 #include "core/layout/ContentChangeType.h" | 29 #include "core/layout/ContentChangeType.h" |
| 30 #include "core/layout/LayoutObject.h" | 30 #include "core/layout/LayoutObject.h" |
| 31 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" | 31 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" |
| 32 #include "platform/geometry/LayoutRect.h" | 32 #include "platform/geometry/LayoutRect.h" |
| 33 #include "wtf/PtrUtil.h" | |
| 34 #include <memory> | |
| 35 | 33 |
| 36 namespace blink { | 34 namespace blink { |
| 37 | 35 |
| 38 class LineLayoutBoxModel; | 36 class LineLayoutBoxModel; |
| 39 class PaintLayer; | 37 class PaintLayer; |
| 40 class PaintLayerScrollableArea; | 38 class PaintLayerScrollableArea; |
| 41 | 39 |
| 42 enum PaintLayerType { | 40 enum PaintLayerType { |
| 43 NoPaintLayer, | 41 NoPaintLayer, |
| 44 NormalPaintLayer, | 42 NormalPaintLayer, |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 363 |
| 366 private: | 364 private: |
| 367 void createLayer(); | 365 void createLayer(); |
| 368 | 366 |
| 369 LayoutUnit computedCSSPadding(const Length&) const; | 367 LayoutUnit computedCSSPadding(const Length&) const; |
| 370 bool isBoxModelObject() const final { return true; } | 368 bool isBoxModelObject() const final { return true; } |
| 371 | 369 |
| 372 LayoutBoxModelObjectRareData& ensureRareData() | 370 LayoutBoxModelObjectRareData& ensureRareData() |
| 373 { | 371 { |
| 374 if (!m_rareData) | 372 if (!m_rareData) |
| 375 m_rareData = wrapUnique(new LayoutBoxModelObjectRareData()); | 373 m_rareData = adoptPtr(new LayoutBoxModelObjectRareData()); |
| 376 return *m_rareData.get(); | 374 return *m_rareData.get(); |
| 377 } | 375 } |
| 378 | 376 |
| 379 // The PaintLayer associated with this object. | 377 // The PaintLayer associated with this object. |
| 380 // |m_layer| can be nullptr depending on the return value of layerTypeRequir
ed(). | 378 // |m_layer| can be nullptr depending on the return value of layerTypeRequir
ed(). |
| 381 std::unique_ptr<PaintLayer> m_layer; | 379 OwnPtr<PaintLayer> m_layer; |
| 382 | 380 |
| 383 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; | 381 OwnPtr<LayoutBoxModelObjectRareData> m_rareData; |
| 384 }; | 382 }; |
| 385 | 383 |
| 386 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); | 384 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); |
| 387 | 385 |
| 388 } // namespace blink | 386 } // namespace blink |
| 389 | 387 |
| 390 #endif // LayoutBoxModelObject_h | 388 #endif // LayoutBoxModelObject_h |
| OLD | NEW |