mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1211624. document.all should be iterable, and so should be various other things that have an anonymous indexed getter. r=qdot
This commit is contained in:
parent
0ba87aa775
commit
0db6fe56cb
@ -851,3 +851,4 @@ skip-if = e10s || os != 'linux' || buildapp != 'browser'
|
||||
[test_explicit_user_agent.html]
|
||||
[test_change_policy.html]
|
||||
skip-if = buildapp == 'b2g' #no ssl support
|
||||
[test_document.all_iteration.html]
|
||||
|
11
dom/base/test/test_document.all_iteration.html
Normal file
11
dom/base/test/test_document.all_iteration.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test for document.all iteration behavior</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_array_equals([...document.all], document.getElementsByTagName("*"));
|
||||
}, "document.all should be iterable");
|
||||
</script>
|
@ -2222,7 +2222,14 @@ class MethodDefiner(PropertyDefiner):
|
||||
return (any("@@iterator" in m.aliases for m in methods) or
|
||||
any("@@iterator" == r["name"] for r in regular))
|
||||
|
||||
if (any(m.isGetter() and m.isIndexed() for m in methods)):
|
||||
# Check whether we need to output an @@iterator due to having an indexed
|
||||
# getter. We only do this while outputting non-static and
|
||||
# non-unforgeable methods, since the @@iterator function will be
|
||||
# neither.
|
||||
if (not static and
|
||||
not unforgeable and
|
||||
descriptor.supportsIndexedProperties() and
|
||||
isMaybeExposedIn(descriptor.operations['IndexedGetter'], descriptor)):
|
||||
if hasIterator(methods, self.regular):
|
||||
raise TypeError("Cannot have indexed getter/attr on "
|
||||
"interface %s with other members "
|
||||
|
Loading…
Reference in New Issue
Block a user