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

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: Merge. 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 20 matching lines...) Expand all
31 #include "core/layout/ImageQualityController.h" 31 #include "core/layout/ImageQualityController.h"
32 #include "core/layout/LayoutBlock.h" 32 #include "core/layout/LayoutBlock.h"
33 #include "core/layout/LayoutGeometryMap.h" 33 #include "core/layout/LayoutGeometryMap.h"
34 #include "core/layout/LayoutInline.h" 34 #include "core/layout/LayoutInline.h"
35 #include "core/layout/LayoutView.h" 35 #include "core/layout/LayoutView.h"
36 #include "core/layout/compositing/CompositedLayerMapping.h" 36 #include "core/layout/compositing/CompositedLayerMapping.h"
37 #include "core/layout/compositing/PaintLayerCompositor.h" 37 #include "core/layout/compositing/PaintLayerCompositor.h"
38 #include "core/paint/PaintLayer.h" 38 #include "core/paint/PaintLayer.h"
39 #include "core/style/ShadowList.h" 39 #include "core/style/ShadowList.h"
40 #include "platform/LengthFunctions.h" 40 #include "platform/LengthFunctions.h"
41 #include "wtf/PtrUtil.h"
41 42
42 namespace blink { 43 namespace blink {
43 44
44 class FloatStateForStyleChange { 45 class FloatStateForStyleChange {
45 public: 46 public:
46 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating) 47 static void setWasFloating(LayoutBoxModelObject* boxModelObject, bool wasFlo ating)
47 { 48 {
48 s_wasFloating = wasFloating; 49 s_wasFloating = wasFloating;
49 s_boxModelObject = boxModelObject; 50 s_boxModelObject = boxModelObject;
50 } 51 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // 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
319 // in the previous frame. 320 // in the previous frame.
320 DisableCompositingQueryAsserts disabler; 321 DisableCompositingQueryAsserts disabler;
321 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ()) 322 if (const PaintLayer* ancestorOverflowLayer = layer()->ancestorOverflowLayer ())
322 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts(); 323 ancestorOverflowLayer->getScrollableArea()->invalidateAllStickyConstrain ts();
323 } 324 }
324 325
325 void LayoutBoxModelObject::createLayer() 326 void LayoutBoxModelObject::createLayer()
326 { 327 {
327 ASSERT(!m_layer); 328 ASSERT(!m_layer);
328 m_layer = adoptPtr(new PaintLayer(this)); 329 m_layer = wrapUnique(new PaintLayer(this));
329 setHasLayer(true); 330 setHasLayer(true);
330 m_layer->insertOnlyThisLayerAfterStyleChange(); 331 m_layer->insertOnlyThisLayerAfterStyleChange();
331 } 332 }
332 333
333 void LayoutBoxModelObject::destroyLayer() 334 void LayoutBoxModelObject::destroyLayer()
334 { 335 {
335 setHasLayer(false); 336 setHasLayer(false);
336 m_layer = nullptr; 337 m_layer = nullptr;
337 } 338 }
338 339
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 if (rootElementStyle->hasBackground()) 1127 if (rootElementStyle->hasBackground())
1127 return false; 1128 return false;
1128 1129
1129 if (node() != document().firstBodyElement()) 1130 if (node() != document().firstBodyElement())
1130 return false; 1131 return false;
1131 1132
1132 return true; 1133 return true;
1133 } 1134 }
1134 1135
1135 } // namespace blink 1136 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698