[Webkit-unassigned] [Bug 138552] WK1: Support default actions for read-only text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 10 11:16:03 PST 2014


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

--- Comment #4 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #3)
> Comment on attachment 241265 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241265&action=review
> 
> Lots of stylebot comments.
> 

Fixed!

> > Source/WebCore/editing/DictionaryLookup.h:43
> > +bool isPositionInRange(const VisiblePosition& position, Range* range);
> > +bool shouldUseSelection(const VisiblePosition& position, const VisibleSelection& selection);
> > +
> > +PassRefPtr<Range> rangeExpandedAroundPositionByCharacters(const VisiblePosition& position, int numberOfCharactersToExpand);
> 
> isPositionInRange and rangeExpandedAroundPositionByCharacters should
> probably be on VisiblePosition or Range or something, they're pretty
> generically useful (maybe there's already something there that we can
> replace these with?)
> 

Agreed. I filed https://bugs.webkit.org/show_bug.cgi?id=138567

> > Source/WebCore/editing/DictionaryLookup.mm:29
> > +#include "Document.h"
> 
> all of these should be 'import'
> 

Fixed!

> > Source/WebCore/editing/DictionaryLookup.mm:77
> > +PassRefPtr<Range> rangeExpandedAroundPositionByCharacters(const VisiblePosition& position, int numberOfCharactersToExpand)
> 
> Remind me to make use of this in Editor, where this code was originally
> stolen from.
> 

Will do! I made a note of that in the bug I filed!

> > Source/WebCore/editing/DictionaryLookup.mm:116
> > +    wkExtractWordDefinitionTokenRangeFromContextualString(fullPlainTextString, rangeToPass, options);
> 
> We should probably ditch the WKSI wrappers and add some LookUp SPI headers.
> 

Agreed. Will do this in the future.

> > Source/WebKit/mac/WebView/WebActionMenuController.mm:297
> > +static DictionaryPopupInfo performDictionaryLookupForRange(Frame* frame, Range& range, NSDictionary *options)
> 
> Can we put more of this in the WebCore?

We talked about this in person. The answer is yes, but not trivially. There are small differences in the code for WK1, unfortunately.

-- 
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/20141110/a130c2c9/attachment-0002.html>


More information about the webkit-unassigned mailing list