[Pkg-javascript-commits] [dojo] 10/17: fixes #18321, better test for nextElementSibling
David Prévot
taffit at moszumanska.debian.org
Thu Mar 24 04:28:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.7.9
in repository dojo.
commit b27f43fb8824a46442b2775e58e6436bb993fbd8
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 ce54385..c616f55 100644
--- a/selector/acme.js
+++ b/selector/acme.js
@@ -503,7 +503,11 @@ define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array
// 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);
@@ -1133,7 +1137,7 @@ define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array
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