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

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

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 * (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"
43 42
44 namespace blink { 43 namespace blink {
45 44
46 class FloatStateForStyleChange { 45 class FloatStateForStyleChange {
47 public: 46 public:
48 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating) 47 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating)
49 { 48 {
50 s_wasFloating = wasFloating; 49 s_wasFloating = wasFloating;
51 s_boxModelObject = boxModelObject; 50 s_boxModelObject = boxModelObject;
52 } 51 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // input as if we have saved constraints for this layer they were saved 319 // input as if we have saved constraints for this layer they were saved
321 // in the previous frame. 320 // in the previous frame.
322 DisableCompositingQueryAsserts disabler; 321 DisableCompositingQueryAsserts disabler;
323 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ()) 322 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ())
324 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts(); 323 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts();
325 } 324 }
326 325
327 void LayoutBoxModelObject::createLayer() 326 void LayoutBoxModelObject::createLayer()
328 { 327 {
329 ASSERT(!m_layer); 328 ASSERT(!m_layer);
330 m_layer = wrapUnique(new PaintLayer(this)); 329 m_layer = adoptPtr(new PaintLayer(this));
331 setHasLayer(true); 330 setHasLayer(true);
332 m_layer->insertOnlyThisLayerAfterStyleChange(); 331 m_layer->insertOnlyThisLayerAfterStyleChange();
333 } 332 }
334 333
335 void LayoutBoxModelObject::destroyLayer() 334 void LayoutBoxModelObject::destroyLayer()
336 { 335 {
337 setHasLayer(false); 336 setHasLayer(false);
338 m_layer = nullptr; 337 m_layer = nullptr;
339 } 338 }
340 339
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 if (rootElementStyle->hasBackground()) 1111 if (rootElementStyle->hasBackground())
1113 return false; 1112 return false;
1114 1113
1115 if (node() != document().firstBodyElement()) 1114 if (node() != document().firstBodyElement())
1116 return false; 1115 return false;
1117 1116
1118 return true; 1117 return true;
1119 } 1118 }
1120 1119
1121 } // namespace blink 1120 } // 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