WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-159115-20160714171010.patch (text/plain), 4.92 KB, created by
youenn fablet
on 2016-07-14 08:10:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2016-07-14 08:10:59 PDT
Size:
4.92 KB
patch
obsolete
>Subversion Revision: 203223 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e74d5b67267e53ce6f7e3388e2c03898d814171d..2cc39232a8ba40c090185ed020a63cf280d23712 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,23 @@ > 2016-07-14 Youenn Fablet <youenn@apple.com> > >+ DOMIterators should be assigned a correct prototype >+ https://bugs.webkit.org/show_bug.cgi?id=159115 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Default iterator object internal prototype property is the Iterator prototype as defined in >+ http://heycam.github.io/webidl/#dfn-iterator-prototype-object. >+ Linking DOMIterator prototype to IteratorPrototype. >+ This allows adding @@iterator property to the result of entries, keys and values methods. >+ This in turns allow doing for-of loops on them. >+ >+ Covered by updated test. >+ >+ * ForwardingHeaders/runtime/IteratorPrototype.h: Added. >+ * bindings/js/JSDOMIterator.h: >+ >+2016-07-14 Youenn Fablet <youenn@apple.com> >+ > DOM value iterable interfaces should use Array prototype methods > https://bugs.webkit.org/show_bug.cgi?id=159296 > >diff --git a/Source/WebCore/ForwardingHeaders/runtime/IteratorPrototype.h b/Source/WebCore/ForwardingHeaders/runtime/IteratorPrototype.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6f0ddab83dd525c9530d8ac2e33b28a43c097928 >--- /dev/null >+++ b/Source/WebCore/ForwardingHeaders/runtime/IteratorPrototype.h >@@ -0,0 +1,2 @@ >+#pragma once >+#include <JavaScriptCore/IteratorPrototype.h> >diff --git a/Source/WebCore/bindings/js/JSDOMIterator.h b/Source/WebCore/bindings/js/JSDOMIterator.h >index 3a74d9f0705dd0023ca41bef33e5d51b27efd4d8..3e7455a17610acf537bbf4536502cabaeeab29d0 100644 >--- a/Source/WebCore/bindings/js/JSDOMIterator.h >+++ b/Source/WebCore/bindings/js/JSDOMIterator.h >@@ -27,6 +27,7 @@ > #define JSDOMIterator_h > > #include "JSDOMBinding.h" >+#include <runtime/IteratorPrototype.h> > #include <runtime/JSDestructibleObject.h> > #include <type_traits> > >@@ -97,7 +98,7 @@ public: > static JSDOMIteratorPrototype<JSWrapper>* createPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject) > { > return JSDOMIteratorPrototype<JSWrapper>::create(vm, globalObject, >- JSDOMIteratorPrototype<JSWrapper>::createStructure(vm, globalObject, globalObject->objectPrototype())); >+ JSDOMIteratorPrototype<JSWrapper>::createStructure(vm, globalObject, globalObject->iteratorPrototype())); > } > > JSC::JSValue next(JSC::ExecState&); >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 5c66d679a9544af624bdb132b894be698f8c8bb5..edbd6e1938b7022ca753264b1c904255db78add8 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,5 +1,14 @@ > 2016-07-14 Youenn Fablet <youenn@apple.com> > >+ DOMIterators should be assigned a correct prototype >+ https://bugs.webkit.org/show_bug.cgi?id=159115 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/fetch/api/headers/headers-basic.html: >+ >+2016-07-14 Youenn Fablet <youenn@apple.com> >+ > [Fetch API] Request and Response url getter should use URL serialization > https://bugs.webkit.org/show_bug.cgi?id=159705 > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html >index 5c374ed1fafeb34db7317d8e6e64723450ece558..6f0357b12714d9870ce96fa88276ac8559367aeb 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html >@@ -120,8 +120,10 @@ > "Content-Types": "value6" > }; > var sortedHeaderDict = {}; >+ var headerValues = []; > var sortedHeaderKeys = Object.keys(headerEntriesDict).map(function(value) { > sortedHeaderDict[value.toLowerCase()] = headerEntriesDict[value]; >+ headerValues.push(headerEntriesDict[value]); > return value.toLowerCase(); > }).sort(); > >@@ -135,6 +137,9 @@ > }); > assert_true(actual.next().done); > assert_true(actual.next().done); >+ >+ for (key of headers.keys()) >+ assert_true(sortedHeaderKeys.indexOf(key) != -1); > }, "Check keys method"); > > test(function() { >@@ -148,6 +153,9 @@ > }); > assert_true(actual.next().done); > assert_true(actual.next().done); >+ >+ for (value of headers.values()) >+ assert_true(headerValues.indexOf(value) != -1); > }, "Check values method"); > > test(function() { >@@ -162,6 +170,9 @@ > }); > assert_true(actual.next().done); > assert_true(actual.next().done); >+ >+ for (entry of headers.entries()) >+ assert_equals(entry[1], sortedHeaderDict[entry[0]]); > }, "Check entries method"); > > test(function() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 159115
:
282071
|
282073
|
282074
|
282075
|
282076
|
282090
|
282216
|
283640
|
283641
|
283662