[Webkit-unassigned] [Bug 75785] [GTK] accessibility/textbox-role-reports-line-number.html fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 11 10:49:46 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=75785





--- Comment #4 from chris fleizach <cfleizach at apple.com>  2012-01-11 10:49:46 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 121860 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=121860&action=review
> > 
> > > Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp:794
> > > +    if (coreObject->isPasswordField() || coreObject->selectionEnd() > 0)
> > > +        return -1;
> > 
> > Does the fact that there is selected text really mean this is no insertion point? Isn't the insertion point the end of the selection or some-such thing?
> 
> Not sure, I just did mimic what the Mac port does when it's asked for the insertion point's _line number_ in WebAccessibilityObjectWrapper.mm:
> 
>    [...]
>         if ([attributeName isEqualToString: NSAccessibilityInsertionPointLineNumberAttribute]) {
>             // if selectionEnd > 0, then there is selected text and this question should not be answered
>             if (m_object->isPasswordField() || m_object->selectionEnd() > 0)
>                 return nil;
> 
>             AccessibilityObject* focusedObject = m_object->focusedUIElement();
>             if (focusedObject != m_object)
>                 return nil;
> 
>             VisiblePosition focusedPosition = focusedObject->visiblePositionForIndex(focusedObject->selectionStart(), true);
>             int lineNumber = m_object->lineForPosition(focusedPosition);
>             if (lineNumber < 0)
>                 return nil;
> 
>             return [NSNumber numberWithInt:lineNumber];
>         }
>    [...]
> 
> The only difference is that we don't have that code in our ATK wrapper (there's no such property in ATK/ATSPI), so I needed to add this code to DumpRenderTreeSupportGTK.
> 
> Adding Chris to CC, he probably can explain better (or just 'actually' explain it) the rationale behind those checks.

I guess insertion point line number only makes sense on the Mac if there's no selection. I'm sure this was put in to mimic some behavior on the mac. (for password fields, i imagine we don't want to return any incriminating evidence). I don't there's a reason why insertion point line number shouldn't exist just because there's a selection

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list