| 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 part of csslib.visitor; | 5 part of csslib.visitor; |
| 6 | 6 |
| 7 // TODO(terry): Enable class for debug only; when conditional imports enabled. | 7 // TODO(terry): Enable class for debug only; when conditional imports enabled. |
| 8 | 8 |
| 9 /** Helper function to dump the CSS AST. */ | 9 /** Helper function to dump the CSS AST. */ |
| 10 String treeToDebugString(StyleSheet styleSheet, [bool useSpan = false]) { | 10 String treeToDebugString(StyleSheet styleSheet, [bool useSpan = false]) { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 super.visitKeyFrameBlock(node); | 122 super.visitKeyFrameBlock(node); |
| 123 output.depth--; | 123 output.depth--; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void visitFontFaceDirective(FontFaceDirective node) { | 126 void visitFontFaceDirective(FontFaceDirective node) { |
| 127 // TODO(terry): To Be Implemented | 127 // TODO(terry): To Be Implemented |
| 128 } | 128 } |
| 129 | 129 |
| 130 void visitStyletDirective(StyletDirective node) { | 130 void visitStyletDirective(StyletDirective node) { |
| 131 heading('StyletDirective', node); | 131 heading('StyletDirective', node); |
| 132 output.writeValue('dartClassName', node._dartClassName); | 132 output.writeValue('dartClassName', node.dartClassName); |
| 133 output.depth++; | 133 output.depth++; |
| 134 output.writeNodeList('rulesets', node._rulesets); | 134 output.writeNodeList('rulesets', node.rulesets); |
| 135 output.depth--; | 135 output.depth--; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void visitNamespaceDirective(NamespaceDirective node) { | 138 void visitNamespaceDirective(NamespaceDirective node) { |
| 139 heading('NamespaceDirective', node); | 139 heading('NamespaceDirective', node); |
| 140 output.depth++; | 140 output.depth++; |
| 141 output.writeValue('prefix', node._prefix); | 141 output.writeValue('prefix', node._prefix); |
| 142 output.writeValue('uri', node._uri); | 142 output.writeValue('uri', node._uri); |
| 143 output.depth--; | 143 output.depth--; |
| 144 } | 144 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void visitRuleSet(RuleSet node) { | 192 void visitRuleSet(RuleSet node) { |
| 193 heading('Ruleset', node); | 193 heading('Ruleset', node); |
| 194 output.depth++; | 194 output.depth++; |
| 195 super.visitRuleSet(node); | 195 super.visitRuleSet(node); |
| 196 output.depth--; | 196 output.depth--; |
| 197 } | 197 } |
| 198 | 198 |
| 199 void visitDeclarationGroup(DeclarationGroup node) { | 199 void visitDeclarationGroup(DeclarationGroup node) { |
| 200 heading('DeclarationGroup', node); | 200 heading('DeclarationGroup', node); |
| 201 output.depth++; | 201 output.depth++; |
| 202 output.writeNodeList('declarations', node._declarations); | 202 output.writeNodeList('declarations', node.declarations); |
| 203 output.depth--; | 203 output.depth--; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void visitMarginGroup(MarginGroup node) { | 206 void visitMarginGroup(MarginGroup node) { |
| 207 heading('MarginGroup', node); | 207 heading('MarginGroup', node); |
| 208 output.depth++; | 208 output.depth++; |
| 209 output.writeValue('@directive', node.margin_sym); | 209 output.writeValue('@directive', node.margin_sym); |
| 210 output.writeNodeList('declarations', node._declarations); | 210 output.writeNodeList('declarations', node.declarations); |
| 211 output.depth--; | 211 output.depth--; |
| 212 } | 212 } |
| 213 | 213 |
| 214 void visitDeclaration(Declaration node) { | 214 void visitDeclaration(Declaration node) { |
| 215 heading('Declaration', node); | 215 heading('Declaration', node); |
| 216 output.depth++; | 216 output.depth++; |
| 217 if (node.isIE7) output.write('IE7 property'); | 217 if (node.isIE7) output.write('IE7 property'); |
| 218 output.write('property'); | 218 output.write('property'); |
| 219 super.visitDeclaration(node); | 219 super.visitDeclaration(node); |
| 220 output.writeNode('expression', node._expression); | 220 output.writeNode('expression', node._expression); |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 | 549 |
| 550 void visitPaddingExpression(PaddingExpression node) { | 550 void visitPaddingExpression(PaddingExpression node) { |
| 551 heading('Dart Style PaddingExpression', node); | 551 heading('Dart Style PaddingExpression', node); |
| 552 } | 552 } |
| 553 | 553 |
| 554 void visitWidthExpression(WidthExpression node) { | 554 void visitWidthExpression(WidthExpression node) { |
| 555 heading('Dart Style WidthExpression', node); | 555 heading('Dart Style WidthExpression', node); |
| 556 } | 556 } |
| 557 } | 557 } |
| OLD | NEW |