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

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

Issue 2727853002: [css-display] Support display: contents pseudo-elements.
Patch Set: [css-display] Support display: contents pseudos. Created 3 years, 8 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) 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. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 using namespace HTMLNames; 46 using namespace HTMLNames;
47 47
48 LayoutImage::LayoutImage(Element* element) 48 LayoutImage::LayoutImage(Element* element)
49 : LayoutReplaced(element, LayoutSize()), 49 : LayoutReplaced(element, LayoutSize()),
50 m_didIncrementVisuallyNonEmptyPixelCount(false), 50 m_didIncrementVisuallyNonEmptyPixelCount(false),
51 m_isGeneratedContent(false), 51 m_isGeneratedContent(false),
52 m_imageDevicePixelRatio(1.0f) {} 52 m_imageDevicePixelRatio(1.0f) {}
53 53
54 LayoutImage* LayoutImage::createAnonymous(PseudoElement& pseudo) { 54 LayoutImage* LayoutImage::createAnonymous(PseudoElement& pseudo) {
55 LayoutImage* image = new LayoutImage(nullptr); 55 LayoutImage* image = new LayoutImage(nullptr);
56 image->setDocumentForAnonymous(&pseudo.document()); 56 image->setPseudoForAnonymous(pseudo);
57 return image; 57 return image;
58 } 58 }
59 59
60 LayoutImage::~LayoutImage() {} 60 LayoutImage::~LayoutImage() {}
61 61
62 void LayoutImage::willBeDestroyed() { 62 void LayoutImage::willBeDestroyed() {
63 ASSERT(m_imageResource); 63 ASSERT(m_imageResource);
64 m_imageResource->shutdown(); 64 m_imageResource->shutdown();
65 LayoutReplaced::willBeDestroyed(); 65 LayoutReplaced::willBeDestroyed();
66 } 66 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 ImageResourceContent* cachedImage = m_imageResource->cachedImage(); 325 ImageResourceContent* cachedImage = m_imageResource->cachedImage();
326 if (cachedImage && cachedImage->getImage() && 326 if (cachedImage && cachedImage->getImage() &&
327 cachedImage->getImage()->isSVGImage()) 327 cachedImage->getImage()->isSVGImage())
328 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent(); 328 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent();
329 329
330 return nullptr; 330 return nullptr;
331 } 331 }
332 332
333 } // namespace blink 333 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698