Title: [209644] trunk
Revision
209644
Author
dba...@webkit.org
Date
2016-12-09 18:53:40 -0800 (Fri, 09 Dec 2016)

Log Message

Add reflected nonce attribute to HTML Link element IDL
https://bugs.webkit.org/show_bug.cgi?id=165709

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add the reflected nonce attribute to the HTML Link element IDL definition
as per the HTML standard <https://html.spec.whatwg.org/multipage/semantics.html#the-link-element> (9 December 2016).

Test: fast/dom/nonce-attribute-reflection.html

* html/HTMLLinkElement.idl:

LayoutTests:

Add a test to ensure that we reflect the nonce attribute for the HTML link, script,
and style elements.

* fast/dom/nonce-attribute-reflection-expected.txt: Added.
* fast/dom/nonce-attribute-reflection.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209643 => 209644)


--- trunk/LayoutTests/ChangeLog	2016-12-10 02:46:31 UTC (rev 209643)
+++ trunk/LayoutTests/ChangeLog	2016-12-10 02:53:40 UTC (rev 209644)
@@ -1,3 +1,16 @@
+2016-12-09  Daniel Bates  <daba...@apple.com>
+
+        Add reflected nonce attribute to HTML Link element IDL
+        https://bugs.webkit.org/show_bug.cgi?id=165709
+
+        Reviewed by Ryosuke Niwa.
+
+        Add a test to ensure that we reflect the nonce attribute for the HTML link, script,
+        and style elements.
+
+        * fast/dom/nonce-attribute-reflection-expected.txt: Added.
+        * fast/dom/nonce-attribute-reflection.html: Added.
+
 2016-12-09  Ryan Haddad  <ryanhad...@apple.com>
 
         Marking inspector/debugger/csp-exceptions.html as flaky on mac-wk2.

Added: trunk/LayoutTests/fast/dom/nonce-attribute-reflection-expected.txt (0 => 209644)


--- trunk/LayoutTests/fast/dom/nonce-attribute-reflection-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/nonce-attribute-reflection-expected.txt	2016-12-10 02:53:40 UTC (rev 209644)
@@ -0,0 +1,12 @@
+Tests that the nonce attribute for HTML link, script, and style elements is reflected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS element = document.createElement("link"); element.setAttribute("nonce", "dummy"); element.nonce is "dummy"
+PASS element = document.createElement("script"); element.setAttribute("nonce", "dummy"); element.nonce is "dummy"
+PASS element = document.createElement("style"); element.setAttribute("nonce", "dummy"); element.nonce is "dummy"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/nonce-attribute-reflection.html (0 => 209644)


--- trunk/LayoutTests/fast/dom/nonce-attribute-reflection.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/nonce-attribute-reflection.html	2016-12-10 02:53:40 UTC (rev 209644)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script>
+description("Tests that the nonce attribute for HTML link, script, and style elements is reflected.");
+
+var element;
+var tagNamesToTest = ["link", "script", "style"];
+for (let tagName of tagNamesToTest)
+    shouldBeEqualToString(`element = document.createElement("${tagName}"); element.setAttribute("nonce", "dummy"); element.nonce`, "dummy");
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (209643 => 209644)


--- trunk/Source/WebCore/ChangeLog	2016-12-10 02:46:31 UTC (rev 209643)
+++ trunk/Source/WebCore/ChangeLog	2016-12-10 02:53:40 UTC (rev 209644)
@@ -1,3 +1,17 @@
+2016-12-09  Daniel Bates  <daba...@apple.com>
+
+        Add reflected nonce attribute to HTML Link element IDL
+        https://bugs.webkit.org/show_bug.cgi?id=165709
+
+        Reviewed by Ryosuke Niwa.
+
+        Add the reflected nonce attribute to the HTML Link element IDL definition
+        as per the HTML standard <https://html.spec.whatwg.org/multipage/semantics.html#the-link-element> (9 December 2016).
+
+        Test: fast/dom/nonce-attribute-reflection.html
+
+        * html/HTMLLinkElement.idl:
+
 2016-12-09  Eric Carlson  <eric.carl...@apple.com>
 
         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag

Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (209643 => 209644)


--- trunk/Source/WebCore/html/HTMLLinkElement.idl	2016-12-10 02:46:31 UTC (rev 209643)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl	2016-12-10 02:53:40 UTC (rev 209644)
@@ -40,5 +40,7 @@
     readonly attribute StyleSheet sheet;
 
     [PutForwards=value] readonly attribute DOMTokenList relList;
+
+    [Reflect] attribute DOMString nonce;
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to