[Webkit-unassigned] [Bug 25571] DOM range methods setStartBefore/setEndAfter fails on detached elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 12 16:57:26 PDT 2014


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





--- Comment #32 from Darin Adler <darin at apple.com>  2014-07-12 16:57:41 PST ---
(From update of attachment 225142)
View in context: https://bugs.webkit.org/attachment.cgi?id=225142&action=review

Hmm, wait it looks like there was a reply to Ryosuke’s comment, just not in the right place for him to see it.

The real reason for review- is a different mistake. See below:

> Source/WebCore/dom/Range.cpp:1273
> -    ec = 0;
> -    setStartBefore(refNode, ec);
> +    setStart(refNode->parentNode(), refNode->nodeIndex(), ec);

This change is incorrect. We need to set ec to zero before calling setStart just as the old code set ec to zero before setStartBefore; the caller is not obliged to set ec to anything before calling us. Otherwise we can’t safely check the value of ec after calling setStart.

> Source/WebCore/dom/Range.h:113
> +    void setStartBefore(Node*, ExceptionCode& = ASSERT_NO_EXCEPTION);

This change is incorrect. I don’t understand why we think it’s needed.

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