| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 csslib.visitor; | 5 library csslib.visitor; |
| 6 | 6 |
| 7 import 'package:source_span/source_span.dart'; | 7 import 'package:source_span/source_span.dart'; |
| 8 import 'parser.dart'; | 8 import 'parser.dart'; |
| 9 | 9 |
| 10 part 'src/css_printer.dart'; | 10 part 'src/css_printer.dart'; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 visitSupportsDisjunction(SupportsDisjunction node) { | 184 visitSupportsDisjunction(SupportsDisjunction node) { |
| 185 _visitNodeList(node.conditions); | 185 _visitNodeList(node.conditions); |
| 186 } | 186 } |
| 187 | 187 |
| 188 visitViewportDirective(ViewportDirective node) { | 188 visitViewportDirective(ViewportDirective node) { |
| 189 node.declarations.visit(this); | 189 node.declarations.visit(this); |
| 190 } | 190 } |
| 191 | 191 |
| 192 visitMediaDirective(MediaDirective node) { | 192 visitMediaDirective(MediaDirective node) { |
| 193 for (var mediaQuery in node.mediaQueries) { | 193 _visitNodeList(node.mediaQueries); |
| 194 visitMediaQuery(mediaQuery); | 194 _visitNodeList(node.rules); |
| 195 } | |
| 196 for (var ruleset in node.rulesets) { | |
| 197 visitRuleSet(ruleset); | |
| 198 } | |
| 199 } | 195 } |
| 200 | 196 |
| 201 visitHostDirective(HostDirective node) { | 197 visitHostDirective(HostDirective node) { |
| 202 for (var ruleset in node.rulesets) { | 198 _visitNodeList(node.rules); |
| 203 visitRuleSet(ruleset); | |
| 204 } | |
| 205 } | 199 } |
| 206 | 200 |
| 207 visitPageDirective(PageDirective node) { | 201 visitPageDirective(PageDirective node) { |
| 208 for (var declGroup in node._declsMargin) { | 202 for (var declGroup in node._declsMargin) { |
| 209 if (declGroup is MarginGroup) { | 203 if (declGroup is MarginGroup) { |
| 210 visitMarginGroup(declGroup); | 204 visitMarginGroup(declGroup); |
| 211 } else { | 205 } else { |
| 212 visitDeclarationGroup(declGroup); | 206 visitDeclarationGroup(declGroup); |
| 213 } | 207 } |
| 214 } | 208 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 230 visitKeyFrameBlock(KeyFrameBlock node) { | 224 visitKeyFrameBlock(KeyFrameBlock node) { |
| 231 visitExpressions(node._blockSelectors); | 225 visitExpressions(node._blockSelectors); |
| 232 visitDeclarationGroup(node._declarations); | 226 visitDeclarationGroup(node._declarations); |
| 233 } | 227 } |
| 234 | 228 |
| 235 visitFontFaceDirective(FontFaceDirective node) { | 229 visitFontFaceDirective(FontFaceDirective node) { |
| 236 visitDeclarationGroup(node._declarations); | 230 visitDeclarationGroup(node._declarations); |
| 237 } | 231 } |
| 238 | 232 |
| 239 visitStyletDirective(StyletDirective node) { | 233 visitStyletDirective(StyletDirective node) { |
| 240 _visitNodeList(node.rulesets); | 234 _visitNodeList(node.rules); |
| 241 } | 235 } |
| 242 | 236 |
| 243 visitNamespaceDirective(NamespaceDirective node) {} | 237 visitNamespaceDirective(NamespaceDirective node) {} |
| 244 | 238 |
| 245 visitVarDefinitionDirective(VarDefinitionDirective node) { | 239 visitVarDefinitionDirective(VarDefinitionDirective node) { |
| 246 visitVarDefinition(node.def); | 240 visitVarDefinition(node.def); |
| 247 } | 241 } |
| 248 | 242 |
| 249 visitMixinRulesetDirective(MixinRulesetDirective node) { | 243 visitMixinRulesetDirective(MixinRulesetDirective node) { |
| 250 _visitNodeList(node.rulesets); | 244 _visitNodeList(node.rulesets); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 visitPaddingExpression(PaddingExpression node) { | 482 visitPaddingExpression(PaddingExpression node) { |
| 489 // TODO(terry): TBD | 483 // TODO(terry): TBD |
| 490 throw new UnimplementedError(); | 484 throw new UnimplementedError(); |
| 491 } | 485 } |
| 492 | 486 |
| 493 visitWidthExpression(WidthExpression node) { | 487 visitWidthExpression(WidthExpression node) { |
| 494 // TODO(terry): TBD | 488 // TODO(terry): TBD |
| 495 throw new UnimplementedError(); | 489 throw new UnimplementedError(); |
| 496 } | 490 } |
| 497 } | 491 } |
| OLD | NEW |