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

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

Issue 2464053003: Always paint background and shadow separately (Closed)
Patch Set: Rebaseline-cl (invisible pixel changes along shadow edges) (The original Patch Set 2 was removed to get the try result in Patch Set 1) Created 4 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 void LayoutImage::areaElementFocusChanged(HTMLAreaElement* areaElement) { 207 void LayoutImage::areaElementFocusChanged(HTMLAreaElement* areaElement) {
208 ASSERT(areaElement->imageElement() == node()); 208 ASSERT(areaElement->imageElement() == node());
209 209
210 if (areaElement->getPath(this).isEmpty()) 210 if (areaElement->getPath(this).isEmpty())
211 return; 211 return;
212 212
213 invalidatePaintAndMarkForLayoutIfNeeded(); 213 invalidatePaintAndMarkForLayoutIfNeeded();
214 } 214 }
215 215
216 bool LayoutImage::boxShadowShouldBeAppliedToBackground(
217 BackgroundBleedAvoidance bleedAvoidance,
218 const InlineFlowBox*) const {
219 if (!LayoutBoxModelObject::boxShadowShouldBeAppliedToBackground(
220 bleedAvoidance))
221 return false;
222
223 return !const_cast<LayoutImage*>(this)->backgroundIsKnownToBeObscured();
224 }
225
226 bool LayoutImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, 216 bool LayoutImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
227 unsigned) const { 217 unsigned) const {
228 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) 218 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred())
229 return false; 219 return false;
230 if (!m_imageResource->cachedImage() || 220 if (!m_imageResource->cachedImage() ||
231 !m_imageResource->cachedImage()->isLoaded()) 221 !m_imageResource->cachedImage()->isLoaded())
232 return false; 222 return false;
233 if (!contentBoxRect().contains(localRect)) 223 if (!contentBoxRect().contains(localRect))
234 return false; 224 return false;
235 EFillBox backgroundClip = style()->backgroundClip(); 225 EFillBox backgroundClip = style()->backgroundClip();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 323
334 ImageResource* cachedImage = m_imageResource->cachedImage(); 324 ImageResource* cachedImage = m_imageResource->cachedImage();
335 if (cachedImage && cachedImage->getImage() && 325 if (cachedImage && cachedImage->getImage() &&
336 cachedImage->getImage()->isSVGImage()) 326 cachedImage->getImage()->isSVGImage())
337 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent(); 327 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent();
338 328
339 return nullptr; 329 return nullptr;
340 } 330 }
341 331
342 } // namespace blink 332 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImage.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698