[Webkit-unassigned] [Bug 36427] XPathEvaluator returns invalid root node
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 22 17:45:32 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36427
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Platform|PC |All
OS/Version|Linux |All
Severity|Blocker |Normal
Component|XML DOM |XML
CC| |ap at webkit.org
--- Comment #1 from Alexey Proskuryakov <ap at webkit.org> 2010-03-22 17:45:32 PST ---
> xpe.evaluate("/", document.body ... // returns window.document in Webkit.
The description doesn't match test case - in the latter, it's a detached
subtree of elements created with document.createElement:
var fset = window.fset = document.createElement('fieldset');
fset.appendChild( document.createElement('legend') );
var form = document.createElement('form');
form.appendChild( document.createElement('input') );
fset.appendChild( form );
// get fieldset
assert( evaluateXPath(fset,'/')[0] == fset, 'Trying to get fieldset element.'
); // fails for webkit
assert( evaluateXPath(fset,'/form')[0] == form, 'Tring to get form element'
);
Anyway, the XPath spec <http://www.w3.org/TR/xpath/> says "/ selects the
document root (which is always the parent of the document element)". Why do you
think that this is a bug in WebKit?
--
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