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

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

Issue 1431193004: Reland of Make LayoutImageResource::image() parameter explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | third_party/WebKit/Source/core/layout/LayoutImageResource.h » ('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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // The image hasn't changed in size or its style constrains its size, so a p aint invalidation will suffice. 179 // The image hasn't changed in size or its style constrains its size, so a p aint invalidation will suffice.
180 if (everHadLayout() && !selfNeedsLayout()) { 180 if (everHadLayout() && !selfNeedsLayout()) {
181 // The inner content rectangle is calculated during layout, but may need an update now 181 // The inner content rectangle is calculated during layout, but may need an update now
182 // (unless the box has already been scheduled for layout). In order to c alculate it, we 182 // (unless the box has already been scheduled for layout). In order to c alculate it, we
183 // may need values from the containing block, though, so make sure that we're not too 183 // may need values from the containing block, though, so make sure that we're not too
184 // early. It may be that layout hasn't even taken place once yet. 184 // early. It may be that layout hasn't even taken place once yet.
185 updateInnerContentRect(); 185 updateInnerContentRect();
186 } 186 }
187 187
188 if (imageResource() && imageResource()->image() && imageResource()->image()- >maybeAnimated()) 188 if (imageResource() && imageResource()->maybeAnimated())
189 setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull); 189 setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull);
190 else 190 else
191 setShouldDoFullPaintInvalidation(PaintInvalidationFull); 191 setShouldDoFullPaintInvalidation(PaintInvalidationFull);
192 192
193 // Tell any potential compositing layers that the image needs updating. 193 // Tell any potential compositing layers that the image needs updating.
194 contentChanged(ImageChanged); 194 contentChanged(ImageChanged);
195 } 195 }
196 196
197 void LayoutImage::notifyFinished(Resource* newImage) 197 void LayoutImage::notifyFinished(Resource* newImage)
198 { 198 {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return nullptr; 340 return nullptr;
341 341
342 ImageResource* cachedImage = m_imageResource->cachedImage(); 342 ImageResource* cachedImage = m_imageResource->cachedImage();
343 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 343 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
344 return toSVGImage(cachedImage->image())->embeddedContentBox(); 344 return toSVGImage(cachedImage->image())->embeddedContentBox();
345 345
346 return nullptr; 346 return nullptr;
347 } 347 }
348 348
349 } // namespace blink 349 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698