Changeset 72962 in webkit


Ignore:
Timestamp:
Nov 30, 2010 1:57:16 PM (13 years ago)
Author:
dbates@webkit.org
Message:

2010-11-30 Daniel Bates <dbates@rim.com>

Reviewed by David Hyatt.

Focused <area> should use CSS properties of <area> instead of associated <img>
https://bugs.webkit.org/show_bug.cgi?id=49888

Fixes an issue where the CSS properties of an <area> were not used when
the <area> was focused.

Currently, when focusing an <area> (say by pressing option + tab in Mac
Safari) we use the CSS style information for the <img> associated with
the <area>. Instead, we should use the CSS style information for the
focused <area>. In particular, this will make the us honor the outline-
color property of a focused <area> when drawing its focus ring.

Tests: fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html

fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html
fast/images/imagemap-focus-ring-outline-color.html

  • rendering/RenderImage.cpp: (WebCore::RenderImage::paintFocusRing): Use the style information of the focused <area> when drawing the focus ring for it.

2010-11-30 Daniel Bates <dbates@rim.com>

Reviewed by David Hyatt.

Focused <area> should use CSS properties of <area> instead of associated <img>
https://bugs.webkit.org/show_bug.cgi?id=49888

Updated the test result for test fast/images/imagemap-focus-ring.html. Added
test to verify that the color of the focus ring for a focused <area> is
the outline-color specified by the :focus pseudo-class .

Also, added tests to ensure that outline-color is not inherited (by default) as per
section 18.4 of the CSS 2.1 spec <http://www.w3.org/TR/CSS2/ui.html#dynamic-outlines>,
unless explicitly inherited.

  • fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html: Added.
  • fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html: Added.
  • fast/images/imagemap-focus-ring-outline-color.html: Added.
  • platform/mac/fast/images/imagemap-focus-ring-expected.checksum: Updated result.
  • platform/mac/fast/images/imagemap-focus-ring-expected.png: Ditto.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.checksum: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.txt: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
  • platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt: Added.
Location:
trunk
Files:
12 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r72959 r72962  
     12010-11-30  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        Focused <area> should use CSS properties of <area> instead of associated <img>
     6        https://bugs.webkit.org/show_bug.cgi?id=49888
     7
     8        Updated the test result for test fast/images/imagemap-focus-ring.html. Added
     9        test to verify that the color of the focus ring for a focused <area> is
     10        the outline-color specified by the :focus pseudo-class .
     11
     12        Also, added tests to ensure that outline-color is not inherited (by default) as per
     13        section 18.4 of the CSS 2.1 spec <http://www.w3.org/TR/CSS2/ui.html#dynamic-outlines>,
     14        unless explicitly inherited.
     15
     16        * fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html: Added.
     17        * fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html: Added.
     18        * fast/images/imagemap-focus-ring-outline-color.html: Added.
     19        * platform/mac/fast/images/imagemap-focus-ring-expected.checksum: Updated result.
     20        * platform/mac/fast/images/imagemap-focus-ring-expected.png: Ditto.
     21        * platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.checksum: Added.
     22        * platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
     23        * platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.txt: Added.
     24        * platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum: Added.
     25        * platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
     26        * platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt: Added.
     27        * platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum: Added.
     28        * platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
     29        * platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt: Added.
     30
    1312010-11-30  Ojan Vafai  <ojan@chromium.org>
    232
  • trunk/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-expected.checksum

    r69766 r72962  
    1 c4ec4eae0407f510da84a6a2242f1322
     1942b35ab0339372d6c4da944161be0e7
  • trunk/WebCore/ChangeLog

    r72960 r72962  
     12010-11-30  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by David Hyatt.
     4
     5        Focused <area> should use CSS properties of <area> instead of associated <img>
     6        https://bugs.webkit.org/show_bug.cgi?id=49888
     7
     8        Fixes an issue where the CSS properties of an <area> were not used when
     9        the <area> was focused.
     10
     11        Currently, when focusing an <area> (say by pressing option + tab in Mac
     12        Safari) we use the CSS style information for the <img> associated with
     13        the <area>. Instead, we should use the CSS style information for the
     14        focused <area>. In particular, this will make the us honor the outline-
     15        color property of a focused <area> when drawing its focus ring.
     16
     17        Tests: fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html
     18               fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html
     19               fast/images/imagemap-focus-ring-outline-color.html
     20
     21        * rendering/RenderImage.cpp:
     22        (WebCore::RenderImage::paintFocusRing): Use the style information of
     23        the focused <area> when drawing the focus ring for it.
     24
    1252010-11-30  Tony Chang  <tony@chromium.org>
    226
  • trunk/WebCore/rendering/RenderImage.cpp

    r72528 r72962  
    358358        if (focusedNode != areaElement)
    359359            continue;
    360        
    361         paintInfo.context->drawFocusRing(areaElement->getPath(this), style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
     360
     361        RenderStyle* styleToUse = areaElement->computedStyle();
     362        paintInfo.context->drawFocusRing(areaElement->getPath(this), styleToUse->outlineWidth(), styleToUse->outlineOffset(), styleToUse->visitedDependentColor(CSSPropertyOutlineColor));
    362363        break;
    363364    }
Note: See TracChangeset for help on using the changeset viewer.