Changeset 197098 in webkit
- Timestamp:
- Feb 25, 2016, 4:49:14 AM (11 years ago)
- Location:
- releases/WebKitGTK/webkit-2.12
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/Window/addEventListener-implicit-this-expected.txt (modified) (1 diff)
-
LayoutTests/fast/dom/Window/addEventListener-implicit-this.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog
r197097 r197098 1 2016-02-22 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/ 4 https://bugs.webkit.org/show_bug.cgi?id=154547 5 <rdar://problem/24772167> 6 7 Reviewed by Gavin Barraclough. 8 9 Add regression test for <rdar://problem/24772167>. 10 11 * fast/dom/Window/addEventListener-implicit-this-expected.txt: 12 * fast/dom/Window/addEventListener-implicit-this.html: 13 1 14 2016-02-22 Simon Fraser <simon.fraser@apple.com> 2 15 -
releases/WebKitGTK/webkit-2.12/LayoutTests/fast/dom/Window/addEventListener-implicit-this-expected.txt
r196588 r197098 11 11 PASS xhrDispatchEventFunction.call(undefined, new Event('myevent')) is true 12 12 PASS wasWindowEventListenerCalled is true 13 PASS addEventListenerFunction('myevent2', function() { wasWindowEventListenerCalled = true; }); did not throw exception. 14 PASS window.dispatchEvent(new Event('myevent2')) is true 15 PASS wasWindowEventListenerCalled is true 13 16 PASS successfullyParsed is true 14 17 -
releases/WebKitGTK/webkit-2.12/LayoutTests/fast/dom/Window/addEventListener-implicit-this.html
r196588 r197098 33 33 shouldBeTrue("wasWindowEventListenerCalled"); 34 34 35 wasWindowEventListenerCalled = false; 36 shouldNotThrow("addEventListenerFunction('myevent2', function() { wasWindowEventListenerCalled = true; });"); 37 shouldBeTrue("window.dispatchEvent(new Event('myevent2'))"); 38 shouldBeTrue("wasWindowEventListenerCalled"); 39 40 35 41 </script> 36 42 <script src="../../../resources/js-test-post.js"></script> -
releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog
r197097 r197098 1 2016-02-22 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/ 4 https://bugs.webkit.org/show_bug.cgi?id=154547 5 <rdar://problem/24772167> 6 7 Reviewed by Gavin Barraclough. 8 9 The Website was doing the following: 10 $ var e = window.addEventListener; 11 $ e("eventname", handler) 12 13 In such case, the jsEventTargetPrototypeFunctionDispatchEvent() bindings 14 implementation was caused with a thisValue which is a JSLexicalEnvironment 15 and the implementation did not know how to convert it into a global object. 16 The previous implementation on JSDOMWindow used to handle tis correctly 17 because it was always calling JSValue::toThis() on the thisValue before 18 trying to cast it to a JSDOMWindow, and JSLexicalEnvironment::toThis() 19 gets the globalThisValue. This patch updates the EventTarget bindings 20 code to call always call toThis() on the thisValue before trying to 21 cast it. This should correctly deal with JSLexicalEnvironment and be a 22 no-op in usual cases. 23 24 No new tests, extended existing test. 25 26 * bindings/scripts/CodeGeneratorJS.pm: 27 (GenerateFunctionCastedThis): 28 1 29 2016-02-22 Simon Fraser <simon.fraser@apple.com> 2 30 -
releases/WebKitGTK/webkit-2.12/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r197091 r197098 3234 3234 # We allow calling the EventTarget API without an explicit 'this' value and fall back to using the global object instead. 3235 3235 # As of early 2016, this matches Firefox and Chrome's behavior. 3236 push(@implContent, " auto castedThis = thisValue.isUndefinedOrNull() ? $castingHelper(thisValue.toThis(state, NotStrictMode)) : $castingHelper(thisValue);\n");3236 push(@implContent, " auto castedThis = $castingHelper(thisValue.toThis(state, NotStrictMode));\n"); 3237 3237 } else { 3238 3238 push(@implContent, " auto castedThis = $castingHelper(thisValue);\n");
Note:
See TracChangeset
for help on using the changeset viewer.