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

Side by Side Diff: Source/bindings/dart/gyp/scripts/massage_factories.py

Issue 24677002: Revert "Revert "Dartium changes for custom element lifecycle events."" (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (C) 2011 Google Inc. All rights reserved. 3 # Copyright (C) 2011 Google Inc. All rights reserved.
4 # 4 #
5 # Redistribution and use in source and binary forms, with or without 5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are 6 # modification, are permitted provided that the following conditions are
7 # met: 7 # met:
8 # 8 #
9 # * Redistributions of source code must retain the above copyright 9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer. 10 # notice, this list of conditions and the following disclaimer.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 (re.compile(r', bool'), ''), 60 (re.compile(r', bool'), ''),
61 (re.compile(r', v8::Isolate\*( isolate)?'), ''), 61 (re.compile(r', v8::Isolate\*( isolate)?'), ''),
62 (re.compile(r', isolate'), ''), 62 (re.compile(r', isolate'), ''),
63 (re.compile(r', v8::Handle<v8::Object> creationContext'), ''), 63 (re.compile(r', v8::Handle<v8::Object> creationContext'), ''),
64 (re.compile(r', creationContext'), ''), 64 (re.compile(r', creationContext'), ''),
65 (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'), 65 (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'),
66 (re.compile(r'V8'), 'Dart'), 66 (re.compile(r'V8'), 'Dart'),
67 ]) 67 ])
68 massage('cpp', [ 68 massage('cpp', [
69 (re.compile(r'^#include "V8'), '#include "Dart'), 69 (re.compile(r'^#include "V8'), '#include "Dart'),
70 (re.compile(r'^#include "bindings/v8/CustomElementWrapper.h"'), '#includ e "bindings/dart/DartCustomElement.h"'), 70 (re.compile(r'^#include "bindings/v8/CustomElementWrapper.h"'), '#includ e "bindings/dart/DartCustomElementWrapper.h"'),
71 (re.compile(r'v8\.h'), 'dart_api.h'), 71 (re.compile(r'v8\.h'), 'dart_api.h'),
72 (re.compile( 72 (re.compile(
73 r'return wrap\(static_cast<(\w+)\*>\(element\), creationContext, iso late\);'), 73 r'return wrap\(static_cast<(\w+)\*>\(element\), creationContext, iso late\);'),
74 r'return Dart\1::createWrapper(static_cast<\1*>(element));'), 74 r'return Dart\1::createWrapper(static_cast<\1*>(element));'),
75 (re.compile( 75 (re.compile(
76 r'return createWrapperFunction\(element, creationContext, isolate\)' ), 76 r'return createWrapperFunction\(element, creationContext, isolate\)' ),
77 r'return createWrapperFunction(element)'), 77 r'return createWrapperFunction(element)'),
78 (re.compile( 78 (re.compile(
79 r'return V8%sElement::createWrapper\(element, creationContext, isola te\);' % tag), 79 r'return V8%sElement::createWrapper\(element, creationContext, isola te\);' % tag),
80 r'return DartDOMWrapper::createWrapper<Dart%sElement>(element);' % t ag), 80 r'return DartDOMWrapper::createWrapper<Dart%sElement>(element);' % t ag),
81 (re.compile( 81 (re.compile(
82 r'return createV8HTMLFallbackWrapper\(toHTMLUnknownElement\(element\ ), creationContext, isolate\);'), 82 r'return createV8HTMLFallbackWrapper\(toHTMLUnknownElement\(element\ ), creationContext, isolate\);'),
83 r'return DartHTMLUnknownElement::createWrapper(toHTMLUnknownElement( element));'), 83 r'return DartHTMLUnknownElement::createWrapper(toHTMLUnknownElement( element));'),
84 (re.compile( 84 (re.compile(
85 r'return createV8HTMLDirectWrapper\(element, creationContext, isolat e\);'), 85 r'return createV8HTMLDirectWrapper\(element, creationContext, isolat e\);'),
86 r'return DartDOMWrapper::createWrapper<DartHTMLElement>(element);'), 86 r'return DartDOMWrapper::createWrapper<DartHTMLElement>(element);'),
87 (re.compile( 87 (re.compile(
88 r'= createV8HTMLDirectWrapper;'), 88 r'= createV8HTMLDirectWrapper;'),
89 r'= DartDOMWrapper::createWrapper<DartHTMLElement>;'), 89 r'= DartDOMWrapper::createWrapper<DartHTMLElement>;'),
90 (re.compile( 90 (re.compile(
91 r'#include "bindings/v8/CustomElementHelpers.h"'), 91 r'#include "bindings/v8/CustomElementHelpers.h"'),
92 r'#include "bindings/v8/CustomElementHelpers.h"\n#include "bindings/ dart/DartCustomElement.h"'), 92 r'#include "bindings/v8/CustomElementHelpers.h"\n#include "bindings/ dart/DartCustomElement.h"'),
93 (re.compile( 93 (re.compile(
94 r'return CustomElementWrapper<%sElement, V8%sElement>::wrap\(element , creationContext, isolate, createWrapperFunction\);' % (tag, tag)), 94 r'return CustomElementWrapper<%sElement, V8%sElement>::wrap\(element , creationContext, isolate, createWrapperFunction\);' % (tag, tag)),
95 r'return DartCustomElement::createWrapper(element, DartCustomElement ::CreateWrapperFunction(createWrapperFunction));'), 95 r'return DartCustomElementWrapper<%sElement>::wrap(element, createWr apperFunction);' % tag),
96 (re.compile( 96 (re.compile(
97 r'return wrap\(toHTMLUnknownElement\(element\), creationContext, iso late\);'), 97 r'return wrap\(toHTMLUnknownElement\(element\), creationContext, iso late\);'),
98 # FIXME: We map custom elements to DartHTMLElement here instead of D artHTMLUnknownElement. 98 r'return DartHTMLUnknownElement::createWrapper(toHTMLUnknownElement( element));'),
99 # This should be handled earlier.
100 r'return element->isCustomElement() ? DartDOMWrapper::createWrapper< DartHTMLElement>(element) : DartHTMLUnknownElement::createWrapper(toHTMLUnknownE lement(element));'),
101 (re.compile(r'createV8%sWrapper' % tag), r'createDart%sWrapper' % tag), 99 (re.compile(r'createV8%sWrapper' % tag), r'createDart%sWrapper' % tag),
102 (re.compile(r', v8::Isolate\*( isolate)?'), ''), 100 (re.compile(r', v8::Isolate\*( isolate)?'), ''),
103 (re.compile(r', v8::Handle<v8::Object> creationContext'), ''), 101 (re.compile(r', v8::Handle<v8::Object> creationContext'), ''),
104 (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'), 102 (re.compile(r'v8::Handle<v8::Object>'), 'Dart_Handle'),
105 (re.compile(r'findSVGTagNameOfV8Type\(const WrapperTypeInfo\* type\)'), 'findSVGTagNameOfDartType(Dart_Handle type)'), 103 (re.compile(r'findSVGTagNameOfV8Type\(const WrapperTypeInfo\* type\)'), 'findSVGTagNameOfDartType(Dart_Handle type)'),
106 (re.compile(r'findHTMLTagNameOfV8Type\(const WrapperTypeInfo\* type\)'), 'findHTMLTagNameOfDartType(Dart_Handle type)'), 104 (re.compile(r'findHTMLTagNameOfV8Type\(const WrapperTypeInfo\* type\)'), 'findHTMLTagNameOfDartType(Dart_Handle type)'),
107 (re.compile(r'V8CustomElement'), 'DartCustomElement'), 105 (re.compile(r'V8CustomElement'), 'DartCustomElement'),
108 (re.compile(r'\s*map.set\(WrapperTypeTraits.*\n'), ''), 106 (re.compile(r'\s*map.set\(WrapperTypeTraits.*\n'), ''),
109 (re.compile(r'HashMap<const WrapperTypeInfo\*, const QualifiedName\*>'), 'HashMap<Dart_Handle, const QualifiedName*>'), 107 (re.compile(r'HashMap<const WrapperTypeInfo\*, const QualifiedName\*>'), 'HashMap<Dart_Handle, const QualifiedName*>'),
110 ]) 108 ])
111 109
112 return 0 110 return 0
113 111
114 if __name__ == '__main__': 112 if __name__ == '__main__':
115 sys.exit(main(sys.argv)) 113 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « Source/bindings/dart/gyp/overrides.gypi ('k') | Source/bindings/v8/CustomElementConstructorBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698