RESOLVED FIXED 26214
RenderTextControl: Remove ASSERT for checking that visiblePositionForIndex()'s return is not null.
https://bugs.webkit.org/show_bug.cgi?id=26214
Summary RenderTextControl: Remove ASSERT for checking that visiblePositionForIndex()'...
Takeshi Yoshino
Reported 2009-06-05 02:53:36 PDT
visiblePositionForIndex can return an instance that returns true for isNotNull(). One of common case is when the corresponding input element has "-webkit-user-select: none" style attribute. We should allow the case instead of putting ASSERT.
Attachments
Proposed fix for 26214 (4.77 KB, patch)
2009-06-05 03:00 PDT, Takeshi Yoshino
no flags
Proposed fix for 26214 (rev2) (4.63 KB, patch)
2009-06-08 20:25 PDT, Takeshi Yoshino
justin.garcia: review+
Takeshi Yoshino
Comment 1 2009-06-05 03:00:03 PDT
Created attachment 31000 [details] Proposed fix for 26214
Eric Seidel (no email)
Comment 2 2009-06-08 17:57:56 PDT
Comment on attachment 31000 [details] Proposed fix for 26214 Why does this need to be guarded in an if? Doesn't VisibleSelection(foo, null) result in an empty selection? or does that ASSERT too?
Takeshi Yoshino
Comment 3 2009-06-08 20:24:38 PDT
(In reply to comment #2) > (From update of attachment 31000 [details] [review]) > Why does this need to be guarded in an if? Doesn't VisibleSelection(foo, null) > result in an empty selection? or does that ASSERT too? > Yes, creation of VisibleSelection can be put outside if-clause. Fixed. The line ASSERT(startPosition.deepEquivalent().node()->shadowAncestorNode() == node() && endPosition.deepEquivalent().node()->shadowAncestorNode() == node()); must be guarded into if-clause because deepEquivalent() can be null. In fact, I observe shadowAncestorNode() called with this=null.
Takeshi Yoshino
Comment 4 2009-06-08 20:25:28 PDT
Created attachment 31079 [details] Proposed fix for 26214 (rev2)
Justin Garcia
Comment 5 2009-06-09 18:09:44 PDT
Comment on attachment 31079 [details] Proposed fix for 26214 (rev2) r=me
Takeshi Yoshino
Comment 6 2009-06-10 02:17:54 PDT
Thank you. Could you land this for me?
Brent Fulgham
Comment 7 2009-06-10 11:21:34 PDT
Landed in @r44578.
Takeshi Yoshino
Comment 8 2009-06-10 18:59:38 PDT
(In reply to comment #7) > Landed in @r44578. > Thank you.
Note You need to log in before you can comment on or make changes to this bug.