Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 37dd666

Browse files
Source/WebCore:
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins) https://bugs.webkit.org/show_bug.cgi?id=165872 Reviewed by Chris Dumez. Revert the Location.ancestorOrigins part of r204679 because google.com is relying on it returning a DOMStringList (or at least something with a .item() function), rather than a frozen javascript array. Spec changes are tracked with whatwg/html#2179. * page/Location.cpp: (WebCore::Location::ancestorOrigins): * page/Location.h: * page/Location.idl: Change Location.ancestorOrigins back to returning a DOMStringList. Source/WebKit2: [WebIDL] Add support for converting dictionaries to JS https://bugs.webkit.org/show_bug.cgi?id=165367 Reviewed by Chris Dumez. * CMakeLists.txt: Add missing directories to look in for headers. LayoutTests: REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins) https://bugs.webkit.org/show_bug.cgi?id=165872 Reviewed by Chris Dumez. * fast/dom/Window/Location/ancestor-origins-expected.txt: * fast/dom/Window/Location/ancestor-origins.html: Change back to test that Location.ancestorOrigins returns a DOMStringList. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 334a90a commit 37dd666

File tree

8 files changed

+55
-13
lines changed

8 files changed

+55
-13
lines changed

LayoutTests/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2016-12-14 Sam Weinig
2+
3+
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
4+
5+
https://bugs.webkit.org/show_bug.cgi?id=165872
6+
7+
Reviewed by Chris Dumez.
8+
9+
* fast/dom/Window/Location/ancestor-origins-expected.txt:
10+
* fast/dom/Window/Location/ancestor-origins.html:
11+
Change back to test that Location.ancestorOrigins returns a DOMStringList.
12+
113
2016-12-14 Ryan Haddad
214

315
Marking streams/pipe-to.html as flaky on macOS debug.

LayoutTests/fast/dom/Window/Location/ancestor-origins-expected.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ Test the Location object's ancestorOrigins property.
33
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
44

55

6-
PASS window.location.ancestorOrigins is an instance of Array
6+
PASS window.location.ancestorOrigins is an instance of DOMStringList
77
PASS window.location.ancestorOrigins.length is 0
8-
PASS Object.isFrozen(window.location.ancestorOrigins) is true
98
PASS window.location.ancestorOrigins === window.location.ancestorOrigins is true
10-
PASS subframeOrigins is an instance of Array
119
PASS subframeOrigins.length is 1
1210
PASS subframeOrigins[0] is 'file://'
1311
PASS successfullyParsed is true

LayoutTests/fast/dom/Window/Location/ancestor-origins.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
description("Test the Location object's ancestorOrigins property.")
1111

12-
shouldBeType("window.location.ancestorOrigins", "Array");
12+
shouldBeType("window.location.ancestorOrigins", "DOMStringList");
1313
shouldBe("window.location.ancestorOrigins.length", "0");
14-
shouldBeTrue("Object.isFrozen(window.location.ancestorOrigins)");
1514
shouldBeTrue("window.location.ancestorOrigins === window.location.ancestorOrigins");
1615

1716
var subframeOrigins;
@@ -20,7 +19,6 @@
2019
{
2120
subframeOrigins = event.data;
2221

23-
shouldBeType("subframeOrigins", "Array");
2422
shouldBe("subframeOrigins.length", "1");
2523
shouldBe("subframeOrigins[0]", "'file://'");
2624

@@ -30,7 +28,11 @@
3028
script>
3129
<iframe srcdoc="
3230
3537
">iframe>
3638
<script src="../../../../resources/js-test-post.js">script>

Source/WebCore/ChangeLog

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
2016-12-14 Sam Weinig
2+
3+
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
4+
5+
https://bugs.webkit.org/show_bug.cgi?id=165872
6+
7+
Reviewed by Chris Dumez.
8+
9+
Revert the Location.ancestorOrigins part of r204679 because google.com is relying on
10+
it returning a DOMStringList (or at least something with a .item() function), rather
11+
than a frozen javascript array.
12+
13+
Spec changes are tracked with https://github.com/whatwg/html/issues/2179.
14+
15+
* page/Location.cpp:
16+
(WebCore::Location::ancestorOrigins):
17+
* page/Location.h:
18+
* page/Location.idl:
19+
Change Location.ancestorOrigins back to returning a DOMStringList.
20+
121
2016-12-14 Dave Hyatt
222

323
[CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe

Source/WebCore/page/Location.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ String Location::origin() const
131131
return SecurityOrigin::create(url())->toString();
132132
}
133133

134-
Vector> Location::ancestorOrigins() const
134+
Ref> Location::ancestorOrigins() const
135135
{
136-
Vector origins;
136+
auto origins = DOMStringList::create();
137137
if (!m_frame)
138138
return origins;
139139
for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent())
140-
origins.append(frame->document()->securityOrigin()->toString());
140+
origins->append(frame->document()->securityOrigin()->toString());
141141
return origins;
142142
}
143143

Source/WebCore/page/Location.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Location : public ScriptWrappable, public RefCounted, public DOM
6868

6969
String toString() const { return href(); }
7070

71-
Vector> ancestorOrigins() const;
71+
Ref> ancestorOrigins() const;
7272

7373
private:
7474
explicit Location(Frame*);

Source/WebCore/page/Location.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858

5959
readonly attribute USVString origin;
6060

61-
// FIXME: Add support for SameObject
62-
[Unforgeable, CachedAttribute] readonly attribute FrozenArray ancestorOrigins;
61+
// FIXME: Add support for SameObject.
62+
[Unforgeable, CachedAttribute] readonly attribute DOMStringList ancestorOrigins;
6363
};

Source/WebKit2/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2016-12-04 Sam Weinig
2+
3+
[WebIDL] Add support for converting dictionaries to JS
4+
https://bugs.webkit.org/show_bug.cgi?id=165367
5+
6+
Reviewed by Chris Dumez.
7+
8+
* CMakeLists.txt:
9+
Add missing directories to look in for headers.
10+
111
2016-12-14 Anders Carlsson
212

313
Add WKContextRefreshPlugIns

0 commit comments

Comments
 (0)