Title: [281206] trunk
- Revision
- 281206
- Author
- [email protected]
- Date
- 2021-08-18 12:13:37 -0700 (Wed, 18 Aug 2021)
Log Message
Implement Crypto.randomUUID()
https://bugs.webkit.org/show_bug.cgi?id=229240
Reviewed by Geoffrey Garen.
LayoutTests/imported/w3c:
Rebaseline WPT tests that are now passing.
* web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt:
* web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt:
Source/WebCore:
Implement Crypto.randomUUID():
- https://wicg.github.io/uuid/#extensions-to-the-crypto-interface
Chrome already implements this and Firefox seems to be working on it
(https://bugzilla.mozilla.org/show_bug.cgi?id=1705264).
No new tests, rebaselined existing tests.
* page/Crypto.cpp:
(WebCore::Crypto::randomUUID const):
* page/Crypto.h:
* page/Crypto.idl:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (281205 => 281206)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-18 19:13:37 UTC (rev 281206)
@@ -1,3 +1,15 @@
+2021-08-18 Chris Dumez <[email protected]>
+
+ Implement Crypto.randomUUID()
+ https://bugs.webkit.org/show_bug.cgi?id=229240
+
+ Reviewed by Geoffrey Garen.
+
+ Rebaseline WPT tests that are now passing.
+
+ * web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt:
+ * web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt:
+
2021-08-18 Martin Robinson <[email protected]>
[css-scroll-snap] Don't snap to offscreen snap areas in unidirectional scrolls
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt (281205 => 281206)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any-expected.txt 2021-08-18 19:13:37 UTC (rev 281206)
@@ -1,5 +1,5 @@
-FAIL namespace format self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
-FAIL version set self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
-FAIL variant set self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
+PASS namespace format
+PASS version set
+PASS variant set
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt (281205 => 281206)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/randomUUID.https.any.worker-expected.txt 2021-08-18 19:13:37 UTC (rev 281206)
@@ -1,5 +1,5 @@
-FAIL namespace format self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
-FAIL version set self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
-FAIL variant set self.crypto.randomUUID is not a function. (In 'self.crypto.randomUUID()', 'self.crypto.randomUUID' is undefined)
+PASS namespace format
+PASS version set
+PASS variant set
Modified: trunk/Source/WebCore/ChangeLog (281205 => 281206)
--- trunk/Source/WebCore/ChangeLog 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/Source/WebCore/ChangeLog 2021-08-18 19:13:37 UTC (rev 281206)
@@ -1,3 +1,23 @@
+2021-08-18 Chris Dumez <[email protected]>
+
+ Implement Crypto.randomUUID()
+ https://bugs.webkit.org/show_bug.cgi?id=229240
+
+ Reviewed by Geoffrey Garen.
+
+ Implement Crypto.randomUUID():
+ - https://wicg.github.io/uuid/#extensions-to-the-crypto-interface
+
+ Chrome already implements this and Firefox seems to be working on it
+ (https://bugzilla.mozilla.org/show_bug.cgi?id=1705264).
+
+ No new tests, rebaselined existing tests.
+
+ * page/Crypto.cpp:
+ (WebCore::Crypto::randomUUID const):
+ * page/Crypto.h:
+ * page/Crypto.idl:
+
2021-08-18 Andres Gonzalez <[email protected]>
Add layout test for WebAccessibilityObjectWrapper handler for attribute AXLineForTextMarker on MacOS.
Modified: trunk/Source/WebCore/page/Crypto.cpp (281205 => 281206)
--- trunk/Source/WebCore/page/Crypto.cpp 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/Source/WebCore/page/Crypto.cpp 2021-08-18 19:13:37 UTC (rev 281206)
@@ -35,6 +35,7 @@
#include "SubtleCrypto.h"
#include <_javascript_Core/ArrayBufferView.h>
#include <wtf/CryptographicallyRandomNumber.h>
+#include <wtf/UUID.h>
#if OS(DARWIN)
#include <CommonCrypto/CommonCryptor.h>
@@ -68,6 +69,11 @@
return { };
}
+String Crypto::randomUUID() const
+{
+ return createCanonicalUUIDString();
+}
+
#if ENABLE(WEB_CRYPTO)
SubtleCrypto& Crypto::subtle()
Modified: trunk/Source/WebCore/page/Crypto.h (281205 => 281206)
--- trunk/Source/WebCore/page/Crypto.h 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/Source/WebCore/page/Crypto.h 2021-08-18 19:13:37 UTC (rev 281206)
@@ -46,6 +46,7 @@
virtual ~Crypto();
ExceptionOr<void> getRandomValues(JSC::ArrayBufferView&);
+ String randomUUID() const;
#if ENABLE(WEB_CRYPTO)
SubtleCrypto& subtle();
Modified: trunk/Source/WebCore/page/Crypto.idl (281205 => 281206)
--- trunk/Source/WebCore/page/Crypto.idl 2021-08-18 19:05:11 UTC (rev 281205)
+++ trunk/Source/WebCore/page/Crypto.idl 2021-08-18 19:13:37 UTC (rev 281206)
@@ -33,4 +33,5 @@
] interface Crypto {
[Conditional=WEB_CRYPTO, SecureContext] readonly attribute SubtleCrypto subtle;
ArrayBufferView getRandomValues([ReturnValue] ArrayBufferView array);
+ [SecureContext] DOMString randomUUID();
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes