| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index c555b337fc08f0adf31eb1dcf4e883ecf3d899fd..9801749bf19f27351d1fd5ac1b4bfaa6fad7eb5a 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -9734,20 +9734,14 @@ abstract class Element extends Node implements ParentNode, ChildNode {
|
| }
|
|
|
|
|
| - /**
|
| - * Checks if this element matches the CSS selectors.
|
| - *
|
| - * If `includeAncestors` is true, we examine all of this element's parent
|
| - * elements and also return true if any of its parent elements matches
|
| - * `selectors`.
|
| - */
|
| + /** Checks if this element or any of its parents match the CSS selectors. */
|
| @Experimental()
|
| - bool matches(String selectors, [includeAncestors = false]) {
|
| + bool matchesWithAncestors(String selectors) {
|
| var elem = this;
|
| do {
|
| - if (elem._matches(selectors)) return true;
|
| + if (elem.matches(selectors)) return true;
|
| elem = elem.parent;
|
| - } while(includeAncestors && elem != null);
|
| + } while(elem != null);
|
| return false;
|
| }
|
|
|
| @@ -10511,7 +10505,7 @@ abstract class Element extends Node implements ParentNode, ChildNode {
|
| @DocsEditable()
|
| @Experimental()
|
| // http://dev.w3.org/2006/webapi/selectors-api2/#matches
|
| - bool _matches(String selectors) native "Element_webkitMatchesSelector_Callback";
|
| + bool matches(String selectors) native "Element_webkitMatchesSelector_Callback";
|
|
|
| @DomName('Element.webkitRequestFullScreen')
|
| @DocsEditable()
|
| @@ -30368,7 +30362,7 @@ class _ElementEventStreamImpl<T extends Event> extends _EventStream<T>
|
| super(target, eventType, useCapture);
|
|
|
| Stream<T> matches(String selector) =>
|
| - this.where((event) => event.target.matches(selector, true));
|
| + this.where((event) => event.target.matchesWithAncestors(selector));
|
| }
|
|
|
| /**
|
| @@ -30390,7 +30384,7 @@ class _ElementListEventStreamImpl<T extends Event> extends Stream<T>
|
| }
|
|
|
| Stream<T> matches(String selector) =>
|
| - this.where((event) => event.target.matches(selector, true));
|
| + this.where((event) => event.target.matchesWIthAncestors(selector));
|
|
|
| // Delegate all regular Stream behavor to our wrapped Stream.
|
| StreamSubscription<T> listen(void onData(T event),
|
|
|