Bug 12581 - XPath //title shouldn't match <title> in XHTML
Summary: XPath //title shouldn't match <title> in XHTML
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Alexey Proskuryakov
URL: http://www.yvon-thoraval.com/DOM/xpat...
Keywords:
Depends on: 12583
Blocks: 12584
  Show dependency treegraph
 
Reported: 2007-02-04 05:27 PST by Alexey Proskuryakov
Modified: 2007-02-11 01:16 PST (History)
0 users

See Also:


Attachments
proposed fix (3.50 KB, patch)
2007-02-04 08:12 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff
alternative fix (4.32 KB, patch)
2007-02-11 01:03 PST, Alexey Proskuryakov
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2007-02-04 05:27:51 PST
Try the first test from the bug URL - Firefox and Opera both don't match anything, while WebKit matches one element.
Comment 1 Alexey Proskuryakov 2007-02-04 08:12:36 PST
Created attachment 12919 [details]
proposed fix

This fixes the bug, but cannot be landed until bug 12583 is fixed (otherwise, two other tests break). I hope this won't take long, so submitting for review anyway.
Comment 2 Darin Adler 2007-02-04 18:04:49 PST
Comment on attachment 12919 [details]
proposed fix

r=me
Comment 3 Alexey Proskuryakov 2007-02-11 01:03:54 PST
Created attachment 13115 [details]
alternative fix

A fix that special-cases HTML documents, as discussed with Hyatt on IRC.
Comment 4 Dave Hyatt 2007-02-11 01:06:57 PST
Comment on attachment 13115 [details]
alternative fix

Also check for node->isHTMLElement(), sincei n the future we may end up letting XML elements be in HTML docs by various means (e.g., XBL).
Comment 5 Alexey Proskuryakov 2007-02-11 01:16:01 PST
Committed revision 19564.