Commit 9d7dff1a authored by dbates@webkit.org's avatar dbates@webkit.org

2010-12-31 Daniel Bates <dbates@rim.com>

        Reviewed by Darin Adler.

        Pass style for <area> instead of associated <img> when querying whether
        the theme draws the focus ring for an <area>
        https://bugs.webkit.org/show_bug.cgi?id=51632

        Fixes an issue where the style for the associated <img> of an <area>
        was passed when considering whether the theme should draw a focus ring
        for the <area>. Instead, we should pass the theme the style for the <area>.

        It's not possible to test this at this time since there are no themes
        that override focus ring drawing for <area>s.

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paintFocusRing): Moved call to RenderTheme::supportsFocusRing()
        such that it's called with respect to the focused <area>.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5b65a9b1
2010-12-31 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Pass style for <area> instead of associated <img> when querying whether
the theme draws the focus ring for an <area>
https://bugs.webkit.org/show_bug.cgi?id=51632
Fixes an issue where the style for the associated <img> of an <area>
was passed when considering whether the theme should draw a focus ring
for the <area>. Instead, we should pass the theme the style for the <area>.
It's not possible to test this at this time since there are no themes
that override focus ring drawing for <area>s.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintFocusRing): Moved call to RenderTheme::supportsFocusRing()
such that it's called with respect to the focused <area>.
2010-12-31 Darin Adler <darin@apple.com>
* WebCore.xcodeproj/project.pbxproj: Added back the language.
......
......@@ -325,7 +325,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
paintFocusRing(paintInfo, style());
}
void RenderImage::paintFocusRing(PaintInfo& paintInfo, const RenderStyle* style)
void RenderImage::paintFocusRing(PaintInfo& paintInfo, const RenderStyle*)
{
// Don't draw focus rings if printing.
if (document()->printing() || !frame()->selection()->isFocusedAndActive())
......@@ -348,9 +348,6 @@ void RenderImage::paintFocusRing(PaintInfo& paintInfo, const RenderStyle* style)
RefPtr<HTMLCollection> areas = mapElement->areas();
unsigned numAreas = areas->length();
if (theme()->supportsFocusRing(style))
return; // The theme draws the focus ring.
// FIXME: Clip the paths to the image bounding box.
for (unsigned k = 0; k < numAreas; ++k) {
......@@ -359,6 +356,8 @@ void RenderImage::paintFocusRing(PaintInfo& paintInfo, const RenderStyle* style)
continue;
RenderStyle* styleToUse = areaElement->computedStyle();
if (theme()->supportsFocusRing(styleToUse))
return; // The theme draws the focus ring.
paintInfo.context->drawFocusRing(areaElement->getPath(this), styleToUse->outlineWidth(), styleToUse->outlineOffset(), styleToUse->visitedDependentColor(CSSPropertyOutlineColor));
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment