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

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: Fix nits 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 cd82aff027380ca35809a45ddab051dae33d2e56..080a5bd642597a57e85eda40a468b586007ba9b4 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -2698,7 +2698,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";
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698