Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: Source/bindings/scripts/deprecated_code_generator_v8.pm

Issue 20034002: Add support for KeyboardEvent.location attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/scripts/deprecated_code_generator_v8.pm
diff --git a/Source/bindings/scripts/deprecated_code_generator_v8.pm b/Source/bindings/scripts/deprecated_code_generator_v8.pm
index b62eca64ae971819bd90f2e63df68e08f4d09e9c..d49ce7ef64eb85e1da4c90c794b23ada80e61206 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -2702,7 +2702,15 @@ END
if ($attribute->extendedAttributes->{"InitializedByEventConstructor"}) {
if ($attribute->type ne "any") {
my $attributeName = $attribute->name;
- $code .= " options.get(\"$attributeName\", eventInit.$attributeName);\n";
+ my $attributeImplName = GetImplName($attribute);
+ my $deprecation = $attribute->extendedAttributes->{"DeprecateAs"};
+ my $dictionaryGetter = "options.get(\"$attributeName\", eventInit.$attributeImplName)";
+ if ($attribute->extendedAttributes->{"DeprecateAs"}) {
+ $code .= " if ($dictionaryGetter)\n";
+ $code .= " " . GenerateDeprecationNotification($attribute->extendedAttributes->{"DeprecateAs"});
+ } else {
+ $code .= " $dictionaryGetter;\n";
+ }
}
}
}
« no previous file with comments | « LayoutTests/fast/events/script-tests/keydown-numpad-keys.js ('k') | Source/bindings/tests/idls/TestExtendedEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698