[Webkit-unassigned] [Bug 174856] AX: Incorrect range from index and length in contenteditable with <p> tags

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 26 09:19:45 PDT 2017


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

chris fleizach <cfleizach at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #316437|review?                     |review+
              Flags|                            |

--- Comment #6 from chris fleizach <cfleizach at apple.com> ---
Comment on attachment 316437
  --> https://bugs.webkit.org/attachment.cgi?id=316437
patch

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

>>>>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3956
>>>>> +            return m_object->doAXStringForRange(plainTextRange);
>>>> 
>>>> is this not possible to fix in the characterOffsetForIndex? do you know the reason?
>>> 
>>> I think the problem here is that for text controls, the AXValue comes from the AccessibilityNodeObject::text() (we call downcast<HTMLTextFormControlElement>(*node).value() or downcast<Element>(node)->innerText()).
>>> This value can be different from what textIterator gives us. In this case it will contain two newline characters instead of one visually.
>>> So when we try to get the range of text we should match that with the entire element value.
>> 
>> does this need to be nativeTextControl() then? I think textControl also pulls in role=textbox
> 
> I think isTextControl() is what we want, otherwise the problematic contenteditable wouldn't be covered. nativeTextControl() only returns true for form controls and <textarea>

ok so contenteitable also ends up using innerText() instead of a text iterator?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170726/0a800167/attachment-0001.html>


More information about the webkit-unassigned mailing list