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

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

Issue 1706083002: Split ImageResourceClient into ResourceClient and ImageResourceObserver [1/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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. 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 RespectImageOrientationEnum oldOrientation = oldStyle ? oldStyle->respectIma geOrientation() : ComputedStyle::initialRespectImageOrientation(); 83 RespectImageOrientationEnum oldOrientation = oldStyle ? oldStyle->respectIma geOrientation() : ComputedStyle::initialRespectImageOrientation();
84 if (style() && style()->respectImageOrientation() != oldOrientation) 84 if (style() && style()->respectImageOrientation() != oldOrientation)
85 intrinsicSizeChanged(); 85 intrinsicSizeChanged();
86 } 86 }
87 87
88 void LayoutImage::setImageResource(PassOwnPtrWillBeRawPtr<LayoutImageResource> i mageResource) 88 void LayoutImage::setImageResource(PassOwnPtrWillBeRawPtr<LayoutImageResource> i mageResource)
89 { 89 {
90 ASSERT(!m_imageResource); 90 ASSERT(!m_imageResource);
91 m_imageResource = imageResource; 91 m_imageResource = imageResource;
92 m_imageResource->initialize(this); 92 m_imageResource->initialize(this, this);
93 } 93 }
94 94
95 void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect) 95 void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
96 { 96 {
97 ASSERT(view()); 97 ASSERT(view());
98 ASSERT(view()->frameView()); 98 ASSERT(view()->frameView());
99 if (documentBeingDestroyed()) 99 if (documentBeingDestroyed())
100 return; 100 return;
101 101
102 if (hasBoxDecorationBackground() || hasMask() || hasShapeOutside()) 102 if (hasBoxDecorationBackground() || hasMask() || hasShapeOutside())
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return nullptr; 318 return nullptr;
319 319
320 ImageResource* cachedImage = m_imageResource->cachedImage(); 320 ImageResource* cachedImage = m_imageResource->cachedImage();
321 if (cachedImage && cachedImage->getImage() && cachedImage->getImage()->isSVG Image()) 321 if (cachedImage && cachedImage->getImage() && cachedImage->getImage()->isSVG Image())
322 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent(); 322 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent();
323 323
324 return nullptr; 324 return nullptr;
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImage.h ('k') | third_party/WebKit/Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698