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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
5 # Copyright (C) 2006 Apple Computer, Inc. 5 # Copyright (C) 2006 Apple Computer, Inc.
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. 10 # Copyright (C) 2012 Ericsson AB. All rights reserved.
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 2687
2688 if ($interface->parent) { 2688 if ($interface->parent) {
2689 my $interfaceBase = $interface->parent; 2689 my $interfaceBase = $interface->parent;
2690 $code .= <<END; 2690 $code .= <<END;
2691 if (!fill${interfaceBase}Init(eventInit, options)) 2691 if (!fill${interfaceBase}Init(eventInit, options))
2692 return false; 2692 return false;
2693 2693
2694 END 2694 END
2695 } 2695 }
2696 2696
2697 my $declaredFoundBoolean = 0;
2697 foreach my $attribute (@{$interface->attributes}) { 2698 foreach my $attribute (@{$interface->attributes}) {
2698 if ($attribute->extendedAttributes->{"InitializedByEventConstructor"}) { 2699 if ($attribute->extendedAttributes->{"InitializedByEventConstructor"}) {
2699 if ($attribute->type ne "any") { 2700 if ($attribute->type ne "any") {
2700 my $attributeName = $attribute->name; 2701 my $attributeName = $attribute->name;
2701 $code .= " options.get(\"$attributeName\", eventInit.$attribu teName);\n"; 2702 my $attributeImplName = GetImplName($attribute);
2703 my $deprecation = $attribute->extendedAttributes->{"DeprecateAs" };
2704 $code .= " ";
2705 if ($deprecation) {
2706 unless ($declaredFoundBoolean) {
2707 $code .= "bool ";
2708 $declaredFoundBoolean = 1;
2709 }
2710 $code .= "found = ";
2711 }
2712 $code .= "options.get(\"$attributeName\", eventInit.$attributeIm plName);\n";
2713 if ($deprecation) {
2714 $code .= " if (found)\n";
2715 $code .= " " . GenerateDeprecationNotification($deprecati on);
haraken 2013/07/23 09:21:30 How about generating the following code? Then 'fou
do-not-use 2013/07/23 10:12:04 OK. Will do.
2716 }
2702 } 2717 }
2703 } 2718 }
2704 } 2719 }
2705 2720
2706 $code .= <<END; 2721 $code .= <<END;
2707 return true; 2722 return true;
2708 } 2723 }
2709 2724
2710 END 2725 END
2711 $implementation{nameSpaceWebCore}->add($code); 2726 $implementation{nameSpaceWebCore}->add($code);
(...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
6005 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6020 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6006 $found = 1; 6021 $found = 1;
6007 } 6022 }
6008 return 1 if $found; 6023 return 1 if $found;
6009 }, 0); 6024 }, 0);
6010 6025
6011 return $found; 6026 return $found;
6012 } 6027 }
6013 6028
6014 1; 6029 1;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698