Commit Graph

81 Commits

Author SHA1 Message Date
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
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 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 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
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 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
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 26b8033295 * Fix a bug in the IE-specific Element#descendantOf logic. [Nicholas, Andrew Dupont] 2007-11-27 17:59:46 +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
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 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
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
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 4607e29fa2 prototype: Element#wrap now returns the wrapper instead of the element being wrapped. 2007-10-11 06:11:26 +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 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
Thomas Fuchs 6c94af703d Make sure setting opacity works on elements that have "no layout" in IE. 2007-08-27 18:37:49 +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
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
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 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 c9a0485b60 prototype: Add some missing semicolons to the source tree. Closes #9140. 2007-08-07 19:41:13 +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 1575435f5e prototype: Element#classNames should still use the Element.ClassNames API for now 2007-07-24 20:53:32 +00:00
Sam Stephenson a529bcf590 prototype: Remove the dependency on Element.ClassNames from Element#addClassName/removeClassName/toggleClassName, and deprecate Element.ClassNames. Closes #9073. 2007-07-24 20:42:21 +00:00
Sam Stephenson 59c3dfd87a prototype: Use Object.isElement 2007-07-24 19:10:44 +00:00
Sam Stephenson c0735dba77 prototype: Make Element#wrap accept a second argument for setting attributes on the wrapper. Allow wrapping elements which are not part of the document. Closes #9071. 2007-07-24 19:08:55 +00:00
Sam Stephenson 44ef74813b prototype: Improvements for Element#replace, Element#update and Element#insert. Closes #7429, #9060. 2007-07-24 18:52:17 +00:00
Sam Stephenson 7b2ce66e88 prototype: Make Element#setStyle accept a string argument of CSS rules. Deprecate uncamelized style property names when setting styles using an object (for performance reasons). Closes #9059. 2007-07-24 18:14:36 +00:00
Sam Stephenson c6f3daadaa prototype: Add Element#identify, which returns the element's ID if it exists, or sets and returns a unique, auto-generated ID (of the form 'anonymous_element_' + auto-incremented digit) otherwise. Use this when you need to ensure an element has an ID. Closes #9012. 2007-07-24 17:41:27 +00:00
Sam Stephenson 7e6481bcd7 prototype: Make Element#readAttribute work for cloned elements in IE. Closes #8481. 2007-07-24 17:31:23 +00:00
Thomas Fuchs cea24d6cc2 Prototype: Rename Element#getElementsBySelector to Element#select and add alias for Element#getElementsBySelector. Add Element#adjacent as a shortcut to selecting all adjacent nodes (and their children) that match a CSS selector. 2007-07-13 08:36:14 +00:00
Sam Stephenson d6bf5e40ce prototype: Make document.getElementsByClassName match a subset of the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 (http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname). It now supports multiple class names given as a whitespace-separated list in a string. Array argument is not supported. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401. 2007-06-19 20:59:14 +00:00
Thomas Fuchs 03ae9dd3ee * Make document.getElementsByClassName match the WHATWG Web Applications 1.0 specification which was adopted in Firefox 3 (http://www.whatwg.org/specs/web-apps/current-work/#getelementsbyclassname). It now supports multiple class names given as an array or a space-separated list in a string. The method will only return the nodes that match all the class names. In browsers that implement the method natively it will not be overwritten. Closes #8401. [Mislav Marohnic] 2007-06-17 22:26:46 +00:00
Thomas Fuchs afbef44cd6 Prototype: save a few lines in Element.Methods.hasClassName 2007-06-17 22:14:07 +00:00
Thomas Fuchs 1b8ef5af86 Fix a Safari rendering issue when floating elements could temporarily disappear when opacity was set to 1. Closes #7063. References #3044, #3813, #6706. [Thomas Fuchs, davidjrice] 2007-06-17 18:13:37 +00:00
Sam Stephenson ae2ea8a2e9 prototype: Ensure HTMLElement exists before creating Element.extend. 2007-06-09 01:51:26 +00:00
Thomas Fuchs 0c7bac17f0 Prototype: Make Element#absolutize and Element#relativize properly use Element#getStyle. Closes #8580. [Christophe Porteneuve] 2007-06-06 14:30:01 +00:00
Thomas Fuchs 5f4bab4dcb Prototype: Fix Element.insert for null values and numeric values when defaulting to bottom 2007-06-02 16:00:47 +00:00
Thomas Fuchs d4d4fddc7c Prototype: Change Element.insert syntax to allow multiple positions. 2007-06-02 15:08:50 +00:00