From 4576aa36e9a9671459299c7963ac95aa94beaea9 Mon Sep 17 00:00:00 2001 From: "Shimeng (Simon) Wang" Date: Tue, 7 Dec 2010 17:22:45 -0800 Subject: Merge WebKit at r73109: Initial merge by git. Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8 --- WebCore/rendering/RenderImage.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'WebCore/rendering/RenderImage.cpp') diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp index 48f21f1..7db8838 100644 --- a/WebCore/rendering/RenderImage.cpp +++ b/WebCore/rendering/RenderImage.cpp @@ -332,10 +332,10 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty) RenderReplaced::paint(paintInfo, tx, ty); if (paintInfo.phase == PaintPhaseOutline) - paintFocusRings(paintInfo, style()); + paintFocusRing(paintInfo, style()); } -void RenderImage::paintFocusRings(PaintInfo& paintInfo, const RenderStyle* style) +void RenderImage::paintFocusRing(PaintInfo& paintInfo, const RenderStyle* style) { // Don't draw focus rings if printing. if (document()->printing() || !frame()->selection()->isFocusedAndActive()) @@ -367,10 +367,9 @@ void RenderImage::paintFocusRings(PaintInfo& paintInfo, const RenderStyle* style HTMLAreaElement* areaElement = static_cast(areas->item(k)); if (focusedNode != areaElement) continue; - - Vector focusRingPaths; - focusRingPaths.append(areaElement->getPath(this)); - paintInfo.context->drawFocusRing(focusRingPaths, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor)); + + RenderStyle* styleToUse = areaElement->computedStyle(); + paintInfo.context->drawFocusRing(areaElement->getPath(this), styleToUse->outlineWidth(), styleToUse->outlineOffset(), styleToUse->visitedDependentColor(CSSPropertyOutlineColor)); break; } } @@ -386,7 +385,7 @@ void RenderImage::paintIntoRect(GraphicsContext* context, const IntRect& rect) HTMLImageElement* imageElt = (node() && node()->hasTagName(imgTag)) ? static_cast(node()) : 0; CompositeOperator compositeOperator = imageElt ? imageElt->compositeOperator() : CompositeSourceOver; - bool useLowQualityScaling = shouldPaintAtLowQuality(context, m_imageResource->image(), rect.size()); + bool useLowQualityScaling = shouldPaintAtLowQuality(context, m_imageResource->image(), 0, rect.size()); context->drawImage(m_imageResource->image(rect.width(), rect.height()), style()->colorSpace(), rect, compositeOperator, useLowQualityScaling); } -- cgit v1.1