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

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: Take Kentaro's feedback into consideration 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..561745c1a63b22ba79a342d48ce5d9d78af2cd22 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -2694,11 +2694,20 @@ END
END
}
+ my $declaredFoundBoolean = 0;
haraken 2013/07/23 10:20:57 Nit: This is unused.
foreach my $attribute (@{$interface->attributes}) {
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 ($deprecation) {
haraken 2013/07/23 10:20:57 Nit: You can just say $attribute->extendedAttribut
+ $code .= " if ($dictionaryGetter)\n";
+ $code .= " " . GenerateDeprecationNotification($deprecation);
+ } 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