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

Side by Side Diff: dart/site/try/src/interaction_manager.dart

Issue 274563011: Ignore non-content divs in htmlToText. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « dart/site/try/src/html_to_text.dart ('k') | dart/site/try/src/shadow_root.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library trydart.interaction_manager; 5 library trydart.interaction_manager;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 8
9 import 'dart:convert' show 9 import 'dart:convert' show
10 JSON; 10 JSON;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // TODO(ahe): We know almost exactly what has changed. It could be 320 // TODO(ahe): We know almost exactly what has changed. It could be
321 // more efficient to only communicate what changed. 321 // more efficient to only communicate what changed.
322 context.currentCompilationUnit.content = getText(mainEditorPane); 322 context.currentCompilationUnit.content = getText(mainEditorPane);
323 323
324 // Discard highlighting mutations. 324 // Discard highlighting mutations.
325 observer.takeRecords(); 325 observer.takeRecords();
326 return; 326 return;
327 } 327 }
328 } 328 }
329 329
330 // TODO(ahe): Use getText(mainEditorPane) instead. 330 String currentText = getText(mainEditorPane);
331 removeShadowRootPolyfill(mainEditorPane);
332
333 String currentText = mainEditorPane.text;
334 trySelection.updateText(currentText); 331 trySelection.updateText(currentText);
335 332
336 context.currentCompilationUnit.content = currentText; 333 context.currentCompilationUnit.content = currentText;
337 334
338 editor.seenIdentifiers = new Set<String>.from(mock.identifiers); 335 editor.seenIdentifiers = new Set<String>.from(mock.identifiers);
339 336
340 editor.isMalformedInput = false; 337 editor.isMalformedInput = false;
341 int offset = 0; 338 int offset = 0;
342 List<Node> nodes = <Node>[]; 339 List<Node> nodes = <Node>[];
343 340
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 return text.split(new RegExp('^', multiLine: true)); 894 return text.split(new RegExp('^', multiLine: true));
898 } 895 }
899 896
900 void removeCodeCompletion() { 897 void removeCodeCompletion() {
901 List<Node> highlighting = 898 List<Node> highlighting =
902 mainEditorPane.querySelectorAll('.dart-code-completion'); 899 mainEditorPane.querySelectorAll('.dart-code-completion');
903 for (Element element in highlighting) { 900 for (Element element in highlighting) {
904 element.remove(); 901 element.remove();
905 } 902 }
906 } 903 }
OLDNEW
« no previous file with comments | « dart/site/try/src/html_to_text.dart ('k') | dart/site/try/src/shadow_root.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698