| Index: third_party/pkg/angular/lib/tools/selector.dart
|
| diff --git a/third_party/pkg/angular/lib/tools/selector.dart b/third_party/pkg/angular/lib/tools/selector.dart
|
| index 01cb503c656c412ff8f07d7e3dc5314fff11e7aa..10510cc8813f8295e9585dfe097442ac54f037c3 100644
|
| --- a/third_party/pkg/angular/lib/tools/selector.dart
|
| +++ b/third_party/pkg/angular/lib/tools/selector.dart
|
| @@ -22,17 +22,17 @@ class _SelectorPart {
|
| final String attrName;
|
| final String attrValue;
|
|
|
| - const _SelectorPart.fromElement(String this.element)
|
| + const _SelectorPart.fromElement(this.element)
|
| : className = null, attrName = null, attrValue = null;
|
|
|
| - const _SelectorPart.fromClass(String this.className)
|
| + const _SelectorPart.fromClass(this.className)
|
| : element = null, attrName = null, attrValue = null;
|
|
|
|
|
| - const _SelectorPart.fromAttribute(String this.attrName, String this.attrValue)
|
| + const _SelectorPart.fromAttribute(this.attrName, this.attrValue)
|
| : element = null, className = null;
|
|
|
| - toString() =>
|
| + String toString() =>
|
| element == null
|
| ? (className == null
|
| ? (attrValue == '' ? '[$attrName]' : '[$attrName=$attrValue]')
|
| @@ -71,7 +71,7 @@ bool matchesNode(Node node, String selector) {
|
| if (node is! Text) {
|
| return false;
|
| }
|
| - return new RegExp(match.group(1)).hasMatch((node as Text).value);
|
| + return new RegExp(match.group(1)).hasMatch((node as Text).text);
|
| } else if ((match = _ATTR_CONTAINS_REGEXP.firstMatch(selector)) != null) {
|
| if (node is! Element) {
|
| return false;
|
| @@ -84,10 +84,8 @@ bool matchesNode(Node node, String selector) {
|
| }
|
| return false;
|
| } else if ((selectorParts = _splitCss(selector)) != null) {
|
| - if (node is! Element) {
|
| - return false;
|
| - }
|
| - String nodeName = node.tagName.toLowerCase();
|
| + if (node is! Element) return false;
|
| + String nodeName = (node as Element).localName.toLowerCase();
|
|
|
| bool stillGood = true;
|
| selectorParts.forEach((_SelectorPart part) {
|
| @@ -111,8 +109,8 @@ bool matchesNode(Node node, String selector) {
|
| });
|
|
|
| return stillGood;
|
| - }
|
| -
|
| + }
|
| +
|
| throw new ArgumentError('Unsupported Selector: $selector');
|
| }
|
|
|
|
|