[Webkit-unassigned] [Bug 54633] [Gtk] webkit_web_view_popup_menu_handler should call SelectionController::localCaretRect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 2 09:26:00 PST 2011


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





--- Comment #6 from Martin Robinson <mrobinson at webkit.org>  2011-03-02 09:26:00 PST ---
(In reply to comment #4)

Thanks so much for the review!

> (From update of attachment 82842 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82842&action=review
> 
> > Source/WebKit/gtk/webkit/webkitwebview.cpp:387
> > +    if (!selection->start().node() || !selection->end().node()
> 
> You must be using an old checkout.  Position::node() no longer exists.  What you want to do here is probably selection->selection()->isNonOrphanedCaretOrRange() since when start() or end() is orphaned, meaning that they're detached from the document, it doesn't make sense to query the firstRectForRange on that selection.

This patch was written before the change to ::node, I think. Made the fix you suggested here.

> 
> > Source/WebKit/gtk/webkit/webkitwebview.cpp:397
> > +    IntRect firstRect = frame->editor()->firstRectForRange(selection->selection().firstRange().get());
> 
> firstRange() will return 0 if selection->isNone().  You probably need to check this condition above as well (fortunately, if isNonOrphanedCaretOrRange returns true, then isNone is false so the suggested change above will fix this as well).

Done!

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