Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 script_inset_element; | 5 library script_inset_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'service_ref.dart'; | 10 import 'service_ref.dart'; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 Breakpoint bpt; | 119 Breakpoint bpt; |
| 120 int priority = 1; | 120 int priority = 1; |
| 121 | 121 |
| 122 BreakpointAnnotation(this.bpt) { | 122 BreakpointAnnotation(this.bpt) { |
| 123 var script = bpt.location.script; | 123 var script = bpt.location.script; |
| 124 if (bpt.location.tokenPos != null) { | 124 if (bpt.location.tokenPos != null) { |
| 125 var pos = bpt.location.tokenPos; | 125 var pos = bpt.location.tokenPos; |
| 126 line = script.tokenToLine(pos); | 126 line = script.tokenToLine(pos); |
| 127 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin. | 127 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin. |
| 128 } else { | 128 } else { |
| 129 line = bpt.location.line; | 129 line = 0; |
| 130 columnStart = bpt.location.column; | 130 columnStart = 0; |
| 131 if (columnStart == null) { | |
| 132 columnStart = 0; | |
| 133 } | |
|
turnidge
2015/09/15 16:01:03
bpt.location can have two types: SourceLocation an
Cutch
2015/09/15 17:29:57
Yep, you are right. I've fixed the static warnings
| |
| 134 } | 131 } |
| 135 var length = script.guessTokenLength(line, columnStart); | 132 var length = script.guessTokenLength(line, columnStart); |
| 136 if (length == null) { | 133 if (length == null) { |
| 137 length = 1; | 134 length = 1; |
| 138 } | 135 } |
| 139 columnStop = columnStart + length; | 136 columnStop = columnStart + length; |
| 140 } | 137 } |
| 141 | 138 |
| 142 void applyStyleTo(element) { | 139 void applyStyleTo(element) { |
| 143 if (element == null) { | 140 if (element == null) { |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1012 @CustomTag('source-inset') | 1009 @CustomTag('source-inset') |
| 1013 class SourceInsetElement extends PolymerElement { | 1010 class SourceInsetElement extends PolymerElement { |
| 1014 SourceInsetElement.created() : super.created(); | 1011 SourceInsetElement.created() : super.created(); |
| 1015 | 1012 |
| 1016 @published SourceLocation location; | 1013 @published SourceLocation location; |
| 1017 @published String height = null; | 1014 @published String height = null; |
| 1018 @published int currentPos; | 1015 @published int currentPos; |
| 1019 @published bool inDebuggerContext = false; | 1016 @published bool inDebuggerContext = false; |
| 1020 @published ObservableList variables; | 1017 @published ObservableList variables; |
| 1021 } | 1018 } |
| 1022 | |
| OLD | NEW |