| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |