Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Document.createElementNS() #1391

Closed
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b3aaa4b
Document.creatElementNS() and reftest
therealglazou Dec 12, 2013
6666929
merge upstream
therealglazou Feb 21, 2014
4f8acae
Merge remote-tracking branch 'upstream/master' into therealglazou/cre…
therealglazou Feb 21, 2014
28933b1
new version of Document.createElementNS
therealglazou Feb 21, 2014
9f0e696
De-@mut pipeline
larsbergstrom Feb 11, 2014
2ec9649
Shut down the profiler in headless compositing mode
pcwalton Feb 21, 2014
4fe305c
Prevent '&nbsp' from stripping as whitespace
june0cho Feb 21, 2014
26cd50d
Fix: whitespace is considered as spaces(U+0020), tabs(U+0009), and li…
june0cho Feb 21, 2014
735d826
De-@mut the FrameTree.
larsbergstrom Feb 14, 2014
d39f028
Update rust-layers submodule
larsbergstrom Feb 19, 2014
998a561
Remove commented-out parts of Document.webidl and HTMLDocument.webidl.
Ms2ger Feb 22, 2014
f345b69
Create a Line DisplayItem
ngsankha Feb 17, 2014
a8716ad
add Element::new
therealglazou Feb 24, 2014
b4d5184
trailing ws
therealglazou Feb 24, 2014
99f02d1
reuse get_attribute_parts
therealglazou Feb 24, 2014
d5a5fb6
no lowercasing for html element names
therealglazou Feb 24, 2014
0f764df
adding comment with spec URL
therealglazou Feb 24, 2014
77bd9b0
simplify match in CreateElementNS
therealglazou Feb 24, 2014
916c5d1
simplify match in CreateElementNS
therealglazou Feb 24, 2014
f1d60a7
simplify namespace error cases
therealglazou Feb 24, 2014
575c25e
simplify namespace error cases
therealglazou Feb 24, 2014
1308285
remove the ': Namesapce'
therealglazou Feb 24, 2014
3c28d06
better test
therealglazou Feb 24, 2014
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

simplify namespace error cases

  • Loading branch information
therealglazou committed Feb 24, 2014
commit 575c25e7b86efb83acdadc214b00a721bdf3a9ca
@@ -303,16 +303,20 @@ impl Document {

let (prefix_from_qname, local_name_from_qname) = get_attribute_parts(qualified_name);
match (&ns, &prefix_from_qname, &local_name_from_qname) {
// throw if prefix is not null and namespace is null
(&namespace::Null, &Some(_), _) => {
debug!("Namespace can't be null with a non-null prefix");
return Err(NamespaceError);
},
// throw if prefix is "xml" and namespace is not the XML namespace
(_, &Some(~"xml"), _) => if (ns != namespace::XML) {
debug!("Namespace must be the xml namespace if the prefix is 'xml'");
return Err(NamespaceError);
},
(_, &Some(~"xmlns"), _) | (_, _, &~"xmlns") => if (ns != namespace::XMLNS) {
debug!("Namespace must be the xmlns namespace if the prefix or the qualified name is 'xmlns'");
// throw if namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"
(&namespace::XMLNS, &Some(~"xmlns"), _) | (&namespace::XMLNS, _, &~"xmlns") => {},
(&namespace::XMLNS, &Some(_), _) | (&namespace::XMLNS, _, _) => {
debug!("The prefix or the qualified name must be 'xmlns' if namespace is the XMLNS namespace ");
return Err(NamespaceError);
},
_ => {}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.