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

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

Issue 14626005: Upgrade elements that are created before a custom element definition is registered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback+test Created 7 years, 7 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/dom/Element.cpp ('k') | no next file » | 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 890
891 891
892 print F "\nPassRefPtr<$parameters{namespace}Element> $parameters{namespace}Eleme ntFactory::create$parameters{namespace}Element(const QualifiedName& qName, Docum ent* document"; 892 print F "\nPassRefPtr<$parameters{namespace}Element> $parameters{namespace}Eleme ntFactory::create$parameters{namespace}Element(const QualifiedName& qName, Docum ent* document";
893 print F ", HTMLFormElement* formElement" if $parameters{namespace} eq "HTML"; 893 print F ", HTMLFormElement* formElement" if $parameters{namespace} eq "HTML";
894 print F ", bool createdByParser)\n{\n"; 894 print F ", bool createdByParser)\n{\n";
895 895
896 print F <<END 896 print F <<END
897 if (!document) 897 if (!document)
898 return 0; 898 return 0;
899 899
900 if (CustomElementRegistry::isCustomTagName(qName.localName())) { 900 if (RuntimeEnabledFeatures::customDOMElementsEnabled() && CustomElementRegis try::isCustomTagName(qName.localName())) {
901 RefPtr<Element> element = document->ensureCustomElementRegistry()->creat eCustomTagElement(qName); 901 RefPtr<Element> element = document->ensureCustomElementRegistry()->creat eCustomTagElement(qName);
902 ASSERT(element->is$parameters{namespace}Element()); 902 ASSERT(element->is$parameters{namespace}Element());
903 return static_pointer_cast<$parameters{namespace}Element>(element.releas e()); 903 return static_pointer_cast<$parameters{namespace}Element>(element.releas e());
904 } 904 }
905 905
906 if (!gFunctionMap) 906 if (!gFunctionMap)
907 createFunctionMap(); 907 createFunctionMap();
908 if (ConstructorFunction function = gFunctionMap->get(qName.localName().impl( ))) { 908 if (ConstructorFunction function = gFunctionMap->get(qName.localName().impl( ))) {
909 END 909 END
910 ; 910 ;
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 } 1259 }
1260 } 1260 }
1261 END 1261 END
1262 ; 1262 ;
1263 print F "#endif // $parameters{guardFactoryWith}\n\n" if $parameters{guardFa ctoryWith}; 1263 print F "#endif // $parameters{guardFactoryWith}\n\n" if $parameters{guardFa ctoryWith};
1264 1264
1265 print F "#endif // V8$parameters{namespace}ElementWrapperFactory_h\n"; 1265 print F "#endif // V8$parameters{namespace}ElementWrapperFactory_h\n";
1266 1266
1267 close F; 1267 close F;
1268 } 1268 }
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698