| 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 if (!objectBounds.isEmpty()) { | 596 if (!objectBounds.isEmpty()) { |
| 597 screenArea = viewBounds; | 597 screenArea = viewBounds; |
| 598 screenArea.intersect(objectBounds); | 598 screenArea.intersect(objectBounds); |
| 599 } | 599 } |
| 600 | 600 |
| 601 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyImageR
esourceVisibility(m_imageResource->cachedImage(), status, screenArea); | 601 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyImageR
esourceVisibility(m_imageResource->cachedImage(), status, screenArea); |
| 602 | 602 |
| 603 return true; | 603 return true; |
| 604 } | 604 } |
| 605 | 605 |
| 606 void RenderImage::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, dou
ble& intrinsicRatio, bool& isPercentageIntrinsicSize) const | 606 void RenderImage::computeIntrinsicRatioInformation(FloatSize& intrinsicSize, dou
ble& intrinsicRatio) const |
| 607 { | 607 { |
| 608 RenderReplaced::computeIntrinsicRatioInformation(intrinsicSize, intrinsicRat
io, isPercentageIntrinsicSize); | 608 RenderReplaced::computeIntrinsicRatioInformation(intrinsicSize, intrinsicRat
io); |
| 609 | 609 |
| 610 // Our intrinsicSize is empty if we're rendering generated images with relat
ive width/height. Figure out the right intrinsic size to use. | 610 // Our intrinsicSize is empty if we're rendering generated images with relat
ive width/height. Figure out the right intrinsic size to use. |
| 611 if (intrinsicSize.isEmpty() && (m_imageResource->imageHasRelativeWidth() ||
m_imageResource->imageHasRelativeHeight())) { | 611 if (intrinsicSize.isEmpty() && (m_imageResource->imageHasRelativeWidth() ||
m_imageResource->imageHasRelativeHeight())) { |
| 612 RenderObject* containingBlock = isOutOfFlowPositioned() ? container() :
this->containingBlock(); | 612 RenderObject* containingBlock = isOutOfFlowPositioned() ? container() :
this->containingBlock(); |
| 613 if (containingBlock->isBox()) { | 613 if (containingBlock->isBox()) { |
| 614 RenderBox* box = toRenderBox(containingBlock); | 614 RenderBox* box = toRenderBox(containingBlock); |
| 615 intrinsicSize.setWidth(box->availableLogicalWidth().toFloat()); | 615 intrinsicSize.setWidth(box->availableLogicalWidth().toFloat()); |
| 616 intrinsicSize.setHeight(box->availableLogicalHeight(IncludeMarginBor
derPadding).toFloat()); | 616 intrinsicSize.setHeight(box->availableLogicalHeight(IncludeMarginBor
derPadding).toFloat()); |
| 617 } | 617 } |
| 618 } | 618 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 637 return 0; | 637 return 0; |
| 638 | 638 |
| 639 ImageResource* cachedImage = m_imageResource->cachedImage(); | 639 ImageResource* cachedImage = m_imageResource->cachedImage(); |
| 640 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) | 640 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage(
)) |
| 641 return toSVGImage(cachedImage->image())->embeddedContentBox(); | 641 return toSVGImage(cachedImage->image())->embeddedContentBox(); |
| 642 | 642 |
| 643 return 0; | 643 return 0; |
| 644 } | 644 } |
| 645 | 645 |
| 646 } // namespace WebCore | 646 } // namespace WebCore |
| OLD | NEW |