[Webkit-unassigned] [Bug 99438] [WK2][WTR] Text input controller needs selectedRange implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 26 05:01:28 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=99438
--- Comment #7 from Mariusz Grzegorczyk <mariusz.g at samsung.com> 2012-10-26 05:02:37 PST ---
(In reply to comment #6)
> (In reply to comment #5)
> > > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3314
> > > > +bool WebPage::selectedRangeForTesting(int* start, int* length)
> > >
> > > Is there a reason for not just moving WebPage::getSelectedRange() from WebPageMac.mm to here?
> >
> > I'm afraid of NSRange usage in Mac port. There failure is marked as location = NSNotFound
>
> There's only one user for this function:
> WKView selectedRange
> so assuming you modified getSelectedRange to return a boolean like your new function and not set NSNotFound, wouldn't something like this work?
>
> diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm
> index 0f221c6..d0fda59 100644
> --- a/Source/WebKit2/UIProcess/API/mac/WKView.mm
> +++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm
> @@ -1427 +1427,2 @@ static const short kIOHIDEventTypeScroll = 6;
> - _data->_page->getSelectedRange(selectionStart, selectionLength);
> + if (!_data->_page->getSelectedRange(selectionStart, selectionLength))
> + selectionStart = NSNotFound;
Ok, I'll try this. Will see what Mac developers say.
--
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