prototype: Merge -r6639:HEAD from branches/rel_1-5-1 into trunk.

This commit is contained in:
Sam Stephenson 2007-05-01 04:19:46 +00:00
parent 562e61fc8c
commit f457c98673
4 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,11 @@
* Add Function#curry, Function#delay, Function#defer, and Function#wrap. Closes #8134. [Andrew Dupont, Tobie Langel, sam]
*1.5.1* (it is a mystery)
*1.5.1* (May 1, 2007)
* Don't duplicate the event argument in Function#bindAsEventListener. Closes #6497. [wiktor]
* Fix Selector :not-clause chaining. [Andrew Dupont]
*1.5.1_rc4* (April 27, 2007)

View File

@ -77,7 +77,7 @@ Object.extend(Function.prototype, {
bindAsEventListener: function() {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [(event || window.event)].concat(args).concat($A(arguments)));
return __method.apply(object, [event || window.event].concat(args));
}
},

View File

@ -218,7 +218,7 @@ Object.extend(Selector, {
tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
id: /^#([\w\-\*]+)(\b|$)/,
className: /^\.([\w\-\*]+)(\b|$)/,
pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s)/,
pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,
attrPresence: /^\[([\w]+)\]/,
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/
},

View File

@ -324,6 +324,7 @@
assertEnumEqual([$('link_2')], $$('#p a:not(a[rel^=external])'), 'attribute 2');
assertEnumEqual([$('link_2')], $$('#p a:not(a[rel$=nofollow])'), 'attribute 3');
assertEnumEqual([$('em')], $$('#p a:not(a[rel$="nofollow"]) > em'), 'attribute 4')
assertEnumEqual([$('item_2')], $$('#list li:not(#item_1):not(#item_3)'), 'adjacent :not clauses');
}},
testSelectorWithEnabledDisabledChecked: function() {with(this) {