[webkit-reviews] review denied: [Bug 120119] Add some operator overloads to VisiblePosition : [Attachment 209410] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 22 17:32:49 PDT 2013


Ryosuke Niwa <rniwa at webkit.org> has denied Roger Fong <roger_fong at apple.com>'s
request for review:
Bug 120119: Add some operator overloads to VisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=120119

Attachment 209410: patch
https://bugs.webkit.org/attachment.cgi?id=209410&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
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-.


More information about the webkit-reviews mailing list