[webkit-reviews] review granted: [Bug 15954] Move DOM Selection
operations out of SelectionController : [Attachment 17202]
proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 12 12:34:01 PST 2007
Darin Adler <darin at apple.com> has granted Alexey Proskuryakov <ap at webkit.org>'s
request for review:
Bug 15954: Move DOM Selection operations out of SelectionController
http://bugs.webkit.org/show_bug.cgi?id=15954
Attachment 17202: proposed patch
http://bugs.webkit.org/attachment.cgi?id=17202&action=edit
------- Additional Comments from Darin Adler <darin at apple.com>
+ if (selectionController->isNone())
+ return "None";
+ else if (selectionController->isCaret())
+ return "Caret";
+ else
+ return "Range";
We normally don't do else after return.
+ || node->offsetInCharacters() && offset > caretMaxOffset(node)
+ || !node->offsetInCharacters() && offset >
(int)node->childNodeCount()) {
Could probably rewrite this using ? : to not call offsetInCharacters twice. Or
maybe there should be a helper function for this relatively common operation?
+ // Safari Selection Object API
Wow, I'm really surprised to learn that baseNode is Safari-specific!
Great patch! r=me
More information about the webkit-reviews
mailing list