| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 #include "core/frame/Frame.h" | 39 #include "core/frame/Frame.h" |
| 40 #include "core/rendering/HitTestResult.h" | 40 #include "core/rendering/HitTestResult.h" |
| 41 #include "core/rendering/LayoutRectRecorder.h" | 41 #include "core/rendering/LayoutRectRecorder.h" |
| 42 #include "core/rendering/PaintInfo.h" | 42 #include "core/rendering/PaintInfo.h" |
| 43 #include "core/rendering/RenderView.h" | 43 #include "core/rendering/RenderView.h" |
| 44 #include "core/svg/graphics/SVGImage.h" | 44 #include "core/svg/graphics/SVGImage.h" |
| 45 #include "platform/fonts/Font.h" | 45 #include "platform/fonts/Font.h" |
| 46 #include "platform/fonts/FontCache.h" | 46 #include "platform/fonts/FontCache.h" |
| 47 #include "platform/graphics/GraphicsContext.h" | 47 #include "platform/graphics/GraphicsContext.h" |
| 48 #include "platform/graphics/GraphicsContextStateSaver.h" | 48 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 49 #include "wtf/UnusedParam.h" | |
| 50 | 49 |
| 51 using namespace std; | 50 using namespace std; |
| 52 | 51 |
| 53 namespace WebCore { | 52 namespace WebCore { |
| 54 | 53 |
| 55 using namespace HTMLNames; | 54 using namespace HTMLNames; |
| 56 | 55 |
| 57 RenderImage::RenderImage(Element* element) | 56 RenderImage::RenderImage(Element* element) |
| 58 : RenderReplaced(element, IntSize()) | 57 : RenderReplaced(element, IntSize()) |
| 59 , m_needsToSetSizeForAltText(false) | 58 , m_needsToSetSizeForAltText(false) |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 } | 478 } |
| 480 | 479 |
| 481 bool RenderImage::boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance
bleedAvoidance, InlineFlowBox*) const | 480 bool RenderImage::boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance
bleedAvoidance, InlineFlowBox*) const |
| 482 { | 481 { |
| 483 if (!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(bleedAvoidan
ce)) | 482 if (!RenderBoxModelObject::boxShadowShouldBeAppliedToBackground(bleedAvoidan
ce)) |
| 484 return false; | 483 return false; |
| 485 | 484 |
| 486 return !const_cast<RenderImage*>(this)->backgroundIsKnownToBeObscured(); | 485 return !const_cast<RenderImage*>(this)->backgroundIsKnownToBeObscured(); |
| 487 } | 486 } |
| 488 | 487 |
| 489 bool RenderImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const | 488 bool RenderImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned) const |
| 490 { | 489 { |
| 491 UNUSED_PARAM(maxDepthToTest); | |
| 492 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) | 490 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) |
| 493 return false; | 491 return false; |
| 494 if (m_imageResource->cachedImage() && !m_imageResource->cachedImage()->isLoa
ded()) | 492 if (m_imageResource->cachedImage() && !m_imageResource->cachedImage()->isLoa
ded()) |
| 495 return false; | 493 return false; |
| 496 if (!contentBoxRect().contains(localRect)) | 494 if (!contentBoxRect().contains(localRect)) |
| 497 return false; | 495 return false; |
| 498 EFillBox backgroundClip = style()->backgroundClip(); | 496 EFillBox backgroundClip = style()->backgroundClip(); |
| 499 // Background paints under borders. | 497 // Background paints under borders. |
| 500 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur
esBackground()) | 498 if (backgroundClip == BorderFillBox && style()->hasBorder() && !borderObscur
esBackground()) |
| 501 return false; | 499 return false; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 return 0; | 604 return 0; |
| 607 | 605 |
| 608 ImageResource* cachedImage = m_imageResource->cachedImage(); | 606 ImageResource* cachedImage = m_imageResource->cachedImage(); |
| 609 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) | 607 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) |
| 610 return toSVGImage(cachedImage->image())->embeddedContentBox(); | 608 return toSVGImage(cachedImage->image())->embeddedContentBox(); |
| 611 | 609 |
| 612 return 0; | 610 return 0; |
| 613 } | 611 } |
| 614 | 612 |
| 615 } // namespace WebCore | 613 } // namespace WebCore |
| OLD | NEW |