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

Side by Side Diff: Source/core/layout/LayoutImage.cpp

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 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
« no previous file with comments | « Source/core/layout/LayoutImage.h ('k') | Source/core/layout/LayoutImageResource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
10 * 10 *
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : LayoutReplaced(element, LayoutSize()) 55 : LayoutReplaced(element, LayoutSize())
56 , m_didIncrementVisuallyNonEmptyPixelCount(false) 56 , m_didIncrementVisuallyNonEmptyPixelCount(false)
57 , m_isGeneratedContent(false) 57 , m_isGeneratedContent(false)
58 , m_imageDevicePixelRatio(1.0f) 58 , m_imageDevicePixelRatio(1.0f)
59 { 59 {
60 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addLayoutObj ect(this); 60 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addLayoutObj ect(this);
61 } 61 }
62 62
63 LayoutImage* LayoutImage::createAnonymous(Document* document) 63 LayoutImage* LayoutImage::createAnonymous(Document* document)
64 { 64 {
65 LayoutImage* image = new LayoutImage(0); 65 LayoutImage* image = new LayoutImage(nullptr);
66 image->setDocumentForAnonymous(document); 66 image->setDocumentForAnonymous(document);
67 return image; 67 return image;
68 } 68 }
69 69
70 LayoutImage::~LayoutImage() 70 LayoutImage::~LayoutImage()
71 { 71 {
72 } 72 }
73 73
74 void LayoutImage::willBeDestroyed() 74 void LayoutImage::willBeDestroyed()
75 { 75 {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 bool LayoutImage::needsPreferredWidthsRecalculation() const 343 bool LayoutImage::needsPreferredWidthsRecalculation() const
344 { 344 {
345 if (LayoutReplaced::needsPreferredWidthsRecalculation()) 345 if (LayoutReplaced::needsPreferredWidthsRecalculation())
346 return true; 346 return true;
347 return embeddedContentBox(); 347 return embeddedContentBox();
348 } 348 }
349 349
350 LayoutBox* LayoutImage::embeddedContentBox() const 350 LayoutBox* LayoutImage::embeddedContentBox() const
351 { 351 {
352 if (!m_imageResource) 352 if (!m_imageResource)
353 return 0; 353 return nullptr;
354 354
355 ImageResource* cachedImage = m_imageResource->cachedImage(); 355 ImageResource* cachedImage = m_imageResource->cachedImage();
356 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 356 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
357 return toSVGImage(cachedImage->image())->embeddedContentBox(); 357 return toSVGImage(cachedImage->image())->embeddedContentBox();
358 358
359 return 0; 359 return nullptr;
360 } 360 }
361 361
362 } // namespace blink 362 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutImage.h ('k') | Source/core/layout/LayoutImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698