[gxml: 23/25] use CssSelectorParser internal method for selection. Reason : Sometimes selectors string can be lon
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml: 23/25] use CssSelectorParser internal method for selection. Reason : Sometimes selectors string can be lon
- Date: Tue, 19 Mar 2019 17:47:16 +0000 (UTC)
commit fdd08e23f7a95782d010732ea58b47924149f368
Author: BZHDeveloper <inizan yannick gmail com>
Date: Sat Mar 16 18:53:47 2019 +0100
use CssSelectorParser internal method for selection.
Reason : Sometimes selectors string can be long, and parsing takes longer if we use one parser
for each child and descendent.
gxml/GXmlDocument.vala | 2 +-
gxml/GomDocument.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gxml/GXmlDocument.vala b/gxml/GXmlDocument.vala
index 6266d9f..74b9773 100644
--- a/gxml/GXmlDocument.vala
+++ b/gxml/GXmlDocument.vala
@@ -362,7 +362,7 @@ public class GXml.GDocument : GXml.GNode,
if (!(e is DomElement)) continue;
if (cs.match (e as DomElement))
l.add (e);
- l.add_all ((e as DomElement).query_selector_all (selectors));
+ l.add_all (cs.query_selector_all (e as DomElement));
}
return l;
}
diff --git a/gxml/GomDocument.vala b/gxml/GomDocument.vala
index 3e2d9ed..dc90a7a 100644
--- a/gxml/GomDocument.vala
+++ b/gxml/GomDocument.vala
@@ -360,7 +360,7 @@ public class GXml.GomDocument : GomNode,
if (!(e is DomElement)) continue;
if (cs.match (e as DomElement))
l.add (e);
- l.add_all (cs.query_selector_all (e));
+ l.add_all (cs.query_selector_all (e as DomElement));
}
return l;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]