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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 * 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
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 365
364 private: 366 private:
365 void createLayer(); 367 void createLayer();
366 368
367 LayoutUnit computedCSSPadding(const Length&) const; 369 LayoutUnit computedCSSPadding(const Length&) const;
368 bool isBoxModelObject() const final { return true; } 370 bool isBoxModelObject() const final { return true; }
369 371
370 LayoutBoxModelObjectRareData& ensureRareData() 372 LayoutBoxModelObjectRareData& ensureRareData()
371 { 373 {
372 if (!m_rareData) 374 if (!m_rareData)
373 m_rareData = adoptPtr(new LayoutBoxModelObjectRareData()); 375 m_rareData = wrapUnique(new LayoutBoxModelObjectRareData());
374 return *m_rareData.get(); 376 return *m_rareData.get();
375 } 377 }
376 378
377 // The PaintLayer associated with this object. 379 // The PaintLayer associated with this object.
378 // |m_layer| can be nullptr depending on the return value of layerTypeRequir ed(). 380 // |m_layer| can be nullptr depending on the return value of layerTypeRequir ed().
379 OwnPtr<PaintLayer> m_layer; 381 std::unique_ptr<PaintLayer> m_layer;
380 382
381 OwnPtr<LayoutBoxModelObjectRareData> m_rareData; 383 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData;
382 }; 384 };
383 385
384 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); 386 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject());
385 387
386 } // namespace blink 388 } // namespace blink
387 389
388 #endif // LayoutBoxModelObject_h 390 #endif // LayoutBoxModelObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698