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

Unified Diff: runtime/observatory/lib/src/elements/script_inset.dart

Issue 1137523002: Make copying from script insets omit line numbers and breakpoint indicators. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/script_inset.dart
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index 1c158c0835c4236841d26b36d3908f93cad94679..164c134a0b654b689b710d3a2a2736148faec24e 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -315,6 +315,7 @@ class ScriptInsetElement extends ObservatoryElement {
}
container.children.clear();
container.children.add(table);
+ makeCssClassUncopyable(table, "noCopy");
}
void loadFunctionsOf(Library lib) {
@@ -449,25 +450,25 @@ class ScriptInsetElement extends ObservatoryElement {
var busy = false;
if (line == null || !line.possibleBpt) {
e.classes.add("emptyBreakpoint");
+ e.classes.add('noCopy');
e.text = nbsp;
return e;
}
e.text = 'B';
update() {
+ e.classes.clear();
+ e.classes.add('noCopy');
+
if (busy) {
- e.classes.clear();
e.classes.add("busyBreakpoint");
} else {
if (line.breakpoints != null) {
if (line.breakpointResolved) {
- e.classes.clear();
e.classes.add("resolvedBreakpoint");
} else {
- e.classes.clear();
e.classes.add("unresolvedBreakpoint");
}
} else {
- e.classes.clear();
e.classes.add("possibleBreakpoint");
}
}
@@ -504,6 +505,7 @@ class ScriptInsetElement extends ObservatoryElement {
Element lineNumberElement(ScriptLine line) {
var lineNumber = line == null ? "..." : line.line;
var e = span("$nbsp$lineNumber$nbsp");
+ e.classes.add('noCopy');
if ((line == null) || (line.hits == null)) {
hitsUnknown(e);
@@ -553,6 +555,9 @@ class ScriptInsetElement extends ObservatoryElement {
consumeUntil(line.text.length);
}
+ // So blank lines are included when copying script to the clipboard.
+ e.append(span('\n'));
+
return e;
}
« no previous file with comments | « runtime/observatory/lib/src/elements/observatory_element.dart ('k') | runtime/observatory/lib/src/elements/script_inset.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698