Bug 173912 - Safari's Speedometer score massively regresses when accessibility is enabled
Summary: Safari's Speedometer score massively regresses when accessibility is enabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 174559
  Show dependency treegraph
 
Reported: 2017-06-28 00:22 PDT by Ryosuke Niwa
Modified: 2017-07-15 20:54 PDT (History)
9 users (show)

See Also:


Attachments
WIP (21.60 KB, patch)
2017-06-28 00:24 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
WIP (10.28 KB, patch)
2017-06-28 00:26 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixes the bug (35.27 KB, patch)
2017-06-28 16:33 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Addressed Chris's comment (35.29 KB, patch)
2017-06-28 16:56 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (35.59 KB, patch)
2017-06-28 17:33 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (35.59 KB, patch)
2017-06-28 17:53 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Another GTK+/WPE build fix (35.60 KB, patch)
2017-06-28 18:49 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (35.06 KB, patch)
2017-06-28 19:00 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2017-06-28 00:22:19 PDT
When the accessibility tree is turned on, we trigger a synchronous layout in HTMLTextFormControlElement::setInnerTextValue. We need to avoid that.

<rdar://problem/32686777>
Comment 1 Ryosuke Niwa 2017-06-28 00:24:25 PDT
Created attachment 314001 [details]
WIP
Comment 2 Ryosuke Niwa 2017-06-28 00:26:19 PDT
Created attachment 314002 [details]
WIP
Comment 3 Ryosuke Niwa 2017-06-28 16:33:22 PDT
Created attachment 314067 [details]
Fixes the bug
Comment 4 chris fleizach 2017-06-28 16:37:00 PDT
Comment on attachment 314067 [details]
Fixes the bug

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

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:699
> +    auto *cache = m_object->axObjectCache();

we probably shouldn't assert cache here, it is possible to have a null cache (happens when our wrapper outlives the backing object), in which can we should return a nil value
Comment 5 Ryosuke Niwa 2017-06-28 16:48:36 PDT
Comment on attachment 314067 [details]
Fixes the bug

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

>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:699
>> +    auto *cache = m_object->axObjectCache();
> 
> we probably shouldn't assert cache here, it is possible to have a null cache (happens when our wrapper outlives the backing object), in which can we should return a nil value

Okay. I can fix that.
Comment 6 Ryosuke Niwa 2017-06-28 16:56:36 PDT
Created attachment 314070 [details]
Addressed Chris's comment
Comment 7 chris fleizach 2017-06-28 17:03:22 PDT
Comment on attachment 314070 [details]
Addressed Chris's comment

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

small suggestions. otherwise change looks ok to me

> Source/WebCore/accessibility/AXObjectCache.cpp:2170
> +    textMarkerData.offset = 0;

these few lines should be unnecessary now that you initialize them

> Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:412
> +    if (position.isNotNull()) {

should use early return here
Comment 8 Ryosuke Niwa 2017-06-28 17:33:48 PDT
Created attachment 314074 [details]
Patch for landing
Comment 9 Ryosuke Niwa 2017-06-28 17:33:56 PDT
Thanks for the review!

(In reply to chris fleizach from comment #7)
> Comment on attachment 314070 [details]
> Addressed Chris's comment
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314070&action=review
> 
> small suggestions. otherwise change looks ok to me
> 
> > Source/WebCore/accessibility/AXObjectCache.cpp:2170
> > +    textMarkerData.offset = 0;
> 
> these few lines should be unnecessary now that you initialize them

Removed.

> > Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:412
> > +    if (position.isNotNull()) {
> 
> should use early return here

Fixed.
Comment 10 Ryosuke Niwa 2017-06-28 17:34:07 PDT
Comment on attachment 314074 [details]
Patch for landing

Wait for EWS.
Comment 11 Ryosuke Niwa 2017-06-28 17:53:28 PDT
Created attachment 314075 [details]
Patch for landing
Comment 12 Ryosuke Niwa 2017-06-28 17:53:38 PDT
Comment on attachment 314075 [details]
Patch for landing

Wait for EWS again.
Comment 13 Ryosuke Niwa 2017-06-28 18:49:15 PDT
Created attachment 314085 [details]
Another GTK+/WPE build fix
Comment 14 Ryosuke Niwa 2017-06-28 19:00:23 PDT
Created attachment 314087 [details]
Patch for landing
Comment 15 Ryosuke Niwa 2017-06-28 19:54:02 PDT
Committed r218910: <http://trac.webkit.org/changeset/218910>
Comment 16 Daniel Bates 2017-07-15 20:52:31 PDT
(In reply to Ryosuke Niwa from comment #15)
> Committed r218910: <http://trac.webkit.org/changeset/218910>

I am able to hit ASSERT(LayoutDisallowedScope::isLayoutAllowed()), added in this commit, whenever I have VoiceOver enabled and update the value of text field. See bug #174559.
Comment 17 Daniel Bates 2017-07-15 20:54:15 PDT
(In reply to Daniel Bates from comment #16)
> (In reply to Ryosuke Niwa from comment #15)
> > Committed r218910: <http://trac.webkit.org/changeset/218910>
> 
> I am able to hit ASSERT(LayoutDisallowedScope::isLayoutAllowed()), added in
> this commit, whenever I have VoiceOver enabled and update the value of text
> field. See bug #174559.

*whenever I have VoiceOver enabled and update the value of a text field from a mouseup event listener.