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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

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:
Download patch
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_Document.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 16ded066f2dd89e3a65f42ca04afa47122f53010..de2cb4748e3f1da82405463d3128a642ed788a53 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9846,11 +9846,9 @@ class Document extends Node
@DomName('Document.createElement')
Element createElement(String tagName, [String typeExtension]) {
- if (typeExtension == null) {
- return _createElement_2(tagName);
- } else {
- return _createElement(tagName, typeExtension);
- }
+ return (typeExtension == null)
+ ? _createElement_2(tagName)
+ : _createElement(tagName, typeExtension);
}
// The two-argument version of this is automatically generated, but we need to
@@ -9867,11 +9865,9 @@ class Document extends Node
@DomName('Document.createElementNS')
@DocsEditable()
Element createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) {
- 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);
}
@DomName('Document.createNodeIterator')
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_Document.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698