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
therealglazou
wants to merge
23
commits into
servo:master
from
therealglazou:therealglazou/createElementNS
+617
−701
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 6666929
merge upstream
therealglazou 4f8acae
Merge remote-tracking branch 'upstream/master' into therealglazou/cre…
therealglazou 28933b1
new version of Document.createElementNS
therealglazou 9f0e696
De-@mut pipeline
larsbergstrom 2ec9649
Shut down the profiler in headless compositing mode
pcwalton 4fe305c
Prevent ' ' from stripping as whitespace
june0cho 26cd50d
Fix: whitespace is considered as spaces(U+0020), tabs(U+0009), and li…
june0cho 735d826
De-@mut the FrameTree.
larsbergstrom d39f028
Update rust-layers submodule
larsbergstrom 998a561
Remove commented-out parts of Document.webidl and HTMLDocument.webidl.
Ms2ger f345b69
Create a Line DisplayItem
ngsankha a8716ad
add Element::new
therealglazou b4d5184
trailing ws
therealglazou 99f02d1
reuse get_attribute_parts
therealglazou d5a5fb6
no lowercasing for html element names
therealglazou 0f764df
adding comment with spec URL
therealglazou 77bd9b0
simplify match in CreateElementNS
therealglazou 916c5d1
simplify match in CreateElementNS
therealglazou f1d60a7
simplify namespace error cases
therealglazou 575c25e
simplify namespace error cases
therealglazou 1308285
remove the ': Namesapce'
therealglazou 3c28d06
better test
therealglazou File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Document.creatElementNS() and reftest
- Loading branch information
commit b3aaa4b6dd03df0785e9ef748636e48e146ed28a
| @@ -0,0 +1,60 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Document.createElementNS() test</title> | ||
| <script> | ||
| function test() { | ||
| var host = document.getElementById("body"); | ||
| function appendElt(e, id) { | ||
| host.appendChild(e); | ||
| e.id = id; | ||
| e.setAttribute("ns", e.namespaceURI); | ||
| } | ||
|
|
||
| var img1 = document.createElement("address"); | ||
| appendElt(img1, "img1"); | ||
| var img2 = document.createElementNS("http://www.example.org/dummy", "p"); | ||
| appendElt(img2, "img2"); | ||
| var img3 = document.createElementNS("http://www.w3.org/1999/xhtml", "address"); | ||
| appendElt(img3, "img3"); | ||
|
|
||
| function appendSpan(id, ns) { | ||
| var e = document.createElement("span"); | ||
| e.id = id; | ||
| e.setAttribute("ns", ns); | ||
| host.appendChild(e); | ||
| } | ||
| var ref = document.getElementById("ref"); | ||
| appendSpan("s1", ref.firstChild.namespaceURI); | ||
| appendSpan("s2", ref.ownerDocument.namespaceURI); | ||
| appendSpan("s3", ref.lastChild.namespaceURI); | ||
| } | ||
| </script> | ||
| <style> | ||
| @namespace dummy url("http://www.example.org/dummy"); | ||
| @namespace html url("http://www.w3.org/1999/xhtml"); | ||
|
|
||
| * { margin: 0px; padding: 0px; } | ||
|
|
||
| address, dummy|p, p, html|span { | ||
| width: 40px; | ||
| height: 40px; | ||
| background: red; | ||
| margin-bottom: 10px; | ||
| display: block; | ||
| } | ||
|
|
||
| address[ns="http://www.w3.org/1999/xhtml"], | ||
| dummy|p[ns="http://www.example.org/dummy"], | ||
| span[ns="null"] { | ||
| background: green; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body id="body"> | ||
| <div id="ref"> <!--comment--></div> | ||
| <script> | ||
| test(); | ||
| </script> | ||
| </body> | ||
| </html> |
| @@ -0,0 +1,27 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Document.createElementNS() test</title> | ||
| <style> | ||
| * { margin: 0px; padding: 0px; } | ||
|
|
||
| address, p, span { | ||
| width: 40px; | ||
| height: 40px; | ||
| background: green; | ||
| margin-bottom: 10px; | ||
| display: block; | ||
| } | ||
|
|
||
| </style> | ||
| </head> | ||
| <body id="body"> | ||
| <div id="ref"> <!--comment--></div> | ||
| <address></address> | ||
| <p></p> | ||
| <address></address> | ||
| <span></span> | ||
| <span></span> | ||
| <span></span> | ||
| </body> | ||
| </html> |
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This is not the
newyou're looking for. That's my fault; I should have renamed it tonew_inheritedlong ago. However, now that I've fixed that, you'll need to write a newnew, which callsnew_inheritedand reflects.