[Pkg-javascript-commits] [dojo] 23/29: fixes #18321, better test for nextElementSibling
David Prévot
taffit at moszumanska.debian.org
Thu Mar 24 04:28:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.11
in repository dojo.
commit 9fb8c11153504968226151db67288aa1a45dc9e8
Author: Dylan Schiemann <dylan at dojotoolkit.org>
Date: Tue Jan 5 04:32:26 2016 -0700
fixes #18321, better test for nextElementSibling
(cherry picked from commit a960bab79b17a1506d128d12324131bbf0cb0493)
---
selector/acme.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/selector/acme.js b/selector/acme.js
index e6e5833..1e68e46 100644
--- a/selector/acme.js
+++ b/selector/acme.js
@@ -498,7 +498,11 @@ define([
// avoid testing for node type if we can. Defining this in the negative
// here to avoid negation in the fast path.
- var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
+ // NOTE: Firefox versions 25-27 implemented an incompatible change
+ // to the spec, https://bugzilla.mozilla.org/show_bug.cgi?id=932501
+ // and https://www.w3.org/Bugs/Public/show_bug.cgi?id=23691 ,
+ // where nextElementSibling was implemented on the DocumentType
+ var _noNES = "nextElementSibling" in getDoc().documentElement;
var _ns = !_noNES ? "nextElementSibling" : "nextSibling";
var _ps = !_noNES ? "previousElementSibling" : "previousSibling";
var _simpleNodeTest = (_noNES ? _isElement : yesman);
@@ -1117,7 +1121,7 @@ define([
var infixSpaceFunc = function(match, pre, ch, post){
return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : /*n+3*/ match;
};
-
+
//Don't apply the infixSpaceRe to attribute value selectors
var attRe = /([^[]*)([^\]]*])?/g;
var attFunc = function(match, nonAtt, att){
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list