Bug 204241 - AX: support more attributes for AXIsolatedTreeNode
Summary: AX: support more attributes for AXIsolatedTreeNode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: chris fleizach
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-15 13:03 PST by chris fleizach
Modified: 2019-11-21 13:27 PST (History)
11 users (show)

See Also:


Attachments
patch (10.23 KB, patch)
2019-11-15 13:11 PST, chris fleizach
no flags Details | Formatted Diff | Diff
patch (10.27 KB, patch)
2019-11-15 13:16 PST, chris fleizach
no flags Details | Formatted Diff | Diff
patch (8.30 KB, patch)
2019-11-21 09:16 PST, chris fleizach
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews214 for win-future (14.35 MB, application/zip)
2019-11-21 12:43 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2019-11-15 13:03:26 PST
Support more attributes for AXIsolatedTreeNode

    bool isChecked() 
    bool isEnabled() 
    bool isSelected() 
    bool isFocused()
    bool isHovered() 
    bool isIndeterminate() 
    bool isLoaded() 
    bool isMultiSelectable() 
    bool isOnScreen() 
    bool isPressed() 
    bool isUnvisited() 
    bool isVisited() 
    bool isRequired() 
    bool supportsRequiredAttribute() 
    bool isLinked() 
    bool isExpanded()
    bool isVisible() 
    bool isCollapsed() 
    void setIsExpanded(bool) 
    bool isSelectedOptionActive()
Comment 1 Radar WebKit Bug Importer 2019-11-15 13:03:42 PST
<rdar://problem/57237606>
Comment 2 chris fleizach 2019-11-15 13:11:00 PST
Created attachment 383637 [details]
patch
Comment 3 chris fleizach 2019-11-15 13:16:57 PST
Created attachment 383638 [details]
patch
Comment 4 Andres Gonzalez 2019-11-18 05:30:35 PST
(In reply to chris fleizach from comment #3)
> Created attachment 383638 [details]
> patch

--- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
+++ a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
@@ -569,7 +569,7 @@ public:
     virtual bool isMultiSelectable() const = 0;
     // FIXME should need just one since onscreen should be !offscreen.
     virtual bool isOnScreen() const = 0;
-    virtual bool isOffScreen() const = 0;
+    virtual bool isOffScreen() const { return !isOnScreen(); }

Should we make it final? Do we need to keep both isOnScreen and isOffScreen? If so, let's remove the FIXME comment.

--- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
+++ a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
@@ -41,6 +41,8 @@
 #include <wtf/Vector.h>
 #include <wtf/WeakPtr.h>

+#define AX_REQUIRES_IMPLEMENTATION ASSERT_NOT_REACHED
+
 namespace WebCore {

Shouldn't AX_REQUIRES_IMPLEMENTATION be in the WebCore namespace?
Comment 5 Andres Gonzalez 2019-11-21 05:40:02 PST
> (In reply to chris fleizach from comment #3)
> > Created attachment 383638 [details]
> > patch
> 
> --- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> +++ a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> @@ -569,7 +569,7 @@ public:
>      virtual bool isMultiSelectable() const = 0;
>      // FIXME should need just one since onscreen should be !offscreen.
>      virtual bool isOnScreen() const = 0;
> -    virtual bool isOffScreen() const = 0;
> +    virtual bool isOffScreen() const { return !isOnScreen(); }
> 
> Should we make it final? Do we need to keep both isOnScreen and isOffScreen?
> If so, let's remove the FIXME comment.

The style checker complains about virtual and final in the same method declaration. And since this is the base class, you cannot have just final because the compiler requires virtual. So in a similar situation, I opted for having neither virtual nor final.

The question about keeping both methods and removing the FIXME is still valid.

> 
> --- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
> +++ a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
> @@ -41,6 +41,8 @@
>  #include <wtf/Vector.h>
>  #include <wtf/WeakPtr.h>
> 
> +#define AX_REQUIRES_IMPLEMENTATION ASSERT_NOT_REACHED
> +
>  namespace WebCore {
> 
> Shouldn't AX_REQUIRES_IMPLEMENTATION be in the WebCore namespace?
Comment 6 chris fleizach 2019-11-21 09:06:55 PST
(In reply to Andres Gonzalez from comment #5)
> > (In reply to chris fleizach from comment #3)
> > > Created attachment 383638 [details]
> > > patch
> > 
> > --- a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> > +++ a/Source/WebCore/accessibility/AccessibilityObjectInterface.h
> > @@ -569,7 +569,7 @@ public:
> >      virtual bool isMultiSelectable() const = 0;
> >      // FIXME should need just one since onscreen should be !offscreen.
> >      virtual bool isOnScreen() const = 0;
> > -    virtual bool isOffScreen() const = 0;
> > +    virtual bool isOffScreen() const { return !isOnScreen(); }
> > 
> > Should we make it final? Do we need to keep both isOnScreen and isOffScreen?
> > If so, let's remove the FIXME comment.
> 
> The style checker complains about virtual and final in the same method
> declaration. And since this is the base class, you cannot have just final
> because the compiler requires virtual. So in a similar situation, I opted
> for having neither virtual nor final.
> 
> The question about keeping both methods and removing the FIXME is still
> valid.

There are overrides of both isOffscreen() and isOnscreen(). Untangling that seems out of scope for this patch. feel like it's probably better to leave as is for now

> 
> > 
> > --- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
> > +++ a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h
> > @@ -41,6 +41,8 @@
> >  #include <wtf/Vector.h>
> >  #include <wtf/WeakPtr.h>
> > 
> > +#define AX_REQUIRES_IMPLEMENTATION ASSERT_NOT_REACHED
> > +
> >  namespace WebCore {
> > 
> > Shouldn't AX_REQUIRES_IMPLEMENTATION be in the WebCore namespace?
Comment 7 chris fleizach 2019-11-21 09:16:38 PST
Created attachment 384060 [details]
patch
Comment 8 EWS Watchlist 2019-11-21 12:43:20 PST
Comment on attachment 384060 [details]
patch

Attachment 384060 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/13271438

New failing tests:
fast/workers/worker-cloneport.html
Comment 9 EWS Watchlist 2019-11-21 12:43:23 PST
Created attachment 384083 [details]
Archive of layout-test-results from ews214 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews214  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 10 chris fleizach 2019-11-21 12:44:49 PST
Unrelated

(In reply to Build Bot from comment #9)
> Created attachment 384083 [details]
> Archive of layout-test-results from ews214 for win-future
> 
> The attached test failures were seen while running run-webkit-tests on the
> win-ews.
> Bot: ews214  Port: win-future  Platform:
> CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 11 WebKit Commit Bot 2019-11-21 13:26:58 PST
Comment on attachment 384060 [details]
patch

Clearing flags on attachment: 384060

Committed r252748: <https://trac.webkit.org/changeset/252748>
Comment 12 WebKit Commit Bot 2019-11-21 13:27:00 PST
All reviewed patches have been landed.  Closing bug.