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

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

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl Created 3 years, 7 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (image_source_has_changed_size && 165 if (image_source_has_changed_size &&
166 (!image_size_is_constrained || 166 (!image_size_is_constrained ||
167 containing_block_needs_to_recompute_preferred_size)) { 167 containing_block_needs_to_recompute_preferred_size)) {
168 SetNeedsLayoutAndFullPaintInvalidation( 168 SetNeedsLayoutAndFullPaintInvalidation(
169 LayoutInvalidationReason::kSizeChanged); 169 LayoutInvalidationReason::kSizeChanged);
170 return; 170 return;
171 } 171 }
172 172
173 SetShouldDoFullPaintInvalidationWithoutGeometryChange( 173 SetShouldDoFullPaintInvalidationWithoutGeometryChange(
174 ImageResource() && ImageResource()->MaybeAnimated() 174 ImageResource() && ImageResource()->MaybeAnimated()
175 ? kPaintInvalidationDelayedFull 175 ? PaintInvalidationReason::kDelayedFull
176 : kPaintInvalidationFull); 176 : PaintInvalidationReason::kImage);
177 177
178 // Tell any potential compositing layers that the image needs updating. 178 // Tell any potential compositing layers that the image needs updating.
179 ContentChanged(kImageChanged); 179 ContentChanged(kImageChanged);
180 } 180 }
181 181
182 void LayoutImage::ImageNotifyFinished(ImageResourceContent* new_image) { 182 void LayoutImage::ImageNotifyFinished(ImageResourceContent* new_image) {
183 if (!image_resource_) 183 if (!image_resource_)
184 return; 184 return;
185 185
186 if (DocumentBeingDestroyed()) 186 if (DocumentBeingDestroyed())
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 ImageResourceContent* cached_image = image_resource_->CachedImage(); 329 ImageResourceContent* cached_image = image_resource_->CachedImage();
330 if (cached_image && cached_image->GetImage() && 330 if (cached_image && cached_image->GetImage() &&
331 cached_image->GetImage()->IsSVGImage()) 331 cached_image->GetImage()->IsSVGImage())
332 return ToSVGImage(cached_image->GetImage())->EmbeddedReplacedContent(); 332 return ToSVGImage(cached_image->GetImage())->EmbeddedReplacedContent();
333 333
334 return nullptr; 334 return nullptr;
335 } 335 }
336 336
337 } // namespace blink 337 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698