[Webkit-unassigned] [Bug 120119] Add some operator overloads to VisiblePosition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 22 17:36:18 PDT 2013


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


Roger Fong <roger_fong at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #4 from Roger Fong <roger_fong at apple.com>  2013-08-22 17:35:46 PST ---
(In reply to comment #3)
> (From update of attachment 209410 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=209410&action=review
> 
> > Source/WebCore/dom/Position.h:243
> > +inline bool operator<(const Position& a, const Position& b)
> > +{
> > +    return a.anchorNode() == b.anchorNode() && a.deprecatedEditingOffset() < b.deprecatedEditingOffset() && a.anchorType() == b.anchorType();
> > +}
> 
> I don't think this comparison operator makes sense.  Just because nodes aren't same doesn't mean they aren't comparable.
> 
> If anything, we should be calling comparePositions instead. r-.

didn't realize that method existed...will use that instead.

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