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

Side by Side Diff: client/html/src/TextWrappingImplementation.dart

Issue 9145004: Revert "Example showing alternate async measurement solution" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « client/html/src/SVGElementWrappingImplementation.dart ('k') | client/html/src/Window.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class TextWrappingImplementation extends CharacterDataWrappingImplementation imp lements Text { 5 class TextWrappingImplementation extends CharacterDataWrappingImplementation imp lements Text {
6 /** @domName Document.createTextNode */ 6 /** @domName Document.createTextNode */
7 factory TextWrappingImplementation(String content) { 7 factory TextWrappingImplementation(String content) {
8 return new TextWrappingImplementation._wrap( 8 return new TextWrappingImplementation._wrap(
9 dom.document.createTextNode(content)); 9 dom.document.createTextNode(content));
10 } 10 }
11 11
12 TextWrappingImplementation._wrap(ptr) : super._wrap(ptr); 12 TextWrappingImplementation._wrap(ptr) : super._wrap(ptr);
13 13
14 String get wholeText() => _ptr.wholeText; 14 String get wholeText() => _ptr.wholeText;
15 15
16 Text replaceWholeText([String content = null]) { 16 Text replaceWholeText([String content = null]) {
17 assert(!_inMeasurementFrame || !_inDocument);
18 if (content === null) { 17 if (content === null) {
19 return LevelDom.wrapText(_ptr.replaceWholeText()); 18 return LevelDom.wrapText(_ptr.replaceWholeText());
20 } else { 19 } else {
21 return LevelDom.wrapText(_ptr.replaceWholeText(content)); 20 return LevelDom.wrapText(_ptr.replaceWholeText(content));
22 } 21 }
23 } 22 }
24 23
25 Text splitText([int offset = null]) { 24 Text splitText([int offset = null]) {
26 assert(!_inMeasurementFrame || !_inDocument);
27 if (offset === null) { 25 if (offset === null) {
28 return LevelDom.wrapText(_ptr.splitText()); 26 return LevelDom.wrapText(_ptr.splitText());
29 } else { 27 } else {
30 return LevelDom.wrapText(_ptr.splitText(offset)); 28 return LevelDom.wrapText(_ptr.splitText(offset));
31 } 29 }
32 } 30 }
33 } 31 }
OLDNEW
« no previous file with comments | « client/html/src/SVGElementWrappingImplementation.dart ('k') | client/html/src/Window.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698