WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
26297
Faulty logic in AccessibilityRenderObject::isSelected
https://bugs.webkit.org/show_bug.cgi?id=26297
Summary
Faulty logic in AccessibilityRenderObject::isSelected
Xan Lopez
Reported
2009-06-10 13:45:22 PDT
Code is: bool AccessibilityRenderObject::isSelected() const { if (!m_renderer) return false; Node* node = m_renderer->node(); if (!node) return false; return false; } I'm not sure if the last 'false' was meant to be 'true', but in any case it seems to me the function can't be right. My naive implementation of this would be to get the VisibleSelection and check if isNone() is true, but I'm sure there's better ways of doing it.
Attachments
Add attachment
proposed patch, testcase, etc.
chris fleizach
Comment 1
2009-06-12 23:51:58 PDT
i think the last false is OK, since we don't want to return true for default for isSelected there's obviously something missing though that should return true for some state. This isSelected does not correspond to the selection (at least on the mac... that's represented by AXSelectedTextRange). it's used more in the context of a multi-select list where one of the list items is selected (i'm pretty sure that AccessibilityListBoxOption overrides this method) So while this code does not necessarily look correct, I'm not sure what elements WebKit does want to return true for isSelected... if we identify those elements and their states, we would want to change that
James Craig
Comment 2
2013-09-30 12:05:29 PDT
<
rdar://problem/15113521
>
chris fleizach
Comment 3
2014-02-19 09:28:44 PST
isSelected() is not meant to be the TextSelection. It's for things like aria-selected=true
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