Bug 28858 - Element.baseURI parses xml:base attribute incorrectly
Summary: Element.baseURI parses xml:base attribute incorrectly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 14:50 PDT by Alexey Proskuryakov
Modified: 2019-02-06 09:02 PST (History)
1 user (show)

See Also:


Attachments
test case (198 bytes, application/xhtml+xml)
2009-08-31 14:50 PDT, Alexey Proskuryakov
no flags Details
proper test case (will assert) (200 bytes, application/xhtml+xml)
2009-08-31 14:57 PDT, Alexey Proskuryakov
no flags Details
proposed fix (2.83 KB, patch)
2009-08-31 15:29 PDT, Alexey Proskuryakov
darin: 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 2009-08-31 14:50:51 PDT
Created attachment 38835 [details]
test case

Element.baseURI parses xml:base attribute as if it were an absolute URL returned by KURL::string(). Instead, an actual base URL should be used as a base for it (one for parent element or the document, I'm not sure).

See the attached test case, on which Firefox behaves differently. Depending on attribute value, we can also get an assertion failure now (no crash in release mode).
Comment 1 Alexey Proskuryakov 2009-08-31 14:57:20 PDT
Created attachment 38836 [details]
proper test case (will assert)

Actually, I was wrong - in this case, the behavior is correct, as baseURI() falls back to a different code path for invalid base URLs. I cannot see any release-mode bugs possibly caused by this.
Comment 2 Alexey Proskuryakov 2009-08-31 15:29:19 PDT
Created attachment 38837 [details]
proposed fix
Comment 3 Alexey Proskuryakov 2009-08-31 15:49:47 PDT
Committed revision 47910.
Comment 4 Lucas Forschler 2019-02-06 09:02:35 PST
Mass moving XML DOM bugs to the "DOM" Component.