WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144489
AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
https://bugs.webkit.org/show_bug.cgi?id=144489
Summary
AX: setting focus via accessibility object needs to set isSynchronizing in re...
Doug Russell
Reported
2015-05-01 01:13:37 PDT
Setting focus on an AccessibilityRenderObject via accessibility API can result in a selection change, which doesn't currently set the isSynchronizing flag on the associated AXTextStateChangeIntent so that the assistive technology that set focus can reliably know that the selection change is the result of the focus call.
Attachments
patch
(15.03 KB, patch)
2015-05-01 01:26 PDT
,
Doug Russell
no flags
Details
Formatted Diff
Diff
patch
(15.33 KB, patch)
2015-05-01 16:29 PDT
,
Doug Russell
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(15.96 KB, patch)
2015-05-01 16:51 PDT
,
Doug Russell
darin
: review+
Details
Formatted Diff
Diff
patch
(16.09 KB, patch)
2015-05-02 08:15 PDT
,
Doug Russell
no flags
Details
Formatted Diff
Diff
patch
(24.27 KB, patch)
2015-05-02 10:15 PDT
,
Doug Russell
no flags
Details
Formatted Diff
Diff
patch
(24.27 KB, patch)
2015-05-02 10:27 PDT
,
Doug Russell
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-mavericks
(596.64 KB, application/zip)
2015-05-02 10:52 PDT
,
Build Bot
no flags
Details
patch
(28.46 KB, patch)
2015-05-02 14:52 PDT
,
Doug Russell
no flags
Details
Formatted Diff
Diff
patch
(28.46 KB, patch)
2015-05-02 18:13 PDT
,
Doug Russell
cfleizach
: review+
Details
Formatted Diff
Diff
patch
(28.55 KB, patch)
2015-05-04 16:23 PDT
,
Doug Russell
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-05-01 01:14:14 PDT
<
rdar://problem/20776565
>
Doug Russell
Comment 2
2015-05-01 01:26:00 PDT
Created
attachment 252138
[details]
patch
chris fleizach
Comment 3
2015-05-01 16:20:34 PDT
Comment on
attachment 252138
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252138&action=review
> Source/WebCore/ChangeLog:10 > + Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
i think what's missing from this description is why do we need to make these changes
Doug Russell
Comment 4
2015-05-01 16:29:41 PDT
Created
attachment 252192
[details]
patch update changelog
Darin Adler
Comment 5
2015-05-01 16:33:30 PDT
Comment on
attachment 252192
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252192&action=review
> Source/WebCore/accessibility/AXObjectCache.h:202 > - void setTextSelectionIntent(AXTextStateChangeIntent); > + void setTextSelectionIntent(AXTextStateChangeIntent, bool isSynchronizing = false);
When callers are all passing constants to a boolean in a case like this, the WebKit project tradition is to either use two functions (which seems like the right solution in this case) so the names of the functions can make it clear what the difference is, or to use an enum so the names of the constants can make that clear. Since every single caller uses a boolean, I suggest two separate named functions rather than a function with an optional boolean argument. I also suggest changing this function to take const AXStateChangeIntent& since that would be slightly more efficient; not sure why this passes by value instead.
Doug Russell
Comment 6
2015-05-01 16:51:22 PDT
Created
attachment 252198
[details]
patch split isSynchronizing into it's own method
Darin Adler
Comment 7
2015-05-02 07:41:50 PDT
Comment on
attachment 252198
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252198&action=review
> Source/WebCore/accessibility/AXObjectCache.h:203 > + void setIsSynchronizingSelection(bool);
Oh, I think you misunderstood. This second function both set the intent and set “is synchronizing” to true. It just needs a name that makes that clear. Something like this would do: void setTextSelectionIntentWhileSynchronizing(const AXTextStateChangeIntent&); I must admit I don’t understand the concepts here well enough to understand what a good name for this would be. Your original idea that when setting intent we also want to set m_isSynchronizingSelection each time still probably makes sense and makes the class a bit more foolproof.
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1491 > +static void setTextSelectionIntent(const AccessibilityRenderObject* renderObject, bool isRange)
Since the caller is always passing “this” it can never be null, so this should take a reference rather than a pointer and the callers should pass *this.
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1669 > + setTextSelectionIntent(this, false);
The "false" here is a bit mysterious.
Doug Russell
Comment 8
2015-05-02 08:15:10 PDT
Created
attachment 252229
[details]
patch Updates from review. setTextSelectionIntent was wrong in setSelectedVisiblePositionRange.
Doug Russell
Comment 9
2015-05-02 10:15:00 PDT
Created
attachment 252235
[details]
patch Added test support for setSelectedVisibleTextRange()
Doug Russell
Comment 10
2015-05-02 10:27:28 PDT
Created
attachment 252236
[details]
patch fix gtk builds
Build Bot
Comment 11
2015-05-02 10:52:54 PDT
Comment on
attachment 252236
[details]
patch
Attachment 252236
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5598598444089344
New failing tests: platform/mac/accessibility/selection-sync.html
Build Bot
Comment 12
2015-05-02 10:52:59 PDT
Created
attachment 252238
[details]
Archive of layout-test-results from ews102 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-mavericks Platform: Mac OS X 10.9.5
Doug Russell
Comment 13
2015-05-02 14:52:51 PDT
Created
attachment 252248
[details]
patch fix dump render tree
Darin Adler
Comment 14
2015-05-02 16:51:08 PDT
Comment on
attachment 252248
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252248&action=review
> Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:1915 > +bool AccessibilityUIElement::setSelectedVisibleTextRange(AccessibilityTextMarkerRange*);
The extra semicolon on the end of this line is why GTK and EFL are failing to compile.
Doug Russell
Comment 15
2015-05-02 18:13:53 PDT
Created
attachment 252254
[details]
patch fix selection sync take 2
Doug Russell
Comment 16
2015-05-02 18:14:21 PDT
correction: fix gtk take 2
chris fleizach
Comment 17
2015-05-04 15:30:24 PDT
Comment on
attachment 252254
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252254&action=review
> Tools/DumpRenderTree/AccessibilityUIElement.cpp:912 > + uiElement->setSelectedVisibleTextRange(textMarkerRange);
we should use the return value of this when making the JSValueMakeBoolean result
chris fleizach
Comment 18
2015-05-04 16:09:29 PDT
(In reply to
comment #17
)
> Comment on
attachment 252254
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=252254&action=review
> > > Tools/DumpRenderTree/AccessibilityUIElement.cpp:912 > > + uiElement->setSelectedVisibleTextRange(textMarkerRange); > > we should use the return value of this when making the JSValueMakeBoolean > result
please upload patch to address my last comment. thanks
Doug Russell
Comment 19
2015-05-04 16:23:28 PDT
Created
attachment 252349
[details]
patch update from review
WebKit Commit Bot
Comment 20
2015-05-04 17:17:21 PDT
Comment on
attachment 252349
[details]
patch Clearing flags on attachment: 252349 Committed
r183783
: <
http://trac.webkit.org/changeset/183783
>
WebKit Commit Bot
Comment 21
2015-05-04 17:17:26 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug