Bug 66638 - Range::setEnd(const Position&, ExceptionCode) calls setStart() instead of setEnd()
Summary: Range::setEnd(const Position&, ExceptionCode) calls setStart() instead of set...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alice Boxhall
URL:
Keywords:
Depends on:
Blocks: 65900
  Show dependency treegraph
 
Reported: 2011-08-21 22:27 PDT by Alice Boxhall
Modified: 2011-08-22 19:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.43 KB, patch)
2011-08-21 22:30 PDT, Alice Boxhall
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Boxhall 2011-08-21 22:27:56 PDT
Range::setEnd, introduced in bug 64403, incorrectly calls setStart(PassRefPtr<Node> refNode, int offset, ExceptionCode& ec) instead of the equivalent setEnd() method.
Comment 1 Alice Boxhall 2011-08-21 22:30:52 PDT
Created attachment 104640 [details]
Patch
Comment 2 Ryosuke Niwa 2011-08-22 09:34:36 PDT
Comment on attachment 104640 [details]
Patch

Oops, that was careless.  Thanks for fixing it.
Comment 3 Ryosuke Niwa 2011-08-22 10:19:54 PDT
Comment on attachment 104640 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104640&action=review

> Source/WebCore/ChangeLog:8
> +        Relevant layout test coming in a future patch (see https://bugs.webkit.org/show_bug.cgi?id=65900)

The patch for this bug doesn't appear to use setEnd.  Maybe a wrong bug number?
Comment 4 Alice Boxhall 2011-08-22 15:54:14 PDT
(In reply to comment #3)
> (From update of attachment 104640 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=104640&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Relevant layout test coming in a future patch (see https://bugs.webkit.org/show_bug.cgi?id=65900)
> 
> The patch for this bug doesn't appear to use setEnd.  Maybe a wrong bug number?

The patch doesn't, but the surrounding code does, in AccessibilityRenderObject::indexForVisiblePosition(const VisiblePosition&). The test for this patch exercises this code (which is how I found this bug in the first place).
Comment 5 Alice Boxhall 2011-08-22 15:55:10 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 104640 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=104640&action=review
> > 
> > > Source/WebCore/ChangeLog:8
> > > +        Relevant layout test coming in a future patch (see https://bugs.webkit.org/show_bug.cgi?id=65900)
> > 
> > The patch for this bug doesn't appear to use setEnd.  Maybe a wrong bug number?
> 
> The patch doesn't, but the surrounding code does, in AccessibilityRenderObject::indexForVisiblePosition(const VisiblePosition&). The test for this patch exercises this code (which is how I found this bug in the first place).

Oh, and that patch is out of date; I was waiting for this fix before I updated it, but now I realise that's unnecessary, so I'll update it now.
Comment 6 WebKit Review Bot 2011-08-22 19:07:16 PDT
Comment on attachment 104640 [details]
Patch

Clearing flags on attachment: 104640

Committed r93574: <http://trac.webkit.org/changeset/93574>
Comment 7 WebKit Review Bot 2011-08-22 19:07:20 PDT
All reviewed patches have been landed.  Closing bug.