~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/dom/selector-css3-min.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-08-23 19:48:21 UTC
  • mfrom: (173.2.15 yui-3.1.2)
  • Revision ID: launchpad@pqm.canonical.com-20100823194821-a1npffz5qodt3ejf
[r=beuno] Land YUI 3.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.com/yui/license.html
5
 
version: 3.1.1
6
 
build: 47
 
5
version: 3.1.2
 
6
build: 56
7
7
*/
8
 
YUI.add("selector-css3",function(A){A.Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/;A.Selector._getNth=function(C,L,N,G){A.Selector._reNth.test(L);var K=parseInt(RegExp.$1,10),B=RegExp.$2,H=RegExp.$3,I=parseInt(RegExp.$4,10)||0,M=[],J=A.Selector._children(C.parentNode,N),E;if(H){K=2;E="+";B="n";I=(H==="odd")?1:0;}else{if(isNaN(K)){K=(B)?1:0;}}if(K===0){if(G){I=J.length-I+1;}if(J[I-1]===C){return true;}else{return false;}}else{if(K<0){G=!!G;K=Math.abs(K);}}if(!G){for(var D=I-1,F=J.length;D<F;D+=K){if(D>=0&&J[D]===C){return true;}}}else{for(var D=J.length-I,F=J.length;D>=0;D-=K){if(D<F&&J[D]===C){return true;}}}return false;};A.mix(A.Selector.pseudos,{"root":function(B){return B===B.ownerDocument.documentElement;},"nth-child":function(B,C){return A.Selector._getNth(B,C);},"nth-last-child":function(B,C){return A.Selector._getNth(B,C,null,true);},"nth-of-type":function(B,C){return A.Selector._getNth(B,C,B.tagName);},"nth-last-of-type":function(B,C){return A.Selector._getNth(B,C,B.tagName,true);},"last-child":function(C){var B=A.Selector._children(C.parentNode);return B[B.length-1]===C;},"first-of-type":function(B){return A.Selector._children(B.parentNode,B.tagName)[0]===B;},"last-of-type":function(C){var B=A.Selector._children(C.parentNode,C.tagName);return B[B.length-1]===C;},"only-child":function(C){var B=A.Selector._children(C.parentNode);return B.length===1&&B[0]===C;},"only-of-type":function(C){var B=A.Selector._children(C.parentNode,C.tagName);return B.length===1&&B[0]===C;},"empty":function(B){return B.childNodes.length===0;},"not":function(B,C){return !A.Selector.test(B,C);},"contains":function(B,C){var D=B.innerText||B.textContent||"";return D.indexOf(C)>-1;},"checked":function(B){return(B.checked===true||B.selected===true);},enabled:function(B){return(B.disabled!==undefined&&!B.disabled);},disabled:function(B){return(B.disabled);}});A.mix(A.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"});A.Selector.combinators["~"]={axis:"previousSibling"};},"3.1.1",{requires:["dom-base","selector-native","selector-css2"]});
 
 
b'\\ No newline at end of file'
 
8
YUI.add("selector-css3",function(A){A.Selector._reNth=/^(?:([\-]?\d*)(n){1}|(odd|even)$)*([\-+]?\d*)$/;A.Selector._getNth=function(C,L,N,G){A.Selector._reNth.test(L);var K=parseInt(RegExp.$1,10),B=RegExp.$2,H=RegExp.$3,I=parseInt(RegExp.$4,10)||0,M=[],J=A.Selector._children(C.parentNode,N),E;if(H){K=2;E="+";B="n";I=(H==="odd")?1:0;}else{if(isNaN(K)){K=(B)?1:0;}}if(K===0){if(G){I=J.length-I+1;}if(J[I-1]===C){return true;}else{return false;}}else{if(K<0){G=!!G;K=Math.abs(K);}}if(!G){for(var D=I-1,F=J.length;D<F;D+=K){if(D>=0&&J[D]===C){return true;}}}else{for(var D=J.length-I,F=J.length;D>=0;D-=K){if(D<F&&J[D]===C){return true;}}}return false;};A.mix(A.Selector.pseudos,{"root":function(B){return B===B.ownerDocument.documentElement;},"nth-child":function(B,C){return A.Selector._getNth(B,C);},"nth-last-child":function(B,C){return A.Selector._getNth(B,C,null,true);},"nth-of-type":function(B,C){return A.Selector._getNth(B,C,B.tagName);},"nth-last-of-type":function(B,C){return A.Selector._getNth(B,C,B.tagName,true);},"last-child":function(C){var B=A.Selector._children(C.parentNode);return B[B.length-1]===C;},"first-of-type":function(B){return A.Selector._children(B.parentNode,B.tagName)[0]===B;},"last-of-type":function(C){var B=A.Selector._children(C.parentNode,C.tagName);return B[B.length-1]===C;},"only-child":function(C){var B=A.Selector._children(C.parentNode);return B.length===1&&B[0]===C;},"only-of-type":function(C){var B=A.Selector._children(C.parentNode,C.tagName);return B.length===1&&B[0]===C;},"empty":function(B){return B.childNodes.length===0;},"not":function(B,C){return !A.Selector.test(B,C);},"contains":function(B,C){var D=B.innerText||B.textContent||"";return D.indexOf(C)>-1;},"checked":function(B){return(B.checked===true||B.selected===true);},enabled:function(B){return(B.disabled!==undefined&&!B.disabled);},disabled:function(B){return(B.disabled);}});A.mix(A.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"});A.Selector.combinators["~"]={axis:"previousSibling"};},"3.1.2",{requires:["dom-base","selector-native","selector-css2"]});
 
 
b'\\ No newline at end of file'