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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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>
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
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
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