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

Unified Diff: tools/dom/templates/html/impl/impl_Document.darttemplate

Issue 1488793002: Tweak Document.createElement for better inlining (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Document.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index 20608131f28dd55b9a744d431ceac5d4465cf9f2..8b9d22bc5f1f95f714936ff587cc31cd31dc7bc9 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -64,11 +64,9 @@ $endif
@DomName('Document.createElement')
Element createElement(String tagName, [String typeExtension]) {
$if DART2JS
- if (typeExtension == null) {
- return _createElement_2(tagName);
- } else {
- return _createElement(tagName, typeExtension);
- }
+ return (typeExtension == null)
+ ? _createElement_2(tagName)
+ : _createElement(tagName, typeExtension);
$else
var newElement = (typeExtension == null) ?
_blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
@@ -107,11 +105,9 @@ $endif
@DocsEditable()
Element createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) {
$if DART2JS
- if (typeExtension == null) {
- return _createElementNS_2(namespaceURI, qualifiedName);
- } else {
- return _createElementNS(namespaceURI, qualifiedName, typeExtension);
- }
+ return (typeExtension == null)
+ ? _createElementNS_2(namespaceURI, qualifiedName)
+ : _createElementNS(namespaceURI, qualifiedName, typeExtension);
$else
var newElement = (typeExtension == null) ?
_blink.BlinkDocument.instance.createElementNS_Callback_2_(unwrap_jso(this), namespaceURI, qualifiedName) :
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698