Commit Graph

551 Commits

Author SHA1 Message Date
Andrew Dupont
8c2af9bd66 Descriptions of all the classes/namespaces in the "Language" section. 2009-03-06 15:41:11 -06:00
Andrew Dupont
d189f809a4 Fixed aliases in PDoc for Enumerable. 2009-03-06 12:20:09 -06:00
Andrew Dupont
00742ac153 Extensive PDoc changes. 2009-03-05 13:56:01 -06:00
Andrew Dupont
e88f22e0c3 Redefine Element#down in IE 6-7 to avoid extending all descendants when no selector is given. [#452 state:resolved] (eno, Andrew Dupont) 2009-02-28 12:18:31 -06:00
Andrew Dupont
4a0b9b7c1d Reverse the definitions of Event#pointer(X|Y) and Event#pointer to prevent unnecessary computation. [#403 state:resolved] (Nick Stakenburg, Andrew Dupont). 2009-02-28 12:16:12 -06:00
Andrew Dupont
9d7a981e4c Add first-class support for mouseenter and mouseleave events in non-IE browsers (IE supports them natively). [#350 state:resolved] (Nick Stakenburg, Andrew Dupont) 2009-02-28 10:07:08 -06:00
Andrew Dupont
682a55c2d3 Make sure _extendedByPrototype, _countedByPrototype, and prototypeUID node expandos are accessed with typeof to prevent errors in some environments. [#354 state:resolved] (Hilberty, kangax, Andrew Dupont) 2009-02-28 04:48:57 -06:00
Andrew Dupont
26eaa4300b Fix issue where Opera 9.x returns incorrect results on certain Selector queries with descendant combinators. [#395 state:resolved] (Arpan, fearphage, kangax, Andrew Dupont) 2009-02-28 04:41:55 -06:00
Andrew Dupont
ee56c93f16 Remove old lines from class.js. 2009-02-28 04:36:44 -06:00
Andrew Dupont
de77550574 Minor PDoc corrections. 2009-02-27 17:02:42 -06:00
Andrew Dupont
d22a9988fa Null out references to elements in cache on page unload. Need this in addition to the Event#stopObserving calls to clean up memory leaks. [#425 state:resolved] (ykphuah, mr_justin, Andrew Dupont) 2009-02-27 16:45:51 -06:00
Andrew Dupont
47abfa68f0 Ensure toString and valueOf properties are copied to a subclass only when necessary in IE6. [@382 state:resolved] (Samuel Lebeau) 2009-02-27 16:35:05 -06:00
Andrew Dupont
d97466a7c1 Corrected a regex that was not picking up on attributes with hyphens. 2009-02-25 23:55:29 -06:00
Andrew Dupont
68096071a4 Added PDoc for form.js. 2009-02-25 17:00:40 -06:00
Andrew Dupont
8bfd9cf555 Added PDoc for event.js. 2009-02-24 05:44:04 -06:00
Andrew Dupont
60b9477c5b Added PDoc for dom.js. 2009-02-24 05:21:31 -06:00
Andrew Dupont
7a32414655 More PDoc additions. 2009-02-23 20:35:49 -06:00
Andrew Dupont
c9df079839 Added/corrected some PDoc. 2009-02-23 20:21:02 -06:00
Andrew Dupont
043653a282 Make sure getAttribute is used without flag when accessing the "type" attribute of an iframe (IE throws error otherwise). [#118 state:resolved] (Zekid, kangax) 2009-02-23 20:20:21 -06:00
Andrew Dupont
e9bdaef0af String#gsub should escape RegExp metacharacters when the first argument is a string. [#469 state:resolved] (michael, kangax) 2009-02-23 20:13:41 -06:00
Andrew Dupont
e3845ba0f6 Fix order of replacement in String#unescapeHTML [#544 state:resolved] (SWeini, kangax) 2009-02-23 20:07:43 -06:00
Andrew Dupont
432a9422d6 Fix issue where a Selector query rooted on a node that had not been attached to the document failed in IE. [#464 state:resolved] (jddalton, kangax, Douglas Fraser, Andrew Dupont) 2009-02-22 15:59:01 -06:00
Andrew Dupont
8fe518719e Fix Selector to match elements with attributes containing hyphens. [#285 state:resolved] (leiyou, jddalton, kangax) 2009-02-22 15:16:19 -06:00
Andrew Dupont
dc9d274d89 Make sure Form.reset always returns a reference to the receiver element. [#309 state:resolved] (Phil, kangax) 2009-02-22 15:11:40 -06:00
Andrew Dupont
97fc24a0b2 Escape ":" and "." characters when doing contextual CSS selection in browsers that support querySelectorAll. [#559 state:resolved] (fxtentacle, Andrew Dupont) 2009-02-22 12:45:00 -06:00
Andrew Dupont
9da5045df2 Removed redundant lines in selector.js. [#138 state:resolved] (Richard Quadling) 2009-02-21 23:32:00 -06:00
Andrew Dupont
91b787ae17 Ensure the target property on events is never undefined in IE. [#383 state:resolved] 2009-02-21 23:27:18 -06:00
Andrew Dupont
ab1313ea20 Ensure Element#descendants always returns an array. [#373 state:resolved] 2009-02-18 10:34:01 -06:00
Andrew Dupont
d3189652a6 Fixed incorrect usage of === operator. [#127 state:resolved] 2009-02-18 10:30:19 -06:00
James Wheare
03512f5060 Fix for http://prototype.lighthouseapp.com/projects/8886/tickets/543. Don't switch fixed position elements to absolute in Element.getDimensions
Signed-off-by: Sam Stephenson <sam@37signals.com>
2009-02-11 10:14:15 +08:00
Samuel Lebeau
ceb7b72621 Avoid String#sub with empty pattern to make endless loop [#534 state:resolved]
Signed-off-by: Sam Stephenson <sam@37signals.com>
2009-02-11 10:12:28 +08:00
Sam Stephenson
a519c02b2e Sprocketize Prototype 2009-01-27 15:42:32 -06:00
Andrew Dupont
952feb48a3 Changes to dom.js to get direct extension of element prototypes working in IE8. We're down to one test failure in the dom.js unit tests. 2009-01-21 20:40:45 -06:00
Andrew Dupont
4af7dc0f5d Changed feature detection in order to properly detect the mutable Element prototypes in IE8. 2009-01-21 20:29:23 -06:00
Samuel Lebeau
8a999a0389 Fix Range documentation 2009-01-12 08:28:49 -06:00
Samuel Lebeau
b2597ece0c Start PDoc integration. 2009-01-12 08:27:43 -06:00
Andrew Dupont
997689fcea Switch Object.is(Array|String|Number) to use the vastly-superior approach discovered by Juriy. 2009-01-11 18:26:26 -06:00
savetheclocktower
31d1c6fd48 Further fix to ensure Object#is(String|Number) do not throw exceptions on host objects in IE. [#510 state:resolved] 2009-01-05 10:49:09 -06:00
Andrew Dupont
9f5c40c744 Ensure Enumerable#grep can handle strings with RegExp metacharacters. [#257 state:resolved] 2008-12-19 18:50:08 -06:00
Andrew Dupont
e9e8c7fbe5 Switch to the "doScroll approach" for the dom:loaded custom event. [#127 state:resolved] 2008-12-16 22:52:24 -06:00
savetheclocktower
bd1d3fa1ff Change the way we detect that an object of key/value pairs has been passed to Element#store. 2008-12-16 13:19:23 -06:00
Andrew Dupont
c3c953363b Optimize document.viewport.get(Dimensions|Width|Height). [#336 state:resolved] 2008-12-15 20:40:15 -06:00
Andrew Dupont
07506e648b Fix issue where Object#isString and Object#isNumber return false for String and Number "wrapper" objects. [#375 state:resolved] 2008-12-15 20:31:18 -06:00
Andrew Dupont
60a6c7ac70 Set document.loaded = true before firing dom:loaded custom event. 2008-12-15 20:21:17 -06:00
savetheclocktower
c4f6066d2c Allow Element#store to accept an object containing several key/value pairs. 2008-12-15 09:51:16 -06:00
savetheclocktower
1ca385b18c Change Element#retrieve to return the element itself (for chaining). 2008-12-15 09:41:10 -06:00
Andrew Dupont
3b21105237 Alter event system to use new element storage API rather than have its own global hashtable. 2008-12-14 01:35:49 -06:00
Andrew Dupont
77b9a2614a Alter element storage API to handle the window object gracefully. 2008-12-14 01:35:12 -06:00
Andrew Dupont
3977e66796 Added Element#store and Element#retrieve for safe, hash-backed storage of element metadata (no memory leaks). Also added Element#getStorage for working with the element's storage hash directly. Hat tip: Mootools. 2008-12-12 23:53:39 -06:00
Tobie Langel
1d617df4df Avoid using arguments.callee in string.js. 2008-12-11 17:05:24 +01:00
Tobie Langel
1cda280a72 Avoid using arguments.callee in dom.js. 2008-12-11 17:05:09 +01:00
Tobie Langel
b74eeeb757 Make Element constructor creation cleaner. 2008-12-11 17:04:13 +01:00
Tobie Langel
51d0181d29 Avoid using arguments.callee in events.js. 2008-12-11 17:03:53 +01:00
Tobie Langel
7f6b3e81a2 Overwrite Array#concat method for handling the arguments object in Opera. 2008-12-11 17:03:10 +01:00
Tobie Langel
1395330440 Fix Array errors in Opera. 2008-12-11 17:00:45 +01:00
Tobie Langel
e5f7cac36f Avoid shadowing named functions. 2008-12-11 16:55:02 +01:00
Tobie Langel
86407790d2 Fix issue where certain versions of Safari treat class names
case-insensitively in Selector/7390 queries. [#390 state:resolved]
2008-12-11 12:07:23 +01:00
Andrew Dupont
1324e4abe0 Refactored class.js. 2008-12-11 12:06:22 +01:00
Andrew Dupont
54bf343560 Fix issue where Function#argumentNames returned incorrect results in IE when comments were intermixed with argument names. [#397 state:resolved] 2008-12-11 12:02:26 +01:00
savetheclocktower
c039f68fb7 Selector.patterns should be represented as an ordered structure. [#315 state:resolved] 2008-12-11 12:00:44 +01:00
Tobie Langel
dad88f6ebf Refactored event.js. 2008-12-11 11:56:38 +01:00
Tobie Langel
1aacbd692c string.js rewrite. 2008-12-11 11:50:51 +01:00
Tobie Langel
535d4e6d18 function.js rewrite. 2008-12-11 11:49:41 +01:00
Tobie Langel
0b646c01c6 Refactor object.js. 2008-12-11 11:46:42 +01:00
Tobie Langel
48f5ff2072 Split ajax.js. 2008-12-11 11:45:10 +01:00
Tobie Langel
fe35c941eb Split src code into lang, dom and ajax directories. 2008-12-11 11:43:15 +01:00
Tobie Langel
6850979395 Split base.js up. 2008-12-11 11:42:15 +01:00
Tobie Langel
616319377f Extract the template class out of string.js and into its own file. 2008-12-11 11:35:20 +01:00
Tobie Langel
314e161c57 Reorganize range.js. 2008-12-11 11:34:19 +01:00
Tobie Langel
23b760865a Reorganize number.js. 2008-12-11 11:34:05 +01:00
Tobie Langel
75440aa98d Reorganize hash.js. 2008-12-11 11:33:45 +01:00
Tobie Langel
92eac6f1f6 Reorganize enumerable.js. 2008-12-11 11:33:31 +01:00
Tobie Langel
d3e833c48e Reorganizing array.js source code. 2008-12-11 11:31:36 +01:00
Thomas Fuchs
deb47c6361 Workaround a JavaScript exception in Opera. 2008-09-28 21:12:15 +02:00
Tobie Langel
6416d28080 Fix Event#element throwing errors for events missing a currentTarget. 2008-09-09 11:57:59 -07:00
Tobie Langel
be8508f2a1 Event#element clean-up. 2008-09-07 20:50:35 -07:00
Andrew Dupont
b7af8a745b Improve NodeList detection for Safari's $A function. [#187 state:resolved] 2008-09-07 20:19:05 -07:00
Andrew Dupont
5ddfad8a62 Use different tactic to sniff for Opera in order to avoid false positives in IE. [#176 state:resolved] 2008-09-07 20:18:21 -07:00
Andrew Dupont
7444a4ad02 Rename variable in Form.Element.Serializers.select. [#180 state:resolved] 2008-09-07 20:11:53 -07:00
Andrew Dupont
6c6f8d39ea Coerce Opera's version string into a number whenever we need to sniff. [#163 state:resolved] 2008-09-07 20:07:30 -07:00
Andrew Dupont
4308f376ff Update copyright dates in HEADER. 2008-09-07 19:37:54 -07:00
Andrew Dupont
d88c25fd47 Ensure Object.isElement handles "falsy" values properly. 2008-09-07 19:26:21 -07:00
Andrew Dupont
b31f642e64 Ensure Hash does not return keys from the prototype chain (e.g., constructor, valueOf, toString). 2008-09-07 19:20:38 -07:00
Andrew Dupont
64002a9083 Fix toString/valueOf sharing same method reference via closure in Class#addMethods. Use plain property assignment, since Object.extend fails to enumerate over toString/valueOf. 2008-09-07 19:19:21 -07:00
Andrew Dupont
637134651a Fix IE's missing negated attribute operator in the selector class. 2008-09-07 18:50:43 -07:00
Andrew Dupont
34798f0d74 Fix Opera 9.5 strict issue that swaps documentElement.clientHeight with body.clientHeight. 2008-09-07 18:49:45 -07:00
jdalton
1d0fb77ec3 Force Element.Methods.Simulated.hasAttribute() to return a boolean value. 2008-09-07 16:30:11 -07:00
Andrew Dupont
b52a55482e Small unit test fix. 2008-09-07 10:56:33 -07:00
Tobie Langel
6004aa8289 Ensure Element.hide and Element.show return an element, even if you pass an element ID. 2008-09-06 22:47:26 -07:00
Tobie Langel
ae707f4475 Fix an issue where Element#getStyle('height') returns null if the height is set to "auto." 2008-09-03 18:27:04 -07:00
Tobie Langel
6847d27509 Form#serializeElements should not serialize file inputs. 2008-09-03 16:33:03 -07:00
Andrew Dupont
9787801f06 Fix an issue with calling Event.pointer before the DOM is loaded. (kangax, jddalton) [#4 state:resolved] 2008-09-03 15:33:56 -07:00
Tobie Langel
b4ea2abda1 Element#down on an input element should not raise error. 2008-09-03 14:16:32 -07:00
Tobie Langel
b628c6de5c Avoid potential memory leaks in Firefox. [#12 state:resolved] 2008-09-03 12:19:28 -07:00
Tobie Langel
206a4c824f Allow Function#argumentNames to handle line breaks between arguments. 2008-09-03 12:17:53 -07:00
Samuel Lebeau
15b43b7633 Add context argument to Number#times 2008-09-03 11:45:59 -07:00
Tobie Langel
5a1ef1e05c Fix Function#argumentNames. 2008-09-03 11:44:47 -07:00
Tobie Langel
9c8d9d89d6 Replace all instances of foo.__proto__ by foo['__proto__'] for Caja-compliance. 2008-09-02 19:06:25 -07:00
Tobie Langel
de5cc4a0f9 Speed up Function#argumentNames. Avoid Enum dependency. 2008-09-02 19:03:23 -07:00
kangax
b75bc189ec Fix Event#element accessing nonexistent tagName property (e.g. when element is a document) 2008-09-02 18:58:50 -07:00
Andrew Dupont
a1d89b4503 Fixed a faulty variable assignment, the result of my own idiocy last week. 2008-04-04 12:55:59 -05:00
Andrew Dupont
1c00700894 Fix parentheses. 2008-03-31 13:58:10 -05:00
Andrew Dupont
ab8cc48b8d Account for context to assure Element#down, et al., work properly with Selectors API. 2008-03-31 12:51:44 -05:00
Andrew Dupont
d13a93882c Fix issue where Safari improperly reports an element as a descendant of itself. 2008-03-30 21:02:47 -05:00
Andrew Dupont
a3f7b712c3 Greatly simplify IE's implementation of Element#descendantOf. 2008-03-30 20:07:47 -05:00
Andrew Dupont
b03d4d40a0 Merge branch 'master' of git@github.com:sstephenson/prototype 2008-03-29 22:23:50 -05:00
Andrew Dupont
7062189fed Added Prototype.BrowserFeatures.SelectorsAPI boolean. 2008-03-29 22:21:58 -05:00
Andrew Dupont
35a70710b0 Prevent exception when using Selector to search for an attribute that is not present. 2008-03-28 13:31:36 -05:00
Andrew Dupont
55e5d645e1 Fix issues where Firefox improperly returns the wrong node from a call to Event.element. Also fixes possible exception in Event.element in IE. 2008-03-28 13:13:16 -05:00
Andrew Dupont
0c676269e9 Fix issue where Safari 3 deletes custom properties from the document object when the page is returned to via the back button. 2008-03-28 12:48:42 -05:00
Andrew Dupont
03c1530014 Integrate support for the W3C Selectors API into the Selector class. Will now use the API when possible (browser supports the API *and* recognizes the given selector). Means minor changes to the semantics of :enabled, :disabled, and :empty in order to comply with CSS spec. 2008-03-27 01:18:15 -05:00
Tobie Langel
855e27311d prototype: Avoid re-extending element in Element#getDimensions. 2008-03-19 14:04:52 +00:00
Tobie Langel
598387f137 prototype: Prevent Hash#toQueryString from serializing objets. 2008-03-19 13:01:47 +00:00
Tobie Langel
32b1b6b7cd prototype: Fix Event#pointer in IE standard mode. Closes #9920. 2008-03-19 07:01:49 +00:00
Andrew Dupont
6a2d81ce62 Fixed an improperly-encoded apostrophe in a comment. 2008-03-17 15:59:58 +00:00
Tobie Langel
6bae548e0a prototype: Refactor String#escapeHTML to avoid using the with statement. 2008-03-16 19:08:34 +00:00
Tobie Langel
addfdef8ff prototype: Make Element#writeAttribute handle frameborder attribute in IE. Closes #11068. 2008-03-09 08:05:29 +00:00
Tobie Langel
359e8810de prototype: Minor clean-up of selector.js. Closes #10844. 2008-03-09 07:27:02 +00:00
Tobie Langel
c7e0a3d93c prototype: Make String#unescapeHTML strip tags in IE. Closes #10173. 2008-03-09 07:21:45 +00:00
Tobie Langel
5a50e4d2c0 prototype: Performance improvements for Enumerables. Closes #11264. 2008-03-09 06:56:03 +00:00
Tobie Langel
5630369f42 prototype: Make Prototype tagName comparisons XHTML-compliant. Closes #11012, #11013, #11014. 2008-02-05 03:35:04 +00:00
Tobie Langel
7821b989fe prototype: Avoid breaking Element.prototype in browsers which support it. Closes #11004. 2008-02-04 23:22:18 +00:00
Tobie Langel
2830ac2ac5 prototype: Prevent Element#cumulativeOffset, Element#getOffsetParent, Element#positionedOffset, Element#viewportOffset and Element#clonePosition from throwing an error in IE when called on a parent-less element. Closes #9416, #10192, #10248. 2008-02-03 22:29:29 +00:00
Tobie Langel
d770a6c704 prototype: Prevent Enumerable#eachSlice from entering into an endless loop if passed an argument smaller than 1. Closes #10665. 2008-02-03 21:08:13 +00:00
Tobie Langel
f4d68350f3 prototype: Allow Selector to correctly detect the presence of namespaced attributes. Closes #10987. 2008-02-03 19:45:32 +00:00
Tobie Langel
ea9d81eea1 prototype: Make Element#absolutize and Element#relativize always return element. Closes #10983. 2008-02-03 19:36:35 +00:00
Andrew Dupont
c24a390c49 Ensure positionedOffset properly considers "position: fixed" elements. Also ensure IE reports offsets correctly by triggering hasLayout when a "static" element has a "fixed" element as an offset parent. Closes #10644. [heygrady, kangax, Andrew Dupont] 2008-01-25 22:02:12 +00:00
Andrew Dupont
ffa0d0943c Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms. 2008-01-25 18:54:22 +00:00
Andrew Dupont
a1ec25cddb Prevent DOM node expandos _countedByPrototype and _prototypeEventID from being serialized into (inner|outer)HTML in IE. Closes #10909. [dcpedit, Tobie Langel, Andrew Dupont] 2008-01-25 18:49:40 +00:00
Tobie Langel
794457da75 Make Ajax.Request#isSameOrigin JavaScript Lint compliant. Backport fix to 1.5.1.2. 2008-01-24 03:02:34 +00:00
Andrew Dupont
0f97f4ce20 Properly serialize form fields with names that collide with built-in JS properties (like "length" or "toString"). Closes #9609. [gryn, kangax] 2008-01-24 02:24:33 +00:00
Tobie Langel
17cd2f9f8d prototype: Make Object.isArray correctly identify arrays created in another frame. Closes #10374. 2008-01-24 01:33:28 +00:00
Andrew Dupont
7942a9e5c9 Fixed issue where Element#match failed on attribute selectors with single or double quotes. Closes #10067. [Cezary Okupski, Andrew Dupont] 2008-01-23 20:05:17 +00:00
Tobie Langel
b26f4e349e prototype: Fix Element#writeAttribute to work with 'cellspacing' and 'cellpadding' attributes in IE. Closes #9983. 2008-01-23 12:17:26 +00:00
Tobie Langel
02cc9992e9 prototype: Prevent a potential security issue for cross-site ajax requests. 2008-01-23 00:51:25 +00:00
Tobie Langel
dcada47c6d prototype: Test for attribute existence before applying more complex CSS3 selectors. Closes #10870. 2008-01-23 00:33:04 +00:00
Andrew Dupont
c200c27f48 Fix "function $A" declaration inside of a conditional (confuses IE). Fixes #10882. [Jacco, Andrew Dupont] 2008-01-22 23:36:47 +00:00
Andrew Dupont
c67fe0b2f3 Fixed selector parsing so that "#foo [bar=baz]" is treated the same way as "#foo *[bar=baz]". Closes #10734. [jlukas, kangax, Andrew Dupont] 2008-01-18 04:52:38 +00:00
Andrew Dupont
89cbe08e1c Fix Element#descendantOf logic in IE. Closes #10413. [martymix, kamil.szot] 2008-01-18 04:31:23 +00:00
Tobie Langel
7052c5a60c prototype: Fix missing var in Element#insert. Closes #10838. 2008-01-17 16:41:34 +00:00
Tobie Langel
7cd956d9c4 prototype: Remove useless binding in Template#evaluate. 2008-01-14 01:38:28 +00:00
Tobie Langel
ac48714ada prototype: Make Object.inspect more robust. 2008-01-14 01:22:37 +00:00
Tobie Langel
a246e777f5 prototype: Fix Selector.matchElements to allow for coma-separated selectors in Element#up/next/previous and Event#findElement. 2008-01-06 21:49:16 +00:00
Tobie Langel
0008fe4aed prototype: Test.Unit refactoring. Allow running multiple instances of Test.Unit.Runner on the same page. Allow rake to run specific testcases. Closes #10704, #10705, #10706. 2008-01-06 00:34:39 +00:00
Tobie Langel
7c86e29805 prototype: Optimize property detection of outerHTML. Avoids triggering FOUC in Safari 3.0.4. Closes #10702. 2008-01-04 23:56:27 +00:00
Tobie Langel
6f0def19c5 prototype: Add document.loaded, a boolean that is set to true once dom:loaded is fired. 2008-01-04 00:30:53 +00:00
Tobie Langel
b4735bca7c prototype: Make Element#insert standard-compliant. Fixes an issue in FF3b2 when inserting HTML or text inside DOM nodes which aren't (yet) appended to the document. 2008-01-03 01:50:36 +00:00
Tobie Langel
f553d2210e prototype: Add some missing semicolons to the source tree. Closes #10659. 2007-12-31 16:16:14 +00:00
Tobie Langel
c9a07576be prototype: Ensure Ajax.Response#getHeader returns null for missing headers in Opera. 2007-12-30 10:59:23 +00:00
Tobie Langel
f0d54a48bd prototype: Ensure Ajax.Response#getHeader returns null for missing headers. 2007-12-29 11:09:43 +00:00
Tobie Langel
5a37860ffb prototype: Ensure creates an empty array when its argument's length is undefined. Closes #10574 2007-12-20 15:47:32 +00:00
Tobie Langel
23f7cb642c prototype: Fix incorrect variable declaration in Event.fire. Closes #10329. 2007-12-20 13:10:42 +00:00
Andrew Dupont
c691de7810 Fix the way Selector handles [pseudoclass + combinator] with no space in between. Closes #9696. [kangax, fearphage, Andrew Dupont] 2007-12-20 00:17:24 +00:00
Andrew Dupont
cb239625b3 Optimize Element#up/down/next/previous. Closes #10353. [Dylan Bruzenak, Nick Stackenburg, Andrew Dupont] 2007-12-19 23:43:48 +00:00
Andrew Dupont
6f0e0ad649 Handle case-sensitivity in Selector tag names better. Closes #5052. [mexx, Andrew Dupont] 2007-12-19 23:32:21 +00:00
Andrew Dupont
4d3ebf0912 Change document.viewport.getDimensions to exclude scrollbars in all cases. Closes #10148, #9288. [Nick Stackenburg] 2007-12-04 04:28:27 +00:00
Andrew Dupont
ae76169baf Add logic to Element#getStyle in Opera that fixes inaccurate reporting of computed 'width' and 'height' properties. [Andrew Dupont] 2007-12-04 04:03:56 +00:00
Sam Stephenson
769ae42fcc prototype: Ensure that an Ajax.Request's parameters option can be a Hash. Closes #10172. 2007-11-29 00:24:54 +00:00
Andrew Dupont
c85285496b * Ensure no comment nodes are returned in Selector queries (IE improperly returns comment nodes on getElementsByTagName("*")). Change Element#descendants to use Element#getElementsBySelector in order to avoid this issue. Closes #10220. [Jeff Gobel, Andrew Dupont] 2007-11-27 18:43:56 +00:00
Andrew Dupont
b01903d92f * Re-enable the XPath approach in Selector for Safari 3. Falls back to the non-XPath version when it sees a problematic token. [Andrew Dupont] 2007-11-27 18:21:50 +00:00
Andrew Dupont
26b8033295 * Fix a bug in the IE-specific Element#descendantOf logic. [Nicholas, Andrew Dupont] 2007-11-27 17:59:46 +00:00
Tobie Langel
23823048d1 prototype: Prevent memory leaks in Ajax.PeriodicalUpdater. Closes #10049 2007-11-15 23:14:36 +00:00
Tobie Langel
c371096a71 prototype: Remove useless variable in Selector.handlers.child. Closes #10006. 2007-11-15 22:21:08 +00:00
Tobie Langel
d20cc77e0c prototype: Don't redeclare previously declared variables. Closes #10007 2007-11-15 22:15:24 +00:00
Tobie Langel
07a16464e8 prototype: use Object.isUndefined where possible. 2007-11-15 21:53:15 +00:00
Tobie Langel
b058e24a05 prototype: Make String#isJSON return false for empty or blank strings. Make Ajax.Response#responseJSON null when Ajax.Response#responseText is empty or blank. 2007-11-15 19:37:26 +00:00
Tobie Langel
f8ffe7b40f prototype: Make Ajax.Response#_getResponseJSON use Ajax.Response#responseText. 2007-11-15 14:02:25 +00:00
Tobie Langel
74c005c678 prototype: Remove the now redundant forked declaration of Hash#_each. 2007-11-14 11:56:15 +00:00
Tobie Langel
0b6a6e2f2f prototype: Ensure Event#fire always returns an extended event. Make Event#findElement's expression argument optional. Perf optimizations for Event#findElement. 2007-11-13 21:48:09 +00:00
Sam Stephenson
9b78edb9de prototype: Fix Class#addMethods for "toString" and "valueOf" methods in Internet Explorer. Closes #9901. 2007-11-06 01:44:24 +00:00
Andrew Dupont
b14c9afa58 Exclude Opera from using the sourceIndex approach in Element#descendantOf. [Tobie Langel, Andrew Dupont] 2007-11-05 17:54:13 +00:00
Tobie Langel
d6b843c9cb Ensure Element#hasClassName always returns a boolean. Closes #10075. 2007-11-05 17:43:56 +00:00
Andrew Dupont
8cd85d12a2 Ensure selectors of the form "[href]" (attribute token with no preceding tag name) work properly. Closes #8870. [chao, kangax, Andrew Dupont] 2007-11-05 17:11:41 +00:00
Andrew Dupont
e457edbcf4 Simplified the bitmask in Element#descendantOf. 2007-11-01 19:06:02 +00:00
Andrew Dupont
7cf17c7bec Performance optimizations for Element#descendantOf. Costliness should no longer be dependent on the difference in depth between the parent and the child. [Andrew Dupont] 2007-11-01 15:11:52 +00:00
Thomas Fuchs
916cbbaf4c Apply the workaround for the Firefox "blinking element" opacity=1 bug only to Firefox 1.5. 2007-10-29 23:06:15 +00:00
Andrew Dupont
67cf750956 Add event.stopped, a boolean that is set to when Event#stop is called. 2007-10-26 19:15:35 +00:00
Tobie Langel
4dece6b277 Use String#include wherever possible. 2007-10-22 22:16:32 +00:00
Tobie Langel
16127b024a prototype: In IE, allow opacity to be set on elements not yet attached to the document. Closes #9904. 2007-10-22 13:14:56 +00:00
Tobie Langel
f870fba94f prototype: Avoid the try..catch block in Ajax.Response#_getResponseJSON unless required. 2007-10-22 12:04:06 +00:00
Tobie Langel
44c9d8937a prototype: Make the Ajax.Response#headerJSON property correctly decode unicode characters. Closes #9285 2007-10-22 11:20:21 +00:00
Tobie Langel
827c8c6b48 prototype: Prevent a Firefox bug from throwing errors on page load/unload. Closes #5393, #9421. 2007-10-22 01:04:17 +00:00
Tobie Langel
37bab18999 prototype: previous changeset Closes #9917, #9463, #8260. 2007-10-18 15:52:26 +00:00
Tobie Langel
29c0de6937 prototype: Make submitting forms work in Opera < 9.1. 2007-10-18 15:46:30 +00:00
Sam Stephenson
b83ae95d90 prototype: Fix template evaluation with empty replacements. Closes #9692. 2007-10-17 14:14:27 +00:00
Sam Stephenson
8327ffd8ae prototype: Hash#toTemplateReplacements is an alias for Hash#toObject so you can once again pass hashes to Template#evaluate and String#interpolate. 2007-10-17 13:39:46 +00:00
Sam Stephenson
d114e76e97 prototype: Fix Event#is(Left|Middle|Right)Click in IE. Closes #7520. 2007-10-17 13:26:49 +00:00
Andrew Dupont
aada1abb56 * Ensure Event.* generic methods work in IE, even when the event is not extended. [Viktor Kojouharov, Andrew Dupont] 2007-10-16 05:11:42 +00:00
Sam Stephenson
bfd5353cbf prototype: Don't translate "keypress" events into "keydown" events. 2007-10-16 03:36:58 +00:00
Andrew Dupont
8d3d6cdb04 * Changed Element#makeClipping to remember the original overflow value, even if it's a non-inline style. [Andrew Dupont] 2007-10-16 03:29:19 +00:00
Sam Stephenson
3dd7bd5b4b prototype: Cross-browser Event#isLeftClick with the addition of is(Middle|Right)Click. Closes #7520. 2007-10-16 03:19:38 +00:00
Andrew Dupont
6cd34be0c4 * Change Selector to use the non-XPath approach for Safari 3 because of bugs in its version of document.evaluate. [Andrew Dupont] 2007-10-16 03:08:31 +00:00
Andrew Dupont
0dd4ba70f6 * Changed the Selector regex that tests whether the selector can be expressed in XPath; added :checked, since XPath can't detect all scenarios in which an <input> is checked. Fixes #9776. [StelardActek, kangax, Andrew Dupont] 2007-10-16 02:28:28 +00:00
Andrew Dupont
88f8d3b9af * Changed Selector pattern match so that descendant combinators after pseudoclass tokens are properly handled. Fixes #9696. [wiktor, kangax, Andrew Dupont] 2007-10-16 02:21:24 +00:00
Tobie Langel
865ac01937 prototype: Make sure $w always returns an array. 2007-10-15 17:19:16 +00:00
Tobie Langel
941359b2f7 Performance enhancements to . Closes #9464 2007-10-14 11:12:08 +00:00
Tobie Langel
7dda50a7c9 Make Function#argumentNames work with named functions. Closes #9826 2007-10-14 10:54:06 +00:00
Tobie Langel
96af1b7579 Add Object.isHash. 2007-10-14 08:08:42 +00:00
Tobie Langel
d195111a9d Performance improvements to String#times. 2007-10-13 19:05:19 +00:00
Tobie Langel
db371ddb5a Make Ajax.Response#getHeaderJSON and Ajax.Response#getResponseJSON pseudo private instance methods. 2007-10-13 11:37:26 +00:00
Tobie Langel
e7bb042aa6 Make ObjectRange use the new Class.create syntax. 2007-10-13 11:24:23 +00:00
Tobie Langel
d25b863c9a Complete rewrite of the Hash class. 2007-10-13 10:55:52 +00:00
Sam Stephenson
4607e29fa2 prototype: Element#wrap now returns the wrapper instead of the element being wrapped. 2007-10-11 06:11:26 +00:00
Sam Stephenson
115d3e456d prototype: Namespace all custom event names to avoid conflicts with native DOM events. 2007-10-11 06:00:45 +00:00
Sam Stephenson
c35598ca2b prototype: Clean up the new class API. 2007-10-11 05:02:07 +00:00
Sam Stephenson
8ca43a5c88 prototype: Fix contentloaded event initialization in IE. Closes #9457, #9488, #9707. 2007-10-08 22:37:15 +00:00
Sam Stephenson
c904fe7664 prototype: Deprecate document.getElementsByClassName and Element#getElementsByClassName since native versions return a NodeList and we can only return an Array. Please use $$ or Element#select instead. 2007-10-08 21:29:27 +00:00
Sam Stephenson
cf88669931 prototype: Fix missing "var" in selector.js. Closes #9761. 2007-10-08 21:15:46 +00:00
Sam Stephenson
4b1fb7e03a prototype: Date#toJSON now returns times in UTC for better compatibility with json.js. Closes #9332. 2007-10-08 21:14:24 +00:00
Sam Stephenson
8cf1f895f7 prototype: Ensure document._getElementsByXPath extends the elements it returns; fixes $$ not returning extended elements in Opera 9.2. Closes #8843. 2007-10-08 19:01:31 +00:00
Sam Stephenson
05e48f6feb prototype: Update Prototype.Browser.MobileSafari for iPod touch compatibility. 2007-10-08 17:30:40 +00:00
Thomas Fuchs
6c94af703d Make sure setting opacity works on elements that have "no layout" in IE. 2007-08-27 18:37:49 +00:00
Sam Stephenson
6ed9095df9 prototype: Simplify Class.create by establishing a prototype chain when subclassing. Closes #9342. 2007-08-23 21:12:02 +00:00
Sam Stephenson
5d3fd6f3b7 prototype: Fix Ajax.PeriodicalUpdater for compatibility with Ajax.Response. Closes #9321. 2007-08-21 16:18:07 +00:00
Sam Stephenson
001b54865c prototype: Ensure that classes always have an initialize method. 2007-08-21 16:15:59 +00:00
Sam Stephenson
6086db40a7 prototype: Update Template, Selector, Ajax.*, and ObjectRange classes to use the new class system. 2007-08-18 23:21:29 +00:00
Sam Stephenson
75b3f3c844 prototype: Change Abstract.TimedObserver to subclass PeriodicalExecuter and tweak its subclasses to use new inheritance functionality. TimedObserver can now be stopped the same way as PeriodicalExecuter. Closes #8589. 2007-08-18 23:04:28 +00:00
Sam Stephenson
bfba40e0cd prototype: Fix Class.mixin to extend the class's prototype. 2007-08-18 22:58:13 +00:00
Sam Stephenson
b923d6dd52 prototype: Fix superclass method call breakage from [7337]. 2007-08-18 22:55:35 +00:00
Sam Stephenson
702d968841 prototype: Change Class.extend to allow for superclass method resolution and remove Class.inherit. Closes #9274. 2007-08-17 17:35:22 +00:00
Sam Stephenson
b2f884b4fa prototype: Event handlers are now bound to the observed element, not the event's target element. 2007-08-17 16:17:26 +00:00
Thomas Fuchs
aa1a7f5bf0 prototype: Define Node constants conditionally after checking for Node.ELEMENT_NODE presence. Add unit test to check the values of all constants. Closes #7625. 2007-08-17 11:20:56 +00:00
Thomas Fuchs
194fda0b6d prototype: Make sure Enumerable#include doesnt do type comparision. [Mislav Marohnić] 2007-08-17 11:06:07 +00:00
Thomas Fuchs
f86ac770d4 Prototype: Add contextmenu to Event.DOMEvents. 2007-08-14 12:05:20 +00:00
Sam Stephenson
d8b8c6586d prototype: Fix readAttribute-related failure in form.html in IE. 2007-08-14 05:08:18 +00:00
Sam Stephenson
c27f2de373 prototype: Fix failing dom.html and selector.html tests in IE. 2007-08-14 04:14:22 +00:00
Sam Stephenson
c603fc5d42 prototype: Make sure the WebKit redefinition of Element#cumulativeOffset uses Element._returnOffset. Closes #9245. 2007-08-13 15:15:01 +00:00
Sam Stephenson
11f25aa995 prototype: Make sure Element#observe is always chainable. 2007-08-11 19:53:39 +00:00
Sam Stephenson
d2974cfca3 prototype: Make sure Element#stopObserving is always chainable. 2007-08-11 19:07:21 +00:00
Sam Stephenson
14ea77ef39 prototype: Event.fire/Element#fire now returns the newly-fired event instead of the event's target element. 2007-08-11 18:46:02 +00:00
Sam Stephenson
d7da841c80 prototype: Restrict Event.DOMEvents to include only events that can be supported in all browsers 2007-08-11 18:14:20 +00:00
Sam Stephenson
ffa744e4aa prototype: Fix a failing test in base.html in Safari 2. 2007-08-11 01:36:20 +00:00
Thomas Fuchs
5f76c255a1 Fix Element#positionedOffset and Element#getOffsetParent for static elements on IE. DOM unit tests now pass on IE. 2007-08-10 14:19:30 +00:00
Sam Stephenson
2fbb49001c prototype: Make sure event handlers and their wrappers are removed from the cache by Event.stopObserving. 2007-08-09 23:45:59 +00:00
Sam Stephenson
e75cd0acdd prototype: Fix Function#argumentNames for IE 2007-08-09 00:27:51 +00:00
Sam Stephenson
220f6379f1 prototype: Fix Function#argumentNames for Opera 2007-08-08 23:50:36 +00:00
Sam Stephenson
df71a6b54f prototype: Add Object.isString, Object.isNumber, and Object.isUndefined, and clean up the source to make use of Object.isXXX where possible. 2007-08-08 23:19:45 +00:00
Sam Stephenson
ae2ab03294 prototype: Add the document.viewport object for querying dimensions and scroll offsets of the browser viewport. 2007-08-08 20:42:46 +00:00
Sam Stephenson
c488384f90 prototype: Add support for brackets in quoted attribute value selectors. Closes #9157. 2007-08-07 20:33:53 +00:00
Sam Stephenson
c9a0485b60 prototype: Add some missing semicolons to the source tree. Closes #9140. 2007-08-07 19:41:13 +00:00
Sam Stephenson
12f87a77a7 prototype: We can just use HTMLEvents in every non-IE browser instead of special-casing for Safari 2 2007-08-07 19:33:37 +00:00
Thomas Fuchs
cbaec757e2 Prototype: Fix event extensions and custom events firing for Safari 2.0 2007-08-07 14:55:34 +00:00
Sam Stephenson
30aa7a6532 prototype: Add RegExp.escape for escaping regular expression strings. Closes #9094. 2007-08-04 07:31:52 +00:00
Sam Stephenson
aa4602b459 prototype: Merge -r7242:HEAD from ../branches/1-6-0-events. Adds support for DOM-based custom events with Event.fire/Element.Methods.fire, cross-browser DOMContentLoaded support, extended and normalized event objects, and improvements to the observe and stopObserving APIs. 2007-08-04 07:20:45 +00:00
Sam Stephenson
52cf3f2550 prototype: Merge -r7016:HEAD from ../branches/ajax. Add Ajax.Response object which supports the following methods: responseJSON, headerJSON, getHeader, getAllHeaders and handles browser discrepancies in the other response methods. Add sanitizeJSON, evalJS and evalJSON to Ajax.Request. Closes #8122, #8006, #7295. 2007-08-04 04:40:22 +00:00
Sam Stephenson
281ac64876 prototype: Merge -r6792:HEAD from ../branches/inheritance/{src/base.js,test/base.html}. Robust inheritance support for Class.create. Closes #5459. 2007-08-04 04:03:51 +00:00
Sam Stephenson
90c9c69ff0 prototype: Add Function#argumentNames, which returns an ordered array of the function's named arguments. 2007-07-30 04:38:20 +00:00
Sam Stephenson
5645a0783f prototype: Add Prototype.Browser.MobileSafari which evaluates to true on the iPhone's browser. 2007-07-26 02:03:40 +00:00
Sam Stephenson
1575435f5e prototype: Element#classNames should still use the Element.ClassNames API for now 2007-07-24 20:53:32 +00:00
Sam Stephenson
82bedcee84 prototype: Optimize Selector#match and Element#match for simple selectors. Closes #9082. 2007-07-24 20:49:55 +00:00