Bug 18066 - REGRESSION: createAttribute throws NAMESPACE_ERR exception
Summary: REGRESSION: createAttribute throws NAMESPACE_ERR exception
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P1 Major
Assignee: Julien Chaffraix
URL:
Keywords: EasyFix, Regression
Depends on:
Blocks:
 
Reported: 2008-03-25 07:20 PDT by Romain Bohdanowicz
Modified: 2019-02-06 09:03 PST (History)
3 users (show)

See Also:


Attachments
Test Case (519 bytes, patch)
2008-03-25 07:21 PDT, Romain Bohdanowicz
no flags Details | Formatted Diff | Diff
Test Case (576 bytes, text/html)
2008-03-28 03:38 PDT, Romain Bohdanowicz
no flags Details
New Test Case (576 bytes, text/html)
2008-03-28 03:39 PDT, Romain Bohdanowicz
no flags Details
Add a boolean parameter to createAttributeNS to bypass namespace checks (5.42 KB, patch)
2008-05-29 17:12 PDT, Julien Chaffraix
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Bohdanowicz 2008-03-25 07:20:15 PDT
Since Nightly r31232 webkit throws an exception if a namespace is used with the createAttribute method.

Example : document.createAttribute("ba:profile");
Comment 1 Romain Bohdanowicz 2008-03-25 07:21:19 PDT
Created attachment 20025 [details]
Test Case
Comment 2 Mark Rowe (bdash) 2008-03-25 11:58:29 PDT
Sounds like a side-effect of <http://webkit.org/blog/167/webkit-gets-an-a-on-acid3/>.
Comment 3 Eric Seidel (no email) 2008-03-25 13:26:31 PDT
I *knew* I should have created a createAttribute("foo:bar") test case...

Should be easy to fix.
Comment 4 Romain Bohdanowicz 2008-03-28 03:34:23 PDT
Comment on attachment 20025 [details]
Test Case

><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head>
>		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
>		<title>Test</title>
>		<script type="text/javascript" charset="utf-8">
>			function test()
>			{
>				try
>				{
>					var attribute = document.createAttribute("ba:test");
window.alert("No bug with this WebKit");
>				}
>				catch(e)
>				{
>					window.alert(e.message);
>				}
>			}
>		</script>
>	</head><body id="regression" onload="javascript:test();">
>	
></body></html>
Comment 5 Romain Bohdanowicz 2008-03-28 03:35:37 PDT
Comment on attachment 20025 [details]
Test Case

><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><body><pre style="word-wrap: break-word; white-space: pre-wrap;"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
><html>
>	<head>
>		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
>		<title>Test</title>
>		<script type="text/javascript" charset="utf-8">
>			function test()
>			{
>				try
>				{
>					var attribute = document.createAttribute("ba:test");
>                                     window.alert("Bug not happening with this WebKit");
>				}
>				catch(e)
>				{
>					window.alert(e.message);
>				}
>			}
>		</script>
>	</head>
>	<body id="regression" onload="javascript:test();">
>	</body>
></html>
Comment 6 Romain Bohdanowicz 2008-03-28 03:38:46 PDT
Created attachment 20153 [details]
Test Case
Comment 7 Romain Bohdanowicz 2008-03-28 03:39:39 PDT
Created attachment 20154 [details]
New Test Case
Comment 8 Eric Seidel (no email) 2008-04-08 02:05:59 PDT
All regressions are P1.
Comment 9 Romain Bohdanowicz 2008-05-14 07:05:07 PDT
Still happens in r33431.
Comment 10 Julien Chaffraix 2008-05-29 17:12:08 PDT
Created attachment 21424 [details]
Add a boolean parameter to createAttributeNS to bypass namespace checks
Comment 11 Darin Adler 2008-05-29 17:27:48 PDT
Comment on attachment 21424 [details]
Add a boolean parameter to createAttributeNS to bypass namespace checks

Looks good, r=me.
Comment 12 Julien Chaffraix 2008-06-02 12:55:20 PDT
Committed in r34315.
Comment 13 Lucas Forschler 2019-02-06 09:03:26 PST
Mass moving XML DOM bugs to the "DOM" Component.