Bug 156084 - AX: AX hit-testing does not work on WebKit video playback buttons
Summary: AX: AX hit-testing does not work on WebKit video playback buttons
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-31 14:48 PDT by Nan Wang
Modified: 2016-03-31 22:34 PDT (History)
2 users (show)

See Also:


Attachments
initial patch (4.89 KB, patch)
2016-03-31 16:17 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (5.49 KB, patch)
2016-03-31 16:37 PDT, Nan Wang
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2016-03-31 14:48:47 PDT
We should allow hit testing on video tags.
Comment 1 Nan Wang 2016-03-31 14:49:04 PDT
<rdar://problem/22536438>
Comment 2 Nan Wang 2016-03-31 16:17:04 PDT
Created attachment 275350 [details]
initial patch
Comment 3 Nan Wang 2016-03-31 16:37:48 PDT
Created attachment 275354 [details]
patch

test failed on DRT
Comment 4 Darin Adler 2016-03-31 18:15:56 PDT
Comment on attachment 275354 [details]
patch

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

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2260
> +    if (!shadowHost)
> +        return false;
> +    
> +    if (shadowHost->hasTagName(videoTag))
> +        return false;
> +    
> +    return true;

Cleaner way to write this:

    return shadowHost && shadowHost->hasTagName(videoTag);

But also, this needs a comment explaining why this is the correct implementation for this function. What is special about video tags?

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2277
> +    Node* node = hitTestResult.innerNode();

Should put this into a local variable before the early return just above.

    Node* node = hitTestResult.innerNode();
    if (!node)
        return nullptr;
Comment 5 Nan Wang 2016-03-31 18:55:51 PDT
Comment on attachment 275354 [details]
patch

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

>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2260
>> +    return true;
> 
> Cleaner way to write this:
> 
>     return shadowHost && shadowHost->hasTagName(videoTag);
> 
> But also, this needs a comment explaining why this is the correct implementation for this function. What is special about video tags?

We need to allow automation of mouse events on video tags.
Comment 6 Nan Wang 2016-03-31 22:34:42 PDT
Committed r198941: <http://trac.webkit.org/changeset/198941>