WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115491
Add "VisibleOnly" key to search predicate
https://bugs.webkit.org/show_bug.cgi?id=115491
Summary
Add "VisibleOnly" key to search predicate
Greg Hughes
Reported
2013-05-01 15:38:52 PDT
For assistive products it would be much more effecient if the search predicate accepted a "visibleOnly" key with a boolean so that the search was limited to items that were scrolled into view. Without this, clients need to constantly ask for the "next" object checking if it is visible. On large pages this can mean tens of thoughts of isVisible requests.
Attachments
Patch 13623364.1
(45.08 KB, patch)
2013-05-01 15:59 PDT
,
Greg Hughes
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
patch 13623364.2
(47.58 KB, patch)
2013-05-01 17:17 PDT
,
Greg Hughes
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
(537.27 KB, application/zip)
2013-05-02 01:25 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
(491.75 KB, application/zip)
2013-05-02 02:24 PDT
,
Build Bot
no flags
Details
13623364.3 patch v3
(51.22 KB, patch)
2013-05-13 13:29 PDT
,
Greg Hughes
eflews.bot
: owner-
Details
Formatted Diff
Diff
Patch v4
(51.22 KB, patch)
2013-05-13 13:33 PDT
,
Greg Hughes
webkit-ews
: owner-
Details
Formatted Diff
Diff
Patch v5, now with layout tests
(51.18 KB, patch)
2013-05-14 15:30 PDT
,
Greg Hughes
no flags
Details
Formatted Diff
Diff
Patch v 5.1
(51.18 KB, application/octet-stream)
2013-05-17 12:52 PDT
,
Greg Hughes
no flags
Details
Patch v 5.2
(51.18 KB, patch)
2013-05-17 12:53 PDT
,
Greg Hughes
no flags
Details
Formatted Diff
Diff
Patch v6
(51.19 KB, application/octet-stream)
2013-05-22 15:08 PDT
,
Greg Hughes
no flags
Details
Patch v6.1
(51.19 KB, patch)
2013-05-22 15:08 PDT
,
Greg Hughes
no flags
Details
Formatted Diff
Diff
Patch v7
(51.19 KB, patch)
2013-05-22 15:17 PDT
,
Greg Hughes
no flags
Details
Formatted Diff
Diff
Patch v8
(51.19 KB, patch)
2013-05-28 11:57 PDT
,
Greg Hughes
no flags
Details
Formatted Diff
Diff
Show Obsolete
(12)
View All
Add attachment
proposed patch, testcase, etc.
Greg Hughes
Comment 1
2013-05-01 15:55:24 PDT
<
rdar://13623364
>
Greg Hughes
Comment 2
2013-05-01 15:59:13 PDT
Created
attachment 200247
[details]
Patch 13623364.1
Greg Hughes
Comment 3
2013-05-01 16:07:27 PDT
Found a problem with my first patch, working on another
EFL EWS Bot
Comment 4
2013-05-01 16:08:07 PDT
Comment on
attachment 200247
[details]
Patch 13623364.1
Attachment 200247
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/377118
EFL EWS Bot
Comment 5
2013-05-01 16:09:46 PDT
Comment on
attachment 200247
[details]
Patch 13623364.1
Attachment 200247
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/370127
Build Bot
Comment 6
2013-05-01 16:32:09 PDT
Comment on
attachment 200247
[details]
Patch 13623364.1
Attachment 200247
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/353157
Greg Hughes
Comment 7
2013-05-01 17:17:27 PDT
Created
attachment 200257
[details]
patch 13623364.2
Build Bot
Comment 8
2013-05-02 01:25:32 PDT
Comment on
attachment 200257
[details]
patch 13623364.2
Attachment 200257
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/392060
New failing tests: platform/mac/accessibility/search-when-element-starts-in-table.html platform/mac/accessibility/attributed-string-includes-highlighting.html platform/mac/accessibility/search-predicate.html
Build Bot
Comment 9
2013-05-02 01:25:34 PDT
Created
attachment 200303
[details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.2
Build Bot
Comment 10
2013-05-02 02:24:15 PDT
Comment on
attachment 200257
[details]
patch 13623364.2
Attachment 200257
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/360108
New failing tests: platform/mac/accessibility/search-when-element-starts-in-table.html platform/mac/accessibility/attributed-string-includes-highlighting.html platform/mac/accessibility/search-predicate.html
Build Bot
Comment 11
2013-05-02 02:24:17 PDT
Created
attachment 200305
[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.2
Greg Hughes
Comment 12
2013-05-13 13:29:41 PDT
Created
attachment 201625
[details]
13623364.3 patch v3
EFL EWS Bot
Comment 13
2013-05-13 13:33:52 PDT
Comment on
attachment 201625
[details]
13623364.3 patch v3
Attachment 201625
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/451895
Greg Hughes
Comment 14
2013-05-13 13:33:59 PDT
Created
attachment 201627
[details]
Patch v4
Early Warning System Bot
Comment 15
2013-05-13 13:43:04 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass qt-ews (qt): Output:
http://webkit-queues.appspot.com/results/464389
EFL EWS Bot
Comment 16
2013-05-13 13:43:44 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/375883
EFL EWS Bot
Comment 17
2013-05-13 13:45:10 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/346896
Early Warning System Bot
Comment 18
2013-05-13 13:45:44 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass qt-wk2-ews (qt-wk2): Output:
http://webkit-queues.appspot.com/results/466353
Build Bot
Comment 19
2013-05-13 14:11:32 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/427960
Build Bot
Comment 20
2013-05-13 14:12:51 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/464390
kov's GTK+ EWS bot
Comment 21
2013-05-13 14:29:40 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass gtk-ews (gtk): Output:
http://webkit-queues.appspot.com/results/460837
Build Bot
Comment 22
2013-05-13 17:58:10 PDT
Comment on
attachment 201627
[details]
Patch v4
Attachment 201627
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/471001
Greg Hughes
Comment 23
2013-05-14 15:30:46 PDT
Created
attachment 201766
[details]
Patch v5, now with layout tests
Greg Hughes
Comment 24
2013-05-17 12:52:33 PDT
Created
attachment 202136
[details]
Patch v 5.1
Greg Hughes
Comment 25
2013-05-17 12:53:07 PDT
Created
attachment 202137
[details]
Patch v 5.2
chris fleizach
Comment 26
2013-05-20 23:46:15 PDT
Comment on
attachment 202137
[details]
Patch v 5.2 View in context:
https://bugs.webkit.org/attachment.cgi?id=202137&action=review
in the isOnscreen() method I think you can iterate through the parent objects just once and check whether the bounds of the object are within each parent
> Source/WebCore/accessibility/AccessibilityObject.cpp:1733 > + // Search up the parent chain and create a vector of all scrollable parent objects
Comments should explain why you need to do this (instead of explaining what you're doing)
> Source/WebCore/accessibility/AccessibilityObject.cpp:1738 > + for (AccessibilityObject* parentObject = this->parentObject(); parentObject; parentObject = parentObject->parentObject()) {
i think you can start the for loop with this, so that you don't have to append this before hand
> Source/WebCore/accessibility/AccessibilityObject.cpp:1743 > + objects.reverse();
you should iterate from count -> 0 instead of incurring the cost to reverse
> Source/WebCore/accessibility/AccessibilityObject.cpp:1746 > + // visible bounds of the outer object
comments should end in a period
> Source/WebCore/accessibility/AccessibilityObject.cpp:1752 > + const IntRect innerRect = pixelSnappedIntRect(inner->isAccessibilityScrollView() ? inner->parentObject()->boundingBoxRect() : inner->boundingBoxRect());
is there a need for using pixelSnappedIntRect?
> Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:921 > + [parameter setObject:[NSNumber numberWithBool:true] forKey:@"AXVisibleOnly"];
you should use YES instead of true here
> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:931 > + [parameter setObject:[NSNumber numberWithBool:true] forKey:@"AXVisibleOnly"];
you should use YES instead of true
Greg Hughes
Comment 27
2013-05-22 13:54:41 PDT
(In reply to
comment #26
)
> (From update of
attachment 202137
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=202137&action=review
> > in the isOnscreen() method I think you can iterate through the parent objects just once and check whether the bounds of the object are within each parent
No, because in each check you need to check the current scroll view to the next scroll view, that is why the first loop goes through to find all of the scroll views. The code is much more readable this way rather than in one look try to do both tasks.
> > > Source/WebCore/accessibility/AccessibilityObject.cpp:1733 > > + // Search up the parent chain and create a vector of all scrollable parent objects > > Comments should explain why you need to do this (instead of explaining what you're doing)
OK
> > > Source/WebCore/accessibility/AccessibilityObject.cpp:1738 > > + for (AccessibilityObject* parentObject = this->parentObject(); parentObject; parentObject = parentObject->parentObject()) { > > i think you can start the for loop with this, so that you don't have to append this before hand
No, because we need “this", and then every scrollable view in our stack of objects, that is why “this” is added first to the stack. I will clarify in the comment.
> > > Source/WebCore/accessibility/AccessibilityObject.cpp:1743 > > + objects.reverse(); > > you should iterate from count -> 0 instead of incurring the cost to reverse
Ok
> > > Source/WebCore/accessibility/AccessibilityObject.cpp:1746 > > + // visible bounds of the outer object > > comments should end in a period
OK
> > > Source/WebCore/accessibility/AccessibilityObject.cpp:1752 > > + const IntRect innerRect = pixelSnappedIntRect(inner->isAccessibilityScrollView() ? inner->parentObject()->boundingBoxRect() : inner->boundingBoxRect()); > > is there a need for using pixelSnappedIntRect?
Yes, because we want to know if it is onscreen so we have to snap to pixels
> > > Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm:921 > > + [parameter setObject:[NSNumber numberWithBool:true] forKey:@"AXVisibleOnly"]; > > you should use YES instead of true here
OK
> > > Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:931 > > + [parameter setObject:[NSNumber numberWithBool:true] forKey:@"AXVisibleOnly"]; > > you should use YES instead of true
OK
Greg Hughes
Comment 28
2013-05-22 15:08:11 PDT
Created
attachment 202625
[details]
Patch v6
Greg Hughes
Comment 29
2013-05-22 15:08:34 PDT
Created
attachment 202626
[details]
Patch v6.1
WebKit Commit Bot
Comment 30
2013-05-22 15:12:44 PDT
Attachment 202626
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/accessibility/attributed-string-includes-highlighting.html', u'LayoutTests/platform/mac/accessibility/search-predicate-expected.txt', u'LayoutTests/platform/mac/accessibility/search-predicate.html', u'LayoutTests/platform/mac/accessibility/search-when-element-starts-in-table.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/accessibility/AccessibilityObject.cpp', u'Source/WebCore/accessibility/AccessibilityObject.h', u'Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm', u'Tools/ChangeLog', u'Tools/DumpRenderTree/AccessibilityUIElement.cpp', u'Tools/DumpRenderTree/AccessibilityUIElement.h', u'Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp', u'Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm', u'Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm', u'Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp', u'Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp', u'Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h', u'Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl', u'Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp', u'Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm']" exit_code: 1 Source/WebCore/accessibility/AccessibilityObject.cpp:1740: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Greg Hughes
Comment 31
2013-05-22 15:17:33 PDT
Created
attachment 202628
[details]
Patch v7
chris fleizach
Comment 32
2013-05-22 17:45:59 PDT
Comment on
attachment 202628
[details]
Patch v7 View in context:
https://bugs.webkit.org/attachment.cgi?id=202628&action=review
> Source/WebCore/accessibility/AccessibilityObject.cpp:1733 > + // To figure out if the element is onscreen, we start by boulding of a stack starting with the
boulding -> building ( i presume)
Greg Hughes
Comment 33
2013-05-28 11:57:28 PDT
Created
attachment 203073
[details]
Patch v8
WebKit Commit Bot
Comment 34
2013-06-04 12:21:55 PDT
Comment on
attachment 203073
[details]
Patch v8 Clearing flags on attachment: 203073 Committed
r151179
: <
http://trac.webkit.org/changeset/151179
>
WebKit Commit Bot
Comment 35
2013-06-04 12:22:00 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