Bug 138071 - Images with usemap should not have a link state
Summary: Images with usemap should not have a link state
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-25 19:18 PDT by Benjamin Poulain
Modified: 2014-10-27 20:35 PDT (History)
15 users (show)

See Also:


Attachments
Patch (14.81 KB, patch)
2014-10-25 19:27 PDT, Benjamin Poulain
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2014-10-25 19:18:00 PDT
Images with usemap should not have a link state
Comment 1 Benjamin Poulain 2014-10-25 19:27:52 PDT
Created attachment 240458 [details]
Patch
Comment 2 Andreas Kling 2014-10-26 12:53:23 PDT
Comment on attachment 240458 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=240458&action=review

r=me

> Source/WebCore/ChangeLog:11
> +        Unfortunatelly, the Accessibility code was relying on the wrong behavior

Unfortunately

> Source/WebCore/ChangeLog:27
> +        More with its setter for clarity.

Move
Comment 3 Benjamin Poulain 2014-10-26 21:28:44 PDT
Committed r175213: <http://trac.webkit.org/changeset/175213>
Comment 4 Darin Adler 2014-10-27 09:36:42 PDT
Comment on attachment 240458 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=240458&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2458
> +    if (node && is<HTMLImageElement>(*node) && !downcast<HTMLImageElement>(*node).fastGetAttribute(usemapAttr).isNull())
> +        return ImageMapRole;

Writing !fastGetAttribute(x).isNull() is a more wordy roundabout way of writing fastHasAttribute(x); we should probably use fastHasAttribute instead.
Comment 5 Benjamin Poulain 2014-10-27 11:32:27 PDT
(In reply to comment #4)
> Comment on attachment 240458 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=240458&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2458
> > +    if (node && is<HTMLImageElement>(*node) && !downcast<HTMLImageElement>(*node).fastGetAttribute(usemapAttr).isNull())
> > +        return ImageMapRole;
> 
> Writing !fastGetAttribute(x).isNull() is a more wordy roundabout way of
> writing fastHasAttribute(x); we should probably use fastHasAttribute instead.

Indeed, will fix.
Comment 6 Alexey Proskuryakov 2014-10-27 19:50:38 PDT
Ben landed the cleanup in <https://trac.webkit.org/r175233>, which broke many tests. Hopefully fixed in <https://trac.webkit.org/r175237> (untested).
Comment 7 Benjamin Poulain 2014-10-27 20:35:09 PDT
Arg, that was dumb :(

Thanks for fixing Alexey.