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

Side by Side Diff: Source/core/scripts/make_names.pl

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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
« no previous file with comments | « Source/core/rendering/svg/SVGRootInlineBox.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 2
3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. 3 # Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org> 4 # Copyright (C) 2009, Julien Chaffraix <jchaffraix@webkit.org>
5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob ile.com/) 5 # Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmob ile.com/)
6 # Copyright (C) 2011 Ericsson AB. All rights reserved. 6 # Copyright (C) 2011 Ericsson AB. All rights reserved.
7 # 7 #
8 # Redistribution and use in source and binary forms, with or without 8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions 9 # modification, are permitted provided that the following conditions
10 # are met: 10 # are met:
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 my $conditional = $enabledTags{$tagName}{conditional}; 971 my $conditional = $enabledTags{$tagName}{conditional};
972 if ($conditional) { 972 if ($conditional) {
973 my $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")"; 973 my $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")";
974 print F "#if ${conditionalString}\n\n"; 974 print F "#if ${conditionalString}\n\n";
975 } 975 }
976 976
977 if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) { 977 if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
978 print F <<END 978 print F <<END
979 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te) 979 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te)
980 { 980 {
981 Settings* settings = element->document()->settings(); 981 Settings* settings = element->document().settings();
982 if (!RuntimeEnabledFeatures::mediaEnabled() || (settings && !settings->media Enabled())) 982 if (!RuntimeEnabledFeatures::mediaEnabled() || (settings && !settings->media Enabled()))
983 return createV8$parameters{namespace}DirectWrapper(element, creationCont ext, isolate); 983 return createV8$parameters{namespace}DirectWrapper(element, creationCont ext, isolate);
984 return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isol ate); 984 return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isol ate);
985 } 985 }
986 986
987 END 987 END
988 ; 988 ;
989 } elsif ($enabledTags{$tagName}{contextConditional}) { 989 } elsif ($enabledTags{$tagName}{contextConditional}) {
990 my $contextConditional = $enabledTags{$tagName}{contextConditional}; 990 my $contextConditional = $enabledTags{$tagName}{contextConditional};
991 print F <<END 991 print F <<END
992 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te) 992 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te)
993 { 993 {
994 if (!ContextFeatures::${contextConditional}Enabled(element->document())) 994 if (!ContextFeatures::${contextConditional}Enabled(&element->document()))
995 return createV8$parameters{namespace}FallbackWrapper(to$parameters{fallb ackInterfaceName}(element), creationContext, isolate); 995 return createV8$parameters{namespace}FallbackWrapper(to$parameters{fallb ackInterfaceName}(element), creationContext, isolate);
996 return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isol ate); 996 return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isol ate);
997 } 997 }
998 END 998 END
999 ; 999 ;
1000 } elsif ($enabledTags{$tagName}{runtimeConditional}) { 1000 } elsif ($enabledTags{$tagName}{runtimeConditional}) {
1001 my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional}; 1001 my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional};
1002 print F <<END 1002 print F <<END
1003 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te) 1003 static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namesp ace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te)
1004 { 1004 {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 print F StaticString::GenerateStringImpls(\%parameters); 1272 print F StaticString::GenerateStringImpls(\%parameters);
1273 1273
1274 while ( my ($name, $identifier) = each %parameters ) { 1274 while ( my ($name, $identifier) = each %parameters ) {
1275 print F " new ((void*)&$name) AtomicString(${name}Impl);\n"; 1275 print F " new ((void*)&$name) AtomicString(${name}Impl);\n";
1276 } 1276 }
1277 1277
1278 print F "}\n}\n}\n"; 1278 print F "}\n}\n}\n";
1279 close F; 1279 close F;
1280 exit 0; 1280 exit 0;
1281 } 1281 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGRootInlineBox.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698