[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 06:24:03 PST 2012


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


Mario Sanchez Prada <msanchez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cfleizach at apple.com




--- Comment #3 from Mario Sanchez Prada <msanchez at igalia.com>  2012-01-11 06:24:03 PST ---
(In reply to comment #2)
> (From update of attachment 121860 [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.

-- 
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