Commit Graph

59 Commits

Author SHA1 Message Date
Tobie Langel c01cb850c1 prototype: Remove usage of the statement from unit tests. 2008-03-16 18:53:51 +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 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 ea9d81eea1 prototype: Make Element#absolutize and Element#relativize always return element. Closes #10983. 2008-02-03 19:36:35 +00:00
Andrew Dupont 034d4e1d4a Add tests for Element#descendantOf that deal with dynamically-created elements. [Andrew Dupont] 2008-01-25 22:03:39 +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
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 4753cc82ec Reverted accidental change to dom.html. 2008-01-18 04:33:34 +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 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 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 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 3e82a712d1 Changed some unit tests to filter out false test failures in Opera. 2007-12-04 03:58:44 +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 d6b843c9cb Ensure Element#hasClassName always returns a boolean. Closes #10075. 2007-11-05 17:43:56 +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
Sam Stephenson 18969c5159 prototype: Reset the browser's dimensions to their original settings after running the DOM viewport tests. 2007-10-26 03:10:06 +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 0100aee1a0 prototype: Add more tests to Element.update. 2007-10-22 11:30: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
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 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 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 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 0894f235b8 Begone, test artifacts 2007-06-17 22:29:44 +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 d5665e0d22 Prototype: add failing unit test (IE) for Element.Methods.getStyle on auto-calculated widths. References #8564. 2007-06-10 12:58:32 +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
Thomas Fuchs f099e670f5 Element.setOpacity now calls removeAttribute on the filter style on IE if no more filters remain, which makes Cleartype work properly. Closes #8376. 2007-05-19 00:11:46 +00:00
Thomas Fuchs df33e410b0 testElementMethodInsert: add test for non-lowercase position argument 2007-05-12 19:12:04 +00:00
Sam Stephenson 83b4b337e1 Merge -r6634:HEAD from ../branches/dom.
* Make Element#update and Element#insert work for SELECT tags in IE and Opera. [Tobie Langel]

* Make Element#insert and Element#update better handle TABLE related elements in IE and Opera. Closes #7776, #8040, #7550, #7776, #7938. [Tobie Langel]

* Make Element#readAttribute('title') work in Opera. [Tobie Langel]

* Make Element#replace work with form elements in Firefox and Safari. Closes #8010, #7989. [dsl239, Tobie Langel]

* Add Element#wrap which wraps the element inside a new one. Closes #5732. [P. Vande, Tobie Langel]

* Make Element into a constructor: new Element(tagName, attributes). Add Element#writeAttribute which accepts a hash of attributes or a name/value pair. Closes #7476. [Mislav Marohnić, haraldmartin, Tobie Langel]

* Insertion overhaul: Add Element.insert(content[, position = 'Bottom']). Deprecate Insertion (kept for backwards compatibility). Make Ajax.Updater option.insertion accept both Insertion.Top or the now preferred 'Top'. Closes #7907. [Tobie Langel]
2007-05-12 05:01:56 +00:00
Sam Stephenson 1886b03d60 prototype: Fix Element#readAttribute to work with the 'type' attribute in IE. Closes #8160. 2007-04-28 02:23:26 +00:00
Sam Stephenson 47bfeb5083 prototype: Add Element#childElements as an alias for Element#immediateDescendants. 2007-04-24 06:17:59 +00:00
Sam Stephenson 5784d78f6e prototype: Add Element#firstDescendant to retrieve the first non-text child node of an element. Optimize DOM navigation methods (Element#up, Element#down, Element#previous, Element#next) for no-argument calls. Closes #7848. 2007-04-24 06:06:44 +00:00
Sam Stephenson 63342b9c01 prototype: Element.addMethods should add methods to Element as well as Element.Methods. Closes #7888. 2007-04-24 05:23:41 +00:00
Thomas Fuchs 193104ac33 Trivial dom.html cleanups, dont do the hidden element getDimensions test for now 2007-04-18 16:30:40 +00:00
Thomas Fuchs 4c90be6a30 Prevent a crash on Safari on String.prototype.stripScripts and extractScripts with large <script> tags. 2007-04-03 22:21:58 +00:00
Thomas Fuchs 930c8f2665 Fix an issue with Element.getDimensions with some element types on non IE-browsers. Closes #7683. [Andrew Dupont] 2007-03-27 18:04:59 +00:00
Thomas Fuchs e9501d63e5 Make Element.extend work on IE for Nodes with the same ID that where discarded. 2007-03-11 22:40:24 +00:00