Changeset 196588 in webkit
- Timestamp:
- Feb 15, 2016 12:09:54 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196582 r196588 1 2016-02-15 Chris Dumez <cdumez@apple.com> 2 3 Regression(r196563): It is no longer possible to call window.addEventListener without an explicit 'this' 4 https://bugs.webkit.org/show_bug.cgi?id=154245 5 6 Reviewed by Ryosuke Niwa. 7 8 Add a layout test to cover the use of the EventListener API without an 9 explicit 'this' value. 10 11 * fast/dom/Window/addEventListener-implicit-this-expected.txt: Added. 12 * fast/dom/Window/addEventListener-implicit-this.html: Added. 13 1 14 2016-02-15 Daniel Bates <dabates@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r196583 r196588 1 2016-02-15 Chris Dumez <cdumez@apple.com> 2 3 Regression(r196563): It is no longer possible to call window.addEventListener without an explicit 'this' 4 https://bugs.webkit.org/show_bug.cgi?id=154245 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch adds support for calling the EventListener API without an 9 explicit 'this' value. If no explicit 'this' value is passed, then we 10 fall back to using the global object. This matches Chrome and Firefox's 11 behavior. It also fixes the Dromaeo/cssquery-dojo.html test. 12 13 Test: fast/dom/Window/addEventListener-implicit-this.html 14 15 * bindings/scripts/CodeGeneratorJS.pm: 16 (GenerateFunctionCastedThis): 17 1 18 2016-02-14 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r196568 r196588 3236 3236 } else { 3237 3237 push(@implContent, " JSValue thisValue = state->thisValue();\n"); 3238 push(@implContent, " auto castedThis = " . GetCastingHelperForThisObject($interface) . "(thisValue);\n"); 3238 my $castingHelper = GetCastingHelperForThisObject($interface); 3239 if ($interfaceName eq "EventTarget") { 3240 # We allow calling the EventTarget API without an explicit 'this' value and fall back to using the global object instead. 3241 # As of early 2016, this matches Firefox and Chrome's behavior. 3242 push(@implContent, " auto castedThis = thisValue.isUndefinedOrNull() ? $castingHelper(thisValue.toThis(state, NotStrictMode)) : $castingHelper(thisValue);\n"); 3243 } else { 3244 push(@implContent, " auto castedThis = $castingHelper(thisValue);\n"); 3245 } 3239 3246 my $domFunctionName = $function->signature->name; 3240 3247 push(@implContent, " if (UNLIKELY(!castedThis))\n");
Note: See TracChangeset
for help on using the changeset viewer.