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

Side by Side Diff: trunk/Source/core/rendering/RenderImage.cpp

Issue 23465021: Revert 157745 "Add support for the object-position CSS property." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 return false; 510 return false;
511 if (!contentBoxRect().contains(localRect)) 511 if (!contentBoxRect().contains(localRect))
512 return false; 512 return false;
513 EFillBox backgroundClip = style()->backgroundClip(); 513 EFillBox backgroundClip = style()->backgroundClip();
514 // Background paints under borders. 514 // Background paints under borders.
515 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur esBackground()) 515 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur esBackground())
516 return false; 516 return false;
517 // Background shows in padding area. 517 // Background shows in padding area.
518 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style()->hasPadding()) 518 if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style()->hasPadding())
519 return false; 519 return false;
520 // Object-position may leave parts of the content box empty, regardless of t he value of object-fit.
521 if (style()->objectPosition() != RenderStyle::initialObjectPosition())
522 return false;
523 // Object-fit may leave parts of the content box empty. 520 // Object-fit may leave parts of the content box empty.
524 ObjectFit objectFit = style()->objectFit(); 521 ObjectFit objectFit = style()->objectFit();
525 if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) 522 if (objectFit != ObjectFitFill && objectFit != ObjectFitCover)
526 return false; 523 return false;
527 // Check for image with alpha. 524 // Check for image with alpha.
528 return m_imageResource->cachedImage() && m_imageResource->cachedImage()->cur rentFrameKnownToBeOpaque(this); 525 return m_imageResource->cachedImage() && m_imageResource->cachedImage()->cur rentFrameKnownToBeOpaque(this);
529 } 526 }
530 527
531 bool RenderImage::computeBackgroundIsKnownToBeObscured() 528 bool RenderImage::computeBackgroundIsKnownToBeObscured()
532 { 529 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 return 0; 617 return 0;
621 618
622 ImageResource* cachedImage = m_imageResource->cachedImage(); 619 ImageResource* cachedImage = m_imageResource->cachedImage();
623 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 620 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
624 return toSVGImage(cachedImage->image())->embeddedContentBox(); 621 return toSVGImage(cachedImage->image())->embeddedContentBox();
625 622
626 return 0; 623 return 0;
627 } 624 }
628 625
629 } // namespace WebCore 626 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/platform/LengthPoint.h ('k') | trunk/Source/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698