| OLD | NEW |
| 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 debugger_page_element; | 5 library debugger_page_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:svg'; | 8 import 'dart:svg'; |
| 9 import 'dart:html'; | 9 import 'dart:html'; |
| 10 import 'dart:math'; | 10 import 'dart:math'; |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2041 // a range, don't interfere. | 2041 // a range, don't interfere. |
| 2042 var selection = window.getSelection(); | 2042 var selection = window.getSelection(); |
| 2043 if (selection == null || | 2043 if (selection == null || |
| 2044 (selection.type != 'Range' && selection.type != 'text')) { | 2044 (selection.type != 'Range' && selection.type != 'text')) { |
| 2045 _debugger.input.focus(); | 2045 _debugger.input.focus(); |
| 2046 } | 2046 } |
| 2047 }); | 2047 }); |
| 2048 } | 2048 } |
| 2049 | 2049 |
| 2050 @override | 2050 @override |
| 2051 void render() { |
| 2052 /* nothing to do */ |
| 2053 } |
| 2054 |
| 2055 @override |
| 2051 void detached() { | 2056 void detached() { |
| 2052 _timer.cancel(); | 2057 _timer.cancel(); |
| 2053 children = const []; | 2058 children = const []; |
| 2054 S.cancelFutureSubscription(_vmSubscriptionFuture); | 2059 S.cancelFutureSubscription(_vmSubscriptionFuture); |
| 2055 _vmSubscriptionFuture = null; | 2060 _vmSubscriptionFuture = null; |
| 2056 S.cancelFutureSubscription(_isolateSubscriptionFuture); | 2061 S.cancelFutureSubscription(_isolateSubscriptionFuture); |
| 2057 _isolateSubscriptionFuture = null; | 2062 _isolateSubscriptionFuture = null; |
| 2058 S.cancelFutureSubscription(_debugSubscriptionFuture); | 2063 S.cancelFutureSubscription(_debugSubscriptionFuture); |
| 2059 _debugSubscriptionFuture = null; | 2064 _debugSubscriptionFuture = null; |
| 2060 S.cancelFutureSubscription(_stdoutSubscriptionFuture); | 2065 S.cancelFutureSubscription(_stdoutSubscriptionFuture); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 ..text = 'No stack', | 2166 ..text = 'No stack', |
| 2162 e._frameList = new UListElement()..classes = ['list-group'], | 2167 e._frameList = new UListElement()..classes = ['list-group'], |
| 2163 new HRElement(), | 2168 new HRElement(), |
| 2164 e._hasMessages = new DivElement()..classes = ['noMessages', 'hidden'] | 2169 e._hasMessages = new DivElement()..classes = ['noMessages', 'hidden'] |
| 2165 ..text = 'No pending messages', | 2170 ..text = 'No pending messages', |
| 2166 e._messageList = new UListElement()..classes = ['messageList'] | 2171 e._messageList = new UListElement()..classes = ['messageList'] |
| 2167 ]; | 2172 ]; |
| 2168 return e; | 2173 return e; |
| 2169 } | 2174 } |
| 2170 | 2175 |
| 2176 void render() { |
| 2177 /* nothing to do */ |
| 2178 } |
| 2179 |
| 2171 _addFrame(List frameList, S.Frame frameInfo) { | 2180 _addFrame(List frameList, S.Frame frameInfo) { |
| 2172 final frameElement = new DebuggerFrameElement(_isolate, | 2181 final frameElement = new DebuggerFrameElement(_isolate, |
| 2173 frameInfo, | 2182 frameInfo, |
| 2174 _scroller, | 2183 _scroller, |
| 2175 _instances, | 2184 _instances, |
| 2176 _scripts, | 2185 _scripts, |
| 2177 _events, | 2186 _events, |
| 2178 queue: app.queue); | 2187 queue: app.queue); |
| 2179 | 2188 |
| 2180 if (frameInfo.index == currentFrame) { | 2189 if (frameInfo.index == currentFrame) { |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2919 } | 2928 } |
| 2920 | 2929 |
| 2921 void newline() { | 2930 void newline() { |
| 2922 _append(new BRElement()); | 2931 _append(new BRElement()); |
| 2923 } | 2932 } |
| 2924 | 2933 |
| 2925 void clear() { | 2934 void clear() { |
| 2926 children.clear(); | 2935 children.clear(); |
| 2927 } | 2936 } |
| 2928 | 2937 |
| 2938 void render() { |
| 2939 /* nothing to do */ |
| 2940 } |
| 2941 |
| 2929 ObservatoryApplication get app => ObservatoryApplication.app; | 2942 ObservatoryApplication get app => ObservatoryApplication.app; |
| 2930 } | 2943 } |
| 2931 | 2944 |
| 2932 class DebuggerInputElement extends HtmlElement implements Renderable { | 2945 class DebuggerInputElement extends HtmlElement implements Renderable { |
| 2933 static const tag = const Tag<DebuggerInputElement>('debugger-input'); | 2946 static const tag = const Tag<DebuggerInputElement>('debugger-input'); |
| 2934 | 2947 |
| 2935 S.Isolate _isolate; | 2948 S.Isolate _isolate; |
| 2936 ObservatoryDebugger _debugger; | 2949 ObservatoryDebugger _debugger; |
| 2937 bool _busy = false; | 2950 bool _busy = false; |
| 2938 final _modalPromptDiv = new DivElement() | 2951 final _modalPromptDiv = new DivElement() |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3093 | 3106 |
| 3094 void exitMode() { | 3107 void exitMode() { |
| 3095 assert(modalPrompt != null); | 3108 assert(modalPrompt != null); |
| 3096 modalPrompt = null; | 3109 modalPrompt = null; |
| 3097 modalCallback = null; | 3110 modalCallback = null; |
| 3098 } | 3111 } |
| 3099 | 3112 |
| 3100 void focus() { | 3113 void focus() { |
| 3101 _textBox.focus(); | 3114 _textBox.focus(); |
| 3102 } | 3115 } |
| 3116 |
| 3117 void render() { |
| 3118 // Nothing to do. |
| 3119 } |
| 3103 } | 3120 } |
| 3104 | 3121 |
| 3105 final SvgSvgElement iconExpandLess = new SvgSvgElement() | 3122 final SvgSvgElement iconExpandLess = new SvgSvgElement() |
| 3106 ..setAttribute('width', '24') | 3123 ..setAttribute('width', '24') |
| 3107 ..setAttribute('height', '24') | 3124 ..setAttribute('height', '24') |
| 3108 ..children = [ | 3125 ..children = [ |
| 3109 new PolygonElement() | 3126 new PolygonElement() |
| 3110 ..setAttribute('points', '12,8 6,14 7.4,15.4 12,10.8 16.6,15.4 18,14 ') | 3127 ..setAttribute('points', '12,8 6,14 7.4,15.4 12,10.8 16.6,15.4 18,14 ') |
| 3111 ]; | 3128 ]; |
| 3112 | 3129 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3168 final SvgSvgElement iconInfoOutline = new SvgSvgElement() | 3185 final SvgSvgElement iconInfoOutline = new SvgSvgElement() |
| 3169 ..setAttribute('width', '24') | 3186 ..setAttribute('width', '24') |
| 3170 ..setAttribute('height', '24') | 3187 ..setAttribute('height', '24') |
| 3171 ..children = [ | 3188 ..children = [ |
| 3172 new PathElement() | 3189 new PathElement() |
| 3173 ..setAttribute('d', 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' | 3190 ..setAttribute('d', 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' |
| 3174 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' | 3191 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' |
| 3175 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' | 3192 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' |
| 3176 '9h2V7h-2v2z') | 3193 '9h2V7h-2v2z') |
| 3177 ]; | 3194 ]; |
| OLD | NEW |