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

Side by Side Diff: lib/runtime/dart/convert.js

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase onto latest Created 5 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
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var convert = dart.defineLibrary(convert, {}); 1 var convert = dart.defineLibrary(convert, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var async = dart.import(async); 3 var async = dart.import(async);
4 var typed_data = dart.import(typed_data); 4 var typed_data = dart.import(typed_data);
5 var _internal = dart.import(_internal); 5 var _internal = dart.import(_internal);
6 var collection = dart.import(collection); 6 var collection = dart.import(collection);
7 (function(exports, core, async, typed_data, _internal, collection) { 7 (function(exports, core, async, typed_data, _internal, collection) {
8 'use strict'; 8 'use strict';
9 let Codec$ = dart.generic(function(S, T) { 9 let Codec$ = dart.generic(function(S, T) {
10 class Codec extends core.Object { 10 class Codec extends core.Object {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 this.mode = mode; 512 this.mode = mode;
513 super.Converter(); 513 super.Converter();
514 } 514 }
515 convert(text) { 515 convert(text) {
516 let val = this[_convert](text, 0, text.length); 516 let val = this[_convert](text, 0, text.length);
517 return val == null ? text : val; 517 return val == null ? text : val;
518 } 518 }
519 [_convert](text, start, end) { 519 [_convert](text, start, end) {
520 let result = null; 520 let result = null;
521 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) { 521 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) {
522 let ch = core.String.get(text, i); 522 let ch = text.get(i);
523 let replace = null; 523 let replace = null;
524 switch (ch) { 524 switch (ch) {
525 case '&': 525 case '&':
526 { 526 {
527 replace = '&amp;'; 527 replace = '&amp;';
528 break; 528 break;
529 } 529 }
530 case ' ': 530 case ' ':
531 { 531 {
532 replace = '&nbsp;'; 532 replace = '&nbsp;';
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 exports.LineSplitter = LineSplitter; 2428 exports.LineSplitter = LineSplitter;
2429 exports.StringConversionSink = StringConversionSink; 2429 exports.StringConversionSink = StringConversionSink;
2430 exports.ClosableStringSink = ClosableStringSink; 2430 exports.ClosableStringSink = ClosableStringSink;
2431 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E; 2431 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN E;
2432 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; 2432 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE;
2433 exports.Utf8Codec = Utf8Codec; 2433 exports.Utf8Codec = Utf8Codec;
2434 exports.UTF8 = UTF8; 2434 exports.UTF8 = UTF8;
2435 exports.Utf8Encoder = Utf8Encoder; 2435 exports.Utf8Encoder = Utf8Encoder;
2436 exports.Utf8Decoder = Utf8Decoder; 2436 exports.Utf8Decoder = Utf8Decoder;
2437 })(convert, core, async, typed_data, _internal, collection); 2437 })(convert, core, async, typed_data, _internal, collection);
OLDNEW
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698