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 part of csslib.visitor; | 5 part of csslib.visitor; |
6 | 6 |
7 ///////////////////////////////////////////////////////////////////////// | 7 ///////////////////////////////////////////////////////////////////////// |
8 // CSS specific types: | 8 // CSS specific types: |
9 ///////////////////////////////////////////////////////////////////////// | 9 ///////////////////////////////////////////////////////////////////////// |
10 | 10 |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 return new MediaQuery(_mediaUnary, _mediaType, cloneExpressions, span); | 633 return new MediaQuery(_mediaUnary, _mediaType, cloneExpressions, span); |
634 } | 634 } |
635 | 635 |
636 visit(VisitorBase visitor) => visitor.visitMediaQuery(this); | 636 visit(VisitorBase visitor) => visitor.visitMediaQuery(this); |
637 } | 637 } |
638 | 638 |
639 class MediaDirective extends Directive { | 639 class MediaDirective extends Directive { |
640 final List<MediaQuery> mediaQueries; | 640 final List<MediaQuery> mediaQueries; |
641 final List<TreeNode> rules; | 641 final List<TreeNode> rules; |
642 | 642 |
643 MediaDirective(this.mediaQueries, this.rules, SourceSpan span) | 643 MediaDirective(this.mediaQueries, this.rules, SourceSpan span) : super(span); |
644 : super(span); | |
645 | 644 |
646 MediaDirective clone() { | 645 MediaDirective clone() { |
647 var cloneQueries = <MediaQuery>[]; | 646 var cloneQueries = <MediaQuery>[]; |
648 for (var mediaQuery in mediaQueries) { | 647 for (var mediaQuery in mediaQueries) { |
649 cloneQueries.add(mediaQuery.clone()); | 648 cloneQueries.add(mediaQuery.clone()); |
650 } | 649 } |
651 var cloneRules = <TreeNode>[]; | 650 var cloneRules = <TreeNode>[]; |
652 for (var rule in rules) { | 651 for (var rule in rules) { |
653 cloneRules.add(rule.clone()); | 652 cloneRules.add(rule.clone()); |
654 } | 653 } |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 | 1582 |
1584 PaddingExpression._merge( | 1583 PaddingExpression._merge( |
1585 PaddingExpression x, PaddingExpression y, SourceSpan span) | 1584 PaddingExpression x, PaddingExpression y, SourceSpan span) |
1586 : super(DartStyleExpression.paddingStyle, span, | 1585 : super(DartStyleExpression.paddingStyle, span, |
1587 new BoxEdge.merge(x.box, y.box)); | 1586 new BoxEdge.merge(x.box, y.box)); |
1588 | 1587 |
1589 PaddingExpression clone() => new PaddingExpression(span, | 1588 PaddingExpression clone() => new PaddingExpression(span, |
1590 top: box.top, right: box.right, bottom: box.bottom, left: box.left); | 1589 top: box.top, right: box.right, bottom: box.bottom, left: box.left); |
1591 visit(VisitorBase visitor) => visitor.visitPaddingExpression(this); | 1590 visit(VisitorBase visitor) => visitor.visitPaddingExpression(this); |
1592 } | 1591 } |
OLD | NEW |