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

Side by Side Diff: sky/engine/core/rendering/RenderImage.cpp

Issue 969863002: Images don't appear when they finish loading (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 m_imageDevicePixelRatio = 1 / m_imageResource->cachedImage()->devicePixe lRatioHeaderValue(); 102 m_imageDevicePixelRatio = 1 / m_imageResource->cachedImage()->devicePixe lRatioHeaderValue();
103 103
104 // If the RenderImage was just created we don't have style() or a parent() 104 // If the RenderImage was just created we don't have style() or a parent()
105 // yet so all we can do is update our intrinsic size. Once we're inserted 105 // yet so all we can do is update our intrinsic size. Once we're inserted
106 // the resulting layout will do the rest of the work. 106 // the resulting layout will do the rest of the work.
107 if (!parent()) { 107 if (!parent()) {
108 updateIntrinsicSizeIfNeeded(m_imageResource->intrinsicSize()); 108 updateIntrinsicSizeIfNeeded(m_imageResource->intrinsicSize());
109 return; 109 return;
110 } 110 }
111 111
112 if (hasBoxDecorationBackground()) 112 RenderReplaced::imageChanged(newImage, rect);
113 RenderReplaced::imageChanged(newImage, rect);
114 113
115 ASSERT(isRooted()); 114 ASSERT(isRooted());
116 115
117 LayoutSize oldIntrinsicSize = intrinsicSize(); 116 LayoutSize oldIntrinsicSize = intrinsicSize();
118 LayoutSize newIntrinsicSize = m_imageResource->intrinsicSize(); 117 LayoutSize newIntrinsicSize = m_imageResource->intrinsicSize();
119 updateIntrinsicSizeIfNeeded(newIntrinsicSize); 118 updateIntrinsicSizeIfNeeded(newIntrinsicSize);
120 119
121 bool imageSourceHasChangedSize = oldIntrinsicSize != newIntrinsicSize; 120 bool imageSourceHasChangedSize = oldIntrinsicSize != newIntrinsicSize;
122 if (imageSourceHasChangedSize) 121 if (imageSourceHasChangedSize)
123 setPreferredLogicalWidthsDirty(); 122 setPreferredLogicalWidthsDirty();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return; 246 return;
248 } 247 }
249 } 248 }
250 249
251 bool RenderImage::needsPreferredWidthsRecalculation() const 250 bool RenderImage::needsPreferredWidthsRecalculation() const
252 { 251 {
253 return RenderReplaced::needsPreferredWidthsRecalculation(); 252 return RenderReplaced::needsPreferredWidthsRecalculation();
254 } 253 }
255 254
256 } // namespace blink 255 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698