Bug 75799 - Calling intersectsNode on a detached range should throw
Summary: Calling intersectsNode on a detached range should throw
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-08 08:17 PST by Ms2ger (he/him; ⌚ UTC+1/+2)
Modified: 2019-02-06 09:03 PST (History)
5 users (show)

See Also:


Attachments
ProposedPatch (5.59 KB, patch)
2012-01-19 10:02 PST, Joe Thomas
no flags Details | Formatted Diff | Diff
Patch2 (5.62 KB, patch)
2012-01-19 11:18 PST, Joe Thomas
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Darin Adler 2012-01-10 10:20:22 PST
It would be trivial to fix this, and also seems it would do no harm if we later removed the concept of a detached range. So there is no reason not to add the 2-line check needed to comply.

(I also think we should change the bugs.webkit.org component name from XML DOM to Core DOM because the current name is too confusing.)
Comment 2 Joe Thomas 2012-01-19 10:02:37 PST
Created attachment 123144 [details]
ProposedPatch
Comment 3 Ms2ger (he/him; ⌚ UTC+1/+2) 2012-01-19 10:07:15 PST
View in context: https://bugs.webkit.org/attachment.cgi?id=123144&action=review

> Source/WebCore/dom/Range.cpp:602
> +    if ((m_start.container() && !refNode->attached())

This can be just !refNode->attached() now, no?
Comment 4 Joe Thomas 2012-01-19 11:18:11 PST
Created attachment 123154 [details]
Patch2
Comment 5 Joe Thomas 2012-01-19 11:19:02 PST
(In reply to comment #3)
> View in context: https://bugs.webkit.org/attachment.cgi?id=123144&action=review
> 
> > Source/WebCore/dom/Range.cpp:602
> > +    if ((m_start.container() && !refNode->attached())
> 
> This can be just !refNode->attached() now, no?

Yes, you are right. I did not notice that. new patch attached. Thanks.
Comment 6 WebKit Review Bot 2012-01-23 15:46:29 PST
Comment on attachment 123154 [details]
Patch2

Clearing flags on attachment: 123154

Committed r105649: <http://trac.webkit.org/changeset/105649>
Comment 7 WebKit Review Bot 2012-01-23 15:46:34 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Lucas Forschler 2019-02-06 09:03:45 PST
Mass moving XML DOM bugs to the "DOM" Component.