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

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

Issue 1286943005: Fix links to script + line. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3aeaf67619f19ba9b79c790a47f3b2965a05860a..039529bc4a3ea756f451e72110322ddfb52157cc 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -390,7 +390,7 @@ class ScriptInsetElement extends ObservatoryElement {
}
void _scrollToCurrentPos() {
- var line = querySelector('#${makeLineId(_currentLine)}');
+ var line = shadowRoot.getElementById(makeLineId(_currentLine));
if (line != null) {
line.scrollIntoView();
}
@@ -469,14 +469,19 @@ class ScriptInsetElement extends ObservatoryElement {
computeAnnotations();
var table = linesTable();
+ var firstBuild = false;
if (container == null) {
// Indirect to avoid deleting the style element.
container = new DivElement();
shadowRoot.append(container);
+ firstBuild = true;
}
container.children.clear();
container.children.add(table);
makeCssClassUncopyable(table, "noCopy");
+ if (firstBuild) {
+ _scrollToCurrentPos();
+ }
}
void computeAnnotations() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698