| Summary: | Some functions on DictionaryLookup.h should just be generic functions on Range or VisiblePosition | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Beth Dakin <bdakin> | ||||
| Component: | HTML Editing | Assignee: | Tim Horton <thorton> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bdakin, enrica, simon.fraser, thorton | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Beth Dakin
2014-11-10 11:12:28 PST
And rangeExpandedAroundPositionByCharacters()! Which is code originally stolen from Editor, according to Tim. Created attachment 259191 [details]
Patch
Comment on attachment 259191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=259191&action=review > Source/WebCore/dom/Range.cpp:1963 > +bool Range::contains(const VisiblePosition& position) const Can't we be more generic here and have the prototype of this function: bool Range::contains(const VisiblePosition &start, const VisiblePosition &end)? > Source/WebCore/editing/mac/DictionaryLookup.mm:61 > + return selectedRange->contains(position); To check whether a VisiblePosition is in a range of VisibleSelection, is not it sufficient to call Range::isPointInRange()? What is the difference if VisiblePosition is at the boundary of the range of VisibleSelection when: 1. calling Range::isPointInRange() 2. calling the deleted function isPositionInRange() 3. calling Range::contains() |