[Webkit-unassigned] [Bug 114227] Text selected with double-click gets unselected after DOM modification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 23 12:20:05 PDT 2013


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





--- Comment #22 from Santosh Mahto <santosh.ma at samsung.com>  2013-10-23 12:18:51 PST ---
(In reply to comment #21)
> (From update of attachment 214701 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214701&action=review
> 
> >>> Source/WebCore/editing/FrameSelection.cpp:463
> >>> +        if (base != extent || !m_selection.isRange())
> >> 
> >> Where did !m_selection.isRange() come from?
> > 
> > I was trying to put better check here. 
> > In case of caret selection also base == range. So in case of caret selection i wanted to use selection update by base/extent.
> > 
> > I mean i wanted to update the selection by start/end only if base == extent and its range selection.
> > 
> > Isn't it ok??
> 
> But why?

I wanted my case(update selection start/end ) to be handled only in double-click case.
Without !m_selection.isRange()
Below code will be executed in two case : 1. double-click selection and dom modification and   2. caret selection and dom updation. I just wanted keep old behavior for caret selection.

         else if (m_selection.isDirectional() && !m_selection.isBaseFirst())
             newSelection.setWithoutValidation(end, start);
         else
           newSelection.setWithoutValidation(start, end);


But now i think start/end is better even in case of caret selection.
So will remove the  !m_selection.isRange()

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