2010-11-30 Daniel Bates <dbates@rim.com>
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Nov 2010 21:57:16 +0000 (21:57 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Nov 2010 21:57:16 +0000 (21:57 +0000)
commitb5de0027ec2b002309ebec236ed068ea777716fe
treec5861b78f14e2f01866c90f5cac7fe3a2a9398ef
parent3ee40a7396148bec133bc19009c695ff4483a691
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html [new file with mode: 0644]
LayoutTests/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html [new file with mode: 0644]
LayoutTests/fast/images/imagemap-focus-ring-outline-color.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-expected.checksum
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-expected.png
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderImage.cpp