Changeset 99303 in webkit
- Timestamp:
- Nov 4, 2011 11:27:35 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r99301 r99303 1 2011-11-04 Levi Weintraub <leviw@chromium.org> 2 3 Correct usage of LayoutUnits in RenderImage and SVGImage 4 https://bugs.webkit.org/show_bug.cgi?id=71525 5 6 Reviewed by Darin Adler. 7 8 Correcting incorrect usage of LayoutUnits for image sizes that should be integers and fixing overloaded functions that 9 should be using LayoutUnits. 10 11 No new tests -- no change in behavior. 12 13 * rendering/RenderImage.cpp: 14 (WebCore::RenderImage::imageDimensionsChanged): 15 (WebCore::RenderImage::paintIntoRect): 16 (WebCore::RenderImage::nodeAtPoint): 17 (WebCore::RenderImage::computeReplacedLogicalWidth): 18 * rendering/RenderImage.h: 19 * svg/graphics/SVGImage.cpp: 20 (WebCore::SVGImageChromeClient::invalidateContentsAndWindow): 21 1 22 2011-11-04 Adam Barth <abarth@webkit.org> 2 23 -
trunk/Source/WebCore/rendering/RenderImage.cpp
r98895 r99303 213 213 214 214 if (shouldRepaint) { 215 IntRect repaintRect;215 LayoutRect repaintRect; 216 216 if (rect) { 217 217 // The image changed rect is in source image coordinates (pre-zooming), … … 395 395 } 396 396 397 void RenderImage::paintIntoRect(GraphicsContext* context, const IntRect& rect)397 void RenderImage::paintIntoRect(GraphicsContext* context, const LayoutRect& rect) 398 398 { 399 399 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || rect.width() <= 0 || rect.height() <= 0) … … 455 455 if (tempResult.innerNode() && node()) { 456 456 if (HTMLMapElement* map = imageMap()) { 457 IntRect contentBox = contentBoxRect();457 LayoutRect contentBox = contentBoxRect(); 458 458 float scaleFactor = 1 / style()->effectiveZoom(); 459 459 LayoutPoint mapLocation(pointInContainer.x() - accumulatedOffset.x() - this->x() - contentBox.x(), pointInContainer.y() - accumulatedOffset.y() - this->y() - contentBox.y()); … … 496 496 bool hasRelativeHeight = contentRenderer ? contentRenderer->style()->height().isPercent() : m_imageResource->imageHasRelativeHeight(); 497 497 498 LayoutSize containerSize;498 IntSize containerSize; 499 499 if (hasRelativeWidth || hasRelativeHeight) { 500 500 // Propagate the containing block size to the image resource, otherwhise we can't compute our own intrinsic size, if it's relative. … … 502 502 if (containingBlock->isBox()) { 503 503 RenderBox* box = toRenderBox(containingBlock); 504 containerSize = LayoutSize(box->availableWidth(), box->availableHeight()); // Already contains zooming information.504 containerSize = IntSize(box->availableWidth(), box->availableHeight()); // Already contains zooming information. 505 505 } 506 506 } else { -
trunk/Source/WebCore/rendering/RenderImage.h
r98852 r99303 63 63 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); 64 64 65 virtual void paintIntoRect(GraphicsContext*, const IntRect&);65 virtual void paintIntoRect(GraphicsContext*, const LayoutRect&); 66 66 virtual void paint(PaintInfo&, const LayoutPoint&); 67 67 … … 78 78 virtual bool isRenderImage() const { return true; } 79 79 80 virtual void paintReplaced(PaintInfo&, const IntPoint&);80 virtual void paintReplaced(PaintInfo&, const LayoutPoint&); 81 81 82 82 virtual bool backgroundIsObscured() const; -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r99228 r99303 74 74 } 75 75 76 virtual void invalidateContentsAndWindow(const LayoutRect& r, bool)76 virtual void invalidateContentsAndWindow(const IntRect& r, bool) 77 77 { 78 78 if (m_image && m_image->imageObserver())
Note: See TracChangeset
for help on using the changeset viewer.