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

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

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 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 21 matching lines...) Expand all
32 #include "core/layout/LayoutBlock.h" 32 #include "core/layout/LayoutBlock.h"
33 #include "core/layout/LayoutFlexibleBox.h" 33 #include "core/layout/LayoutFlexibleBox.h"
34 #include "core/layout/LayoutGeometryMap.h" 34 #include "core/layout/LayoutGeometryMap.h"
35 #include "core/layout/LayoutInline.h" 35 #include "core/layout/LayoutInline.h"
36 #include "core/layout/LayoutView.h" 36 #include "core/layout/LayoutView.h"
37 #include "core/layout/compositing/CompositedLayerMapping.h" 37 #include "core/layout/compositing/CompositedLayerMapping.h"
38 #include "core/layout/compositing/PaintLayerCompositor.h" 38 #include "core/layout/compositing/PaintLayerCompositor.h"
39 #include "core/paint/PaintLayer.h" 39 #include "core/paint/PaintLayer.h"
40 #include "core/style/ShadowList.h" 40 #include "core/style/ShadowList.h"
41 #include "platform/LengthFunctions.h" 41 #include "platform/LengthFunctions.h"
42 #include "wtf/PtrUtil.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class FloatStateForStyleChange { 46 class FloatStateForStyleChange {
46 public: 47 public:
47 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating) 48 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating)
48 { 49 {
49 s_wasFloating = wasFloating; 50 s_wasFloating = wasFloating;
50 s_boxModelObject = boxModelObject; 51 s_boxModelObject = boxModelObject;
51 } 52 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // input as if we have saved constraints for this layer they were saved 320 // input as if we have saved constraints for this layer they were saved
320 // in the previous frame. 321 // in the previous frame.
321 DisableCompositingQueryAsserts disabler; 322 DisableCompositingQueryAsserts disabler;
322 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ()) 323 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ())
323 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts(); 324 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts();
324 } 325 }
325 326
326 void LayoutBoxModelObject::createLayer() 327 void LayoutBoxModelObject::createLayer()
327 { 328 {
328 ASSERT(!m_layer); 329 ASSERT(!m_layer);
329 m_layer = adoptPtr(new PaintLayer(this)); 330 m_layer = wrapUnique(new PaintLayer(this));
330 setHasLayer(true); 331 setHasLayer(true);
331 m_layer->insertOnlyThisLayerAfterStyleChange(); 332 m_layer->insertOnlyThisLayerAfterStyleChange();
332 } 333 }
333 334
334 void LayoutBoxModelObject::destroyLayer() 335 void LayoutBoxModelObject::destroyLayer()
335 { 336 {
336 setHasLayer(false); 337 setHasLayer(false);
337 m_layer = nullptr; 338 m_layer = nullptr;
338 } 339 }
339 340
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 if (rootElementStyle->hasBackground()) 1112 if (rootElementStyle->hasBackground())
1112 return false; 1113 return false;
1113 1114
1114 if (node() != document().firstBodyElement()) 1115 if (node() != document().firstBodyElement())
1115 return false; 1116 return false;
1116 1117
1117 return true; 1118 return true;
1118 } 1119 }
1119 1120
1120 } // namespace blink 1121 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698