| 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> |
| 33 | 35 |
| 34 namespace blink { | 36 namespace blink { |
| 35 | 37 |
| 36 class LineLayoutBoxModel; | 38 class LineLayoutBoxModel; |
| 37 class PaintLayer; | 39 class PaintLayer; |
| 38 class PaintLayerScrollableArea; | 40 class PaintLayerScrollableArea; |
| 39 | 41 |
| 40 enum PaintLayerType { | 42 enum PaintLayerType { |
| 41 NoPaintLayer, | 43 NoPaintLayer, |
| 42 NormalPaintLayer, | 44 NormalPaintLayer, |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 369 |
| 368 private: | 370 private: |
| 369 void createLayer(); | 371 void createLayer(); |
| 370 | 372 |
| 371 LayoutUnit computedCSSPadding(const Length&) const; | 373 LayoutUnit computedCSSPadding(const Length&) const; |
| 372 bool isBoxModelObject() const final { return true; } | 374 bool isBoxModelObject() const final { return true; } |
| 373 | 375 |
| 374 LayoutBoxModelObjectRareData& ensureRareData() | 376 LayoutBoxModelObjectRareData& ensureRareData() |
| 375 { | 377 { |
| 376 if (!m_rareData) | 378 if (!m_rareData) |
| 377 m_rareData = adoptPtr(new LayoutBoxModelObjectRareData()); | 379 m_rareData = wrapUnique(new LayoutBoxModelObjectRareData()); |
| 378 return *m_rareData.get(); | 380 return *m_rareData.get(); |
| 379 } | 381 } |
| 380 | 382 |
| 381 // The PaintLayer associated with this object. | 383 // The PaintLayer associated with this object. |
| 382 // |m_layer| can be nullptr depending on the return value of layerTypeRequir
ed(). | 384 // |m_layer| can be nullptr depending on the return value of layerTypeRequir
ed(). |
| 383 OwnPtr<PaintLayer> m_layer; | 385 std::unique_ptr<PaintLayer> m_layer; |
| 384 | 386 |
| 385 OwnPtr<LayoutBoxModelObjectRareData> m_rareData; | 387 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; |
| 386 }; | 388 }; |
| 387 | 389 |
| 388 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); | 390 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); |
| 389 | 391 |
| 390 } // namespace blink | 392 } // namespace blink |
| 391 | 393 |
| 392 #endif // LayoutBoxModelObject_h | 394 #endif // LayoutBoxModelObject_h |
| OLD | NEW |