[Webkit-unassigned] [Bug 25444] SelectionStart, selectionEnd properties return wrong values when the selection is in a form input

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 5 19:14:51 PDT 2010


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





--- Comment #13 from Ryosuke Niwa <rniwa at webkit.org>  2010-11-05 19:14:51 PST ---
(From update of attachment 73054)
View in context: https://bugs.webkit.org/attachment.cgi?id=73054&action=review

> WebCore/rendering/RenderTextControl.cpp:262
> +    if (!m_innerText || !m_innerText.get()->contains(n)) 

Not need to call get().  You can do m_innerText->contains(n)

> WebCore/rendering/RenderTextControl.cpp:300
> +    if (!indexPosition.node() || (indexPosition.node()->rootEditableElement() != m_innerText && !isSelectableElement(indexPosition.node())))

Can we also incorporate the condition indexPosition.node()->rootEditableElement() != m_innerText into isSelectableElement?  I think that'll improve the clarity here.

> LayoutTests/fast/forms/selection-start-end-readonly-expected.txt:1
> +https://bugs.webkit.org/show_bug.cgi?id=25444

I don't think we typically add a URL to bug because it's pretty clear which bug added this test if you see the svn log / trac.  But I'd like to see some descriptions on what this test is testing.  It's not clear at all from this output what output is expected.  If this test fails in the future, how do we know what is the correct behavior?

> LayoutTests/fast/forms/selection-start-end-readonly-expected.txt:9
> +Set Range: 0, 10
> +[Result] Start: 0, End: 10
> +
> +Set Range: 0, 9
> +[Result] Start: 0, End: 9

Could you make this a script test and output PASS/FAIL?

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