document.evaluate(.., contextNode, ...) should raise an exception if document != contextNode.ownerDocument

RESOLVED FIXED

Status

()

Core
XSLT
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: Sylvain Pasche, Assigned: peterv)

Tracking

({testcase})

Trunk
testcase
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1b1) Gecko/20060727 BonEcho/2.0b1
Build Identifier: 

The spec says:

"contextNode of type Node:
... If the XPathEvaluator was obtained by casting the Document then this must be owned by the same document ..."

Reproducible: Always
(Reporter)

Comment 1

12 years ago
Created attachment 231162 [details]
testcase from Hallvord R. M. Steen
(Reporter)

Updated

12 years ago
Keywords: testcase
(Assignee)

Comment 2

12 years ago
Created attachment 232325 [details] [diff] [review]
v1
Assignee: xslt → peterv
Status: UNCONFIRMED → ASSIGNED
Attachment #232325 - Flags: superreview?(bugmail)
Attachment #232325 - Flags: review?(bugmail)
This is causing compat issues with other UAs; we should really get this fixed for 1.9.
Flags: blocking1.9?
Attachment #232325 - Flags: superreview?(bugmail)
Attachment #232325 - Flags: superreview+
Attachment #232325 - Flags: review?(bugmail)
Attachment #232325 - Flags: review+
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 4

12 years ago
document.evaluate(..., document, ...) throws an exception now.  It doesn't own itself.  Was this intended?
(Assignee)

Comment 5

12 years ago
Not really, though the spec wording should probably be improved a bit.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
(Assignee)

Updated

12 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 6

12 years ago
Created attachment 233214 [details] [diff] [review]
Document fix v1
Attachment #233214 - Flags: superreview?(bugmail)
Attachment #233214 - Flags: review?(bugmail)
I believe this caused bug 348466.  Is that just a dupe of this bug, now?
*** Bug 348466 has been marked as a duplicate of this bug. ***
Comment on attachment 233214 [details] [diff] [review]
Document fix v1

r+sr=bzbarsky
Attachment #233214 - Flags: superreview?(bugmail)
Attachment #233214 - Flags: superreview+
Attachment #233214 - Flags: review?(bugmail)
Attachment #233214 - Flags: review+
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED
Can we test this in the XSLT test suite?  Or do we need to add some XSLT mochitests?
Flags: blocking1.9? → in-testsuite?
That sounds ideal, in some ways.
You need to log in before you can comment on or make changes to this bug.