| OLD | NEW |
| 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> | 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> |
| 2 <link rel="import" href="observatory_element.html"> | 2 <link rel="import" href="observatory_element.html"> |
| 3 | 3 |
| 4 <polymer-element name="script-inset" extends="observatory-element"> | 4 <polymer-element name="script-inset" extends="observatory-element"> |
| 5 <template> | 5 <template> |
| 6 <style> | 6 <style> |
| 7 .sourceInset { | 7 .sourceInset { |
| 8 } | 8 } |
| 9 .sourceBox { | |
| 10 background-color: #f5f5f5; | |
| 11 border: 1px solid #ccc; | |
| 12 padding: 10px; | |
| 13 overflow-y: auto; | |
| 14 } | |
| 15 .sourceTable { | 9 .sourceTable { |
| 16 display: table; | 10 display: table; |
| 11 background-color: #f5f5f5; |
| 12 border: 1px solid #ccc; |
| 13 padding: 10px; |
| 14 overflow-y: auto; |
| 15 width: 100%; |
| 17 } | 16 } |
| 18 .sourceRow { | 17 .sourceRow { |
| 19 display: table-row; | 18 display: table-row; |
| 20 } | 19 } |
| 21 .sourceItem, .sourceItemCurrent { | 20 .sourceItem, .sourceItemCurrent { |
| 22 display: table-cell; | 21 display: table-cell; |
| 23 vertical-align: top; | 22 vertical-align: top; |
| 24 font: 400 14px consolas, courier, monospace; | 23 font: 400 14px consolas, courier, monospace; |
| 25 line-height: 125%; | 24 line-height: 125%; |
| 26 white-space: pre; | 25 white-space: pre; |
| 27 } | 26 } |
| 28 .currentLine { | 27 .currentLine { |
| 29 background-color: #fff; | 28 background-color: #fff; |
| 30 } | 29 } |
| 31 .currentCol { | 30 .currentCol { |
| 32 background-color: #6cf; | 31 background-color: #6cf; |
| 33 } | 32 } |
| 34 .hitsNone, .hitsNotExecuted, .hitsExecuted { | 33 .hitsNone, .hitsNotExecuted, .hitsExecuted { |
| 35 display: table-cell; | 34 display: table-cell; |
| 36 vertical-align: top; | 35 vertical-align: top; |
| 37 font: 400 14px consolas, courier, monospace; | 36 font: 400 14px consolas, courier, monospace; |
| 38 min-width: 32px; | 37 min-width: 32px; |
| 39 text-align: right; | 38 text-align: right; |
| 40 color: #a8a8a8; | 39 color: #a8a8a8; |
| 41 } | 40 } |
| 42 .hitsNotExecuted { | 41 .hitsNotExecuted { |
| 43 background-color: #e66; | 42 background-color: #e66; |
| 44 } | 43 } |
| 45 .hitsExecuted { | 44 .hitsExecuted { |
| 46 background-color: #6d6; | 45 background-color: #6d6; |
| 47 } | 46 } |
| 48 </style> | 47 </style> |
| 49 <div class="sourceInset"> | |
| 50 <content></content> | |
| 51 <div class="sourceBox" style="max-height:{{height}}"> | |
| 52 <div class="sourceTable"> | |
| 53 <template if="{{ linesReady }}"> | |
| 54 <template repeat="{{ line in lines }}"> | |
| 55 <template if="{{ line != null }}"> | |
| 56 <div class="sourceRow" id="{{ makeLineId(line.line) }}"> | |
| 57 <breakpoint-toggle line="{{ line }}"></breakpoint-toggle> | |
| 58 | |
| 59 <div class="sourceItem"> </div> | |
| 60 | |
| 61 <template if="{{ line.hits == null || | |
| 62 line.hits < 0 }}"> | |
| 63 <div class="hitsNone">{{ line.line }}</div> | |
| 64 </template> | |
| 65 <template if="{{ line.hits == 0 }}"> | |
| 66 <div class="hitsNotExecuted">{{ line.line }}</div> | |
| 67 </template> | |
| 68 <template if="{{ line.hits > 0 }}"> | |
| 69 <div class="hitsExecuted">{{ line.line }}</div> | |
| 70 </template> | |
| 71 | |
| 72 <div class="sourceItem"> </div> | |
| 73 | |
| 74 <template if="{{ line.line == currentLine }}"> | |
| 75 <div class="sourceItem"><span class="currentLine">{{ | |
| 76 clip(line.text,0,currentCol | |
| 77 )}}</span><span class="currentCol">{{ | |
| 78 clip(line.text,currentCol,currentCol+1) | |
| 79 }}</span><span class="currentLine">{{ | |
| 80 clip(line.text,currentCol+1) | |
| 81 }}</span></div> | |
| 82 </template> | |
| 83 <template if="{{ line.line != currentLine }}"> | |
| 84 <div class="sourceItem">{{line.text}}</div> | |
| 85 </template> | |
| 86 </div> | |
| 87 </template> | |
| 88 | |
| 89 <template if="{{ line == null }}"> | |
| 90 <breakpoint-toggle line="{{ null }}"></breakpoint-toggle> | |
| 91 <div class="sourceItem"> </div> | |
| 92 <div class="hitsNone">...</div> | |
| 93 <div class="sourceItem"> </div> | |
| 94 <div class="sourceItem"></div> | |
| 95 </template> | |
| 96 | |
| 97 </template> | |
| 98 </template> | |
| 99 | |
| 100 <template if="{{ !linesReady }}"> | |
| 101 <div class="sourceRow"> | |
| 102 <div class="sourceItem">loading...</div> | |
| 103 </div> | |
| 104 </template> | |
| 105 </div> | |
| 106 </div> | |
| 107 </div> | |
| 108 </template> | 48 </template> |
| 109 </polymer-element> | 49 </polymer-element> |
| 110 | 50 |
| 111 <polymer-element name="breakpoint-toggle" extends="observatory-element"> | 51 <polymer-element name="breakpoint-toggle" extends="observatory-element"> |
| 112 <template> | 52 <template> |
| 113 <style> | 53 <style> |
| 114 .emptyBreakpoint, .possibleBreakpoint, .busyBreakpoint, .unresolvedBreakpo
int, .resolvedBreakpoint { | 54 .emptyBreakpoint, .possibleBreakpoint, .busyBreakpoint, .unresolvedBreakpo
int, .resolvedBreakpoint { |
| 115 display: table-cell; | 55 display: table-cell; |
| 116 vertical-align: top; | 56 vertical-align: top; |
| 117 font: 400 14px consolas, courier, monospace; | 57 font: 400 14px consolas, courier, monospace; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 <div class="resolvedBreakpoint"> | 110 <div class="resolvedBreakpoint"> |
| 171 <a on-click="{{ toggleBreakpoint }}">B</a> | 111 <a on-click="{{ toggleBreakpoint }}">B</a> |
| 172 </div> | 112 </div> |
| 173 </template> | 113 </template> |
| 174 </template> <!-- line != null --> | 114 </template> <!-- line != null --> |
| 175 | 115 |
| 176 </template> | 116 </template> |
| 177 </polymer-element> | 117 </polymer-element> |
| 178 | 118 |
| 179 <script type="application/dart" src="script_inset.dart"></script> | 119 <script type="application/dart" src="script_inset.dart"></script> |
| OLD | NEW |