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

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

Issue 1482953002: Drop dependency on LayoutObject in fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 5 years 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style()->hasPadding()) 238 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style()->hasPadding())
239 return false; 239 return false;
240 // Object-position may leave parts of the content box empty, regardless of t he value of object-fit. 240 // Object-position may leave parts of the content box empty, regardless of t he value of object-fit.
241 if (style()->objectPosition() != ComputedStyle::initialObjectPosition()) 241 if (style()->objectPosition() != ComputedStyle::initialObjectPosition())
242 return false; 242 return false;
243 // Object-fit may leave parts of the content box empty. 243 // Object-fit may leave parts of the content box empty.
244 ObjectFit objectFit = style()->objectFit(); 244 ObjectFit objectFit = style()->objectFit();
245 if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) 245 if (objectFit != ObjectFitFill && objectFit != ObjectFitCover)
246 return false; 246 return false;
247 // Check for image with alpha. 247 // Check for image with alpha.
248 return m_imageResource->cachedImage() && m_imageResource->cachedImage()->cur rentFrameKnownToBeOpaque(this); 248 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", " data", InspectorPaintImageEvent::data(this, *m_imageResource->cachedImage()));
249 return m_imageResource->cachedImage() && m_imageResource->cachedImage()->ima ge()->currentFrameKnownToBeOpaque(Image::PreCacheMetadata);
249 } 250 }
250 251
251 bool LayoutImage::computeBackgroundIsKnownToBeObscured() const 252 bool LayoutImage::computeBackgroundIsKnownToBeObscured() const
252 { 253 {
253 if (!hasBackground()) 254 if (!hasBackground())
254 return false; 255 return false;
255 256
256 LayoutRect paintedExtent; 257 LayoutRect paintedExtent;
257 if (!getBackgroundPaintedExtent(paintedExtent)) 258 if (!getBackgroundPaintedExtent(paintedExtent))
258 return false; 259 return false;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return nullptr; 317 return nullptr;
317 318
318 ImageResource* cachedImage = m_imageResource->cachedImage(); 319 ImageResource* cachedImage = m_imageResource->cachedImage();
319 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 320 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
320 return toSVGImage(cachedImage->image())->embeddedContentBox(); 321 return toSVGImage(cachedImage->image())->embeddedContentBox();
321 322
322 return nullptr; 323 return nullptr;
323 } 324 }
324 325
325 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698