Bug 28858

Summary: Element.baseURI parses xml:base attribute incorrectly
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: DOMAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
test case
none
proper test case (will assert)
none
proposed fix darin: review+

Alexey Proskuryakov
Reported 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).
Attachments
test case (198 bytes, application/xhtml+xml)
2009-08-31 14:50 PDT, Alexey Proskuryakov
no flags
proper test case (will assert) (200 bytes, application/xhtml+xml)
2009-08-31 14:57 PDT, Alexey Proskuryakov
no flags
proposed fix (2.83 KB, patch)
2009-08-31 15:29 PDT, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 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.
Alexey Proskuryakov
Comment 2 2009-08-31 15:29:19 PDT
Created attachment 38837 [details] proposed fix
Alexey Proskuryakov
Comment 3 2009-08-31 15:49:47 PDT
Committed revision 47910.
Lucas Forschler
Comment 4 2019-02-06 09:02:35 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note You need to log in before you can comment on or make changes to this bug.