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

Side by Side Diff: runtime/observatory/lib/src/elements/code_ref.dart

Issue 1246073005: Retaining path improvements. (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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/code_ref.html » ('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) 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 code_ref_element; 5 library code_ref_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'service_ref.dart'; 8 import 'service_ref.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 10
11 @CustomTag('code-ref') 11 @CustomTag('code-ref')
12 class CodeRefElement extends ServiceRefElement { 12 class CodeRefElement extends ServiceRefElement {
13 CodeRefElement.created() : super.created(); 13 CodeRefElement.created() : super.created();
14 14
15 Code get code => ref; 15 Code get code => ref;
16
17 refChanged(oldValue) {
18 super.refChanged(oldValue);
19 _updateShadowDom();
20 }
21
Cutch 2015/07/28 21:36:16 This needs to stay as code.
rmacnak 2015/07/28 22:54:06 Done.
22 void _updateShadowDom() {
23 clearShadowRoot();
24 if (code == null) {
25 return;
26 }
27 var name = (code.isOptimized ? '*' : '') + code.name;
28 if (code.isDartCode) {
29 insertLinkIntoShadowRoot(name, url, hoverText);
30 } else {
31 insertTextSpanIntoShadowRoot(name);
32 }
33 }
34 } 16 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/code_ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698