lsd_rails 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Packages/Sheet.js/Demo/index.html +78 -0
- data/Packages/Sheet.js/Demo/pp.css +69 -0
- data/Packages/Sheet.js/Demo/subtlegradient-jslib.js +450 -0
- data/Packages/Sheet.js/LICENSE +21 -0
- data/Packages/Sheet.js/README.md +59 -0
- data/Packages/Sheet.js/Source/Sheet.DOM.js +65 -0
- data/Packages/Sheet.js/Source/Sheet.js +80 -0
- data/Packages/Sheet.js/Source/SheetParser.CSS.js +194 -0
- data/Packages/Sheet.js/Source/SheetParser.Property.js +227 -0
- data/Packages/Sheet.js/Source/SheetParser.Styles.js +115 -0
- data/Packages/Sheet.js/Source/SheetParser.Value.js +114 -0
- data/Packages/Sheet.js/Source/sg-regex-tools.js +42 -0
- data/Packages/Sheet.js/Test/DOM-styleSheet.api.js +404 -0
- data/Packages/Sheet.js/Test/Sheet.test.js +25 -0
- data/Packages/Sheet.js/Test/SheetParser.CSS.RegExp.test.js +108 -0
- data/Packages/Sheet.js/Test/SheetParser.Property.test.js +230 -0
- data/Packages/Sheet.js/Test/SheetParser.Value.test.js +94 -0
- data/Packages/Sheet.js/Test/all-types.mock.css +103 -0
- data/Packages/Sheet.js/Test/document.styleSheets.test.js +7 -0
- data/Packages/Sheet.js/Test/index.html +12 -0
- data/Packages/Sheet.js/Test/lib/qunit/package.json +21 -0
- data/Packages/Sheet.js/Test/lib/qunit/qunit/qunit.css +196 -0
- data/Packages/Sheet.js/Test/lib/qunit/qunit/qunit.js +1303 -0
- data/Packages/Sheet.js/Test/lib/sg-assert-helpers.js +93 -0
- data/Packages/Sheet.js/Test/lib/sg-qunit-testrunner.js +40 -0
- data/Packages/Sheet.js/Test/lib/sg-testrunner.js +49 -0
- data/Packages/Sheet.js/Test/properties.html +39 -0
- data/Packages/Sheet.js/Test/run.html +43 -0
- data/Packages/Sheet.js/Test/run.js +10 -0
- data/Packages/Sheet.js/Test/test-browser.html +47 -0
- data/Packages/Sheet.js/Test/values.html +38 -0
- data/Packages/Sheet.js/package.json +59 -0
- data/Packages/Sheet.js/test-all +13 -0
- data/Packages/art/Docs/ART/ART.Group.md +106 -0
- data/Packages/art/Docs/ART/ART.Path.md +167 -0
- data/Packages/art/Docs/ART/ART.Shape.md +106 -0
- data/Packages/art/Docs/ART/ART.Transform.md +148 -0
- data/Packages/art/Docs/ART/ART.md +113 -0
- data/Packages/art/Docs/Modes/ART.Base.md +10 -0
- data/Packages/art/Docs/Modes/ART.SVG.md +9 -0
- data/Packages/art/Docs/Modes/ART.VML.md +12 -0
- data/Packages/art/Docs/Shapes/ART.Font.md +15 -0
- data/Packages/art/Docs/Shapes/ART.Shapes.md +63 -0
- data/Packages/art/Docs/Shapes/ART.Text.md +14 -0
- data/Packages/art/Fonts/Moderna.Bold.js +31 -0
- data/Packages/art/Fonts/Moderna.js +31 -0
- data/Packages/art/README.md +3 -0
- data/Packages/art/Source/ART.Base.js +33 -0
- data/Packages/art/Source/ART.Font.js +89 -0
- data/Packages/art/Source/ART.Path.js +440 -0
- data/Packages/art/Source/ART.SVG.js +593 -0
- data/Packages/art/Source/ART.Shapes.js +136 -0
- data/Packages/art/Source/ART.VML.js +772 -0
- data/Packages/art/Source/ART.js +202 -0
- data/Packages/art/license.txt +21 -0
- data/Packages/art/package.yml +24 -0
- data/Packages/art-morph/Demos/index.html +18 -0
- data/Packages/art-morph/Demos/morph.js +30 -0
- data/Packages/art-morph/README.md +3 -0
- data/Packages/art-morph/Source/ART.Path.Morph.js +76 -0
- data/Packages/art-morph/license.txt +21 -0
- data/Packages/lsd/CHANGELOG +152 -0
- data/Packages/lsd/README.md +233 -0
- data/Packages/lsd/Source/ART/ART.Element.js +51 -0
- data/Packages/lsd/Source/ART/ART.Glyphs.js +51 -0
- data/Packages/lsd/Source/ART/ART.SVG.js +122 -0
- data/Packages/lsd/Source/ART/ART.Shape.Arrow.js +104 -0
- data/Packages/lsd/Source/ART/ART.Shape.Ellipse.js +42 -0
- data/Packages/lsd/Source/ART/ART.Shape.Flower.js +71 -0
- data/Packages/lsd/Source/ART/ART.Shape.Rectangle.js +67 -0
- data/Packages/lsd/Source/ART/ART.Shape.Star.js +57 -0
- data/Packages/lsd/Source/ART/ART.js +41 -0
- data/Packages/lsd/Source/Action/Clone.js +36 -0
- data/Packages/lsd/Source/Action/Counter.js +98 -0
- data/Packages/lsd/Source/Action/Create.js +26 -0
- data/Packages/lsd/Source/Action/Delete.js +32 -0
- data/Packages/lsd/Source/Action/Display.js +50 -0
- data/Packages/lsd/Source/Action/Edit.js +138 -0
- data/Packages/lsd/Source/Action/Focus.js +29 -0
- data/Packages/lsd/Source/Action/History.js +27 -0
- data/Packages/lsd/Source/Action/Invoke.js +34 -0
- data/Packages/lsd/Source/Action/List.js +40 -0
- data/Packages/lsd/Source/Action/Set.js +36 -0
- data/Packages/lsd/Source/Action/State.js +33 -0
- data/Packages/lsd/Source/Action/Submit.js +60 -0
- data/Packages/lsd/Source/Action/Toggle.js +41 -0
- data/Packages/lsd/Source/Action/Update.js +79 -0
- data/Packages/lsd/Source/Action.js +169 -0
- data/Packages/lsd/Source/Behavior.js +68 -0
- data/Packages/lsd/Source/Command.js +135 -0
- data/Packages/lsd/Source/Document.js +188 -0
- data/Packages/lsd/Source/Interpolation.js +103 -0
- data/Packages/lsd/Source/LSD.js +163 -0
- data/Packages/lsd/Source/Layer/Color.js +43 -0
- data/Packages/lsd/Source/Layer/Offset.js +37 -0
- data/Packages/lsd/Source/Layer/Position.js +35 -0
- data/Packages/lsd/Source/Layer/Radius.js +39 -0
- data/Packages/lsd/Source/Layer/Scale.js +36 -0
- data/Packages/lsd/Source/Layer/Shadow.Blur.js +41 -0
- data/Packages/lsd/Source/Layer/Shadow.Inset.js +99 -0
- data/Packages/lsd/Source/Layer/Shadow.Native.js +35 -0
- data/Packages/lsd/Source/Layer/Shadow.Onion.js +105 -0
- data/Packages/lsd/Source/Layer/Shadow.js +46 -0
- data/Packages/lsd/Source/Layer/Shape.js +56 -0
- data/Packages/lsd/Source/Layer/Size.js +38 -0
- data/Packages/lsd/Source/Layer/Stroke.js +61 -0
- data/Packages/lsd/Source/Layer.js +212 -0
- data/Packages/lsd/Source/Layout.js +445 -0
- data/Packages/lsd/Source/Mixin/Animation.js +77 -0
- data/Packages/lsd/Source/Mixin/Choice.js +62 -0
- data/Packages/lsd/Source/Mixin/Command.js +98 -0
- data/Packages/lsd/Source/Mixin/ContentEditable.js +124 -0
- data/Packages/lsd/Source/Mixin/Draggable.js +113 -0
- data/Packages/lsd/Source/Mixin/Fieldset.js +235 -0
- data/Packages/lsd/Source/Mixin/Focusable.js +122 -0
- data/Packages/lsd/Source/Mixin/Invokable.js +83 -0
- data/Packages/lsd/Source/Mixin/List.js +99 -0
- data/Packages/lsd/Source/Mixin/Placeholder.js +77 -0
- data/Packages/lsd/Source/Mixin/Request.js +120 -0
- data/Packages/lsd/Source/Mixin/Resizable.js +182 -0
- data/Packages/lsd/Source/Mixin/Resource.js +81 -0
- data/Packages/lsd/Source/Mixin/Root.js +41 -0
- data/Packages/lsd/Source/Mixin/Scrollable.js +69 -0
- data/Packages/lsd/Source/Mixin/Sortable.js +134 -0
- data/Packages/lsd/Source/Mixin/Submittable.js +64 -0
- data/Packages/lsd/Source/Mixin/Target.js +102 -0
- data/Packages/lsd/Source/Mixin/Touchable.js +41 -0
- data/Packages/lsd/Source/Mixin/Unselectable.js +35 -0
- data/Packages/lsd/Source/Mixin/Uploader.js +277 -0
- data/Packages/lsd/Source/Mixin/Validity.js +102 -0
- data/Packages/lsd/Source/Mixin/Value.js +160 -0
- data/Packages/lsd/Source/Module/Accessories/Actions.js +79 -0
- data/Packages/lsd/Source/Module/Accessories/Attributes.js +192 -0
- data/Packages/lsd/Source/Module/Accessories/Chain.js +232 -0
- data/Packages/lsd/Source/Module/Accessories/Dimensions.js +114 -0
- data/Packages/lsd/Source/Module/Accessories/Element.js +233 -0
- data/Packages/lsd/Source/Module/Accessories/Events.js +352 -0
- data/Packages/lsd/Source/Module/Accessories/Options.js +112 -0
- data/Packages/lsd/Source/Module/Accessories/Shortcuts.js +46 -0
- data/Packages/lsd/Source/Module/Accessories/States.js +28 -0
- data/Packages/lsd/Source/Module/Accessories/Styles.js +230 -0
- data/Packages/lsd/Source/Module/Accessories/Tag.js +145 -0
- data/Packages/lsd/Source/Module/Accessories.js +47 -0
- data/Packages/lsd/Source/Module/Ambient/Allocations.js +184 -0
- data/Packages/lsd/Source/Module/Ambient/Container.js +56 -0
- data/Packages/lsd/Source/Module/Ambient/DOM.js +355 -0
- data/Packages/lsd/Source/Module/Ambient/Expectations.js +358 -0
- data/Packages/lsd/Source/Module/Ambient/Layout.js +97 -0
- data/Packages/lsd/Source/Module/Ambient/Mutations.js +101 -0
- data/Packages/lsd/Source/Module/Ambient/Proxies.js +84 -0
- data/Packages/lsd/Source/Module/Ambient/Relations.js +99 -0
- data/Packages/lsd/Source/Module/Ambient/Selectors.js +136 -0
- data/Packages/lsd/Source/Module/Ambient.js +39 -0
- data/Packages/lsd/Source/Module/Graphics/Layers.js +177 -0
- data/Packages/lsd/Source/Module/Graphics/Render.js +96 -0
- data/Packages/lsd/Source/Module/Graphics/Shape.js +56 -0
- data/Packages/lsd/Source/Module/Graphics.js +30 -0
- data/Packages/lsd/Source/Relation.js +397 -0
- data/Packages/lsd/Source/Sheet.js +324 -0
- data/Packages/lsd/Source/Trait/Date.js +66 -0
- data/Packages/lsd/Source/Trait/Input.js +65 -0
- data/Packages/lsd/Source/Trait/Menu.js +21 -0
- data/Packages/lsd/Source/Trait/Slider.js +93 -0
- data/Packages/lsd/Source/Type.js +92 -0
- data/Packages/lsd/Source/Widget.js +60 -0
- data/Packages/lsd/UNLICENSE +24 -0
- data/Packages/lsd/package.yml +114 -0
- data/Packages/lsd-mobile/Source/Body/Dialog.js +57 -0
- data/Packages/lsd-mobile/Source/Body/Page.js +50 -0
- data/Packages/lsd-mobile/Source/Body.js +30 -0
- data/Packages/lsd-mobile/Source/Dialog.js +0 -0
- data/Packages/lsd-mobile/Source/Document.js +78 -0
- data/Packages/lsd-mobile/Source/Input/Date.js +119 -0
- data/Packages/lsd-mobile/Source/Input.js +24 -0
- data/Packages/lsd-mobile/Source/Mobile.js +27 -0
- data/Packages/lsd-mobile/package.yml +15 -0
- data/Packages/lsd-native/README.md +0 -0
- data/Packages/lsd-native/Source/Input/Checkbox.js +42 -0
- data/Packages/lsd-native/Source/Input/Date.js +33 -0
- data/Packages/lsd-native/Source/Input/File.js +23 -0
- data/Packages/lsd-native/Source/Input/Hidden.js +23 -0
- data/Packages/lsd-native/Source/Input/Password.js +29 -0
- data/Packages/lsd-native/Source/Input/Radio.js +42 -0
- data/Packages/lsd-native/Source/Input/Search.js +23 -0
- data/Packages/lsd-native/Source/Input.js +48 -0
- data/Packages/lsd-native/Source/Select.js +29 -0
- data/Packages/lsd-native/Source/Textarea.js +27 -0
- data/Packages/lsd-native/package.yml +18 -0
- data/Packages/lsd-specs/Compiled/includes.js +217 -0
- data/Packages/lsd-specs/Configuration.js +124 -0
- data/Packages/lsd-specs/compile.sh +1 -0
- data/Packages/lsd-specs/index.html +26 -0
- data/Packages/lsd-specs/lsd/Action/Counter.js +35 -0
- data/Packages/lsd-specs/lsd/Layout.js +146 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Attributes.js +68 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Chain.js +385 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Dimensions.js +53 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Element.js +112 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Events.js +151 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Options.js +36 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Shortcuts.js +0 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/States.js +0 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Styles.js +14 -0
- data/Packages/lsd-specs/lsd/Module/Accessories/Tag.js +84 -0
- data/Packages/lsd-specs/lsd/Module/Ambient/DOM.js +394 -0
- data/Packages/lsd-specs/lsd/Module/Ambient/Expectations.js +199 -0
- data/Packages/lsd-specs/lsd/Module/Ambient/Layout.js +0 -0
- data/Packages/lsd-specs/lsd/Module/Ambient/Relations.js +7 -0
- data/Packages/lsd-specs/lsd/Module/Behavior/Target.Parser.js +123 -0
- data/Packages/lsd-specs/lsd/Module/Behavior/Target.js +0 -0
- data/Packages/lsd-specs/lsd/Relation.js +428 -0
- data/Packages/lsd-specs/lsd/Trait/Dimensions.js +216 -0
- data/Packages/lsd-specs/lsd/Trait/Layers.js +66 -0
- data/Packages/lsd-specs/lsd/Type.js +27 -0
- data/Packages/lsd-specs/outdated/Focus.js +137 -0
- data/Packages/lsd-widgets/Source/Body/Dialog.js +68 -0
- data/Packages/lsd-widgets/Source/Body/Page.js +38 -0
- data/Packages/lsd-widgets/Source/Body.js +27 -0
- data/Packages/lsd-widgets/Source/Button.js +34 -0
- data/Packages/lsd-widgets/Source/Form.js +43 -0
- data/Packages/lsd-widgets/Source/Input/Checkbox.js +31 -0
- data/Packages/lsd-widgets/Source/Input/Date.js +43 -0
- data/Packages/lsd-widgets/Source/Input/File.js +63 -0
- data/Packages/lsd-widgets/Source/Input/HTML.js +54 -0
- data/Packages/lsd-widgets/Source/Input/Radio.js +31 -0
- data/Packages/lsd-widgets/Source/Input/Range.js +61 -0
- data/Packages/lsd-widgets/Source/Input/Submit.js +55 -0
- data/Packages/lsd-widgets/Source/Input.js +62 -0
- data/Packages/lsd-widgets/Source/Label.js +66 -0
- data/Packages/lsd-widgets/Source/Menu/Context.js +39 -0
- data/Packages/lsd-widgets/Source/Menu/List.js +49 -0
- data/Packages/lsd-widgets/Source/Menu/Toolbar.Menu.js +65 -0
- data/Packages/lsd-widgets/Source/Menu/Toolbar.js +30 -0
- data/Packages/lsd-widgets/Source/Menu.js +38 -0
- data/Packages/lsd-widgets/Source/Progress.js +45 -0
- data/Packages/lsd-widgets/Source/Scrollbar.js +131 -0
- data/Packages/lsd-widgets/Source/Select.js +81 -0
- data/Packages/lsd-widgets/Source/Table/Calendar.js +127 -0
- data/Packages/lsd-widgets/Source/Table.js +100 -0
- data/Packages/lsd-widgets/Source/Textarea.js +32 -0
- data/Packages/lsd-widgets/package.yml +32 -0
- data/Packages/mootools-color/README.md +4 -0
- data/Packages/mootools-color/Source/Color.js +167 -0
- data/Packages/mootools-color/license.txt +21 -0
- data/Packages/mootools-color/package.yml +20 -0
- data/Packages/mootools-core/Docs/Browser/Browser.md +102 -0
- data/Packages/mootools-core/Docs/Class/Class.Extras.md +453 -0
- data/Packages/mootools-core/Docs/Class/Class.md +133 -0
- data/Packages/mootools-core/Docs/Core/Core.md +385 -0
- data/Packages/mootools-core/Docs/Element/Element.Dimensions.md +235 -0
- data/Packages/mootools-core/Docs/Element/Element.Event.md +330 -0
- data/Packages/mootools-core/Docs/Element/Element.Style.md +121 -0
- data/Packages/mootools-core/Docs/Element/Element.md +1924 -0
- data/Packages/mootools-core/Docs/Fx/Fx.CSS.md +12 -0
- data/Packages/mootools-core/Docs/Fx/Fx.Morph.md +225 -0
- data/Packages/mootools-core/Docs/Fx/Fx.Transitions.md +157 -0
- data/Packages/mootools-core/Docs/Fx/Fx.Tween.md +303 -0
- data/Packages/mootools-core/Docs/Fx/Fx.md +172 -0
- data/Packages/mootools-core/Docs/Intro.md +37 -0
- data/Packages/mootools-core/Docs/Request/Request.HTML.md +179 -0
- data/Packages/mootools-core/Docs/Request/Request.JSON.md +61 -0
- data/Packages/mootools-core/Docs/Request/Request.md +461 -0
- data/Packages/mootools-core/Docs/Types/Array.md +797 -0
- data/Packages/mootools-core/Docs/Types/Event.md +204 -0
- data/Packages/mootools-core/Docs/Types/Function.md +409 -0
- data/Packages/mootools-core/Docs/Types/Number.md +212 -0
- data/Packages/mootools-core/Docs/Types/Object.md +599 -0
- data/Packages/mootools-core/Docs/Types/String.md +400 -0
- data/Packages/mootools-core/Docs/Utilities/Cookie.md +95 -0
- data/Packages/mootools-core/Docs/Utilities/DOMReady.md +21 -0
- data/Packages/mootools-core/Docs/Utilities/JSON.md +56 -0
- data/Packages/mootools-core/Docs/Utilities/Swiff.md +90 -0
- data/Packages/mootools-core/Docs/license.md +8 -0
- data/Packages/mootools-core/README.md +6 -0
- data/Packages/mootools-core/Source/Browser/Browser.js +264 -0
- data/Packages/mootools-core/Source/Class/Class.Extras.js +121 -0
- data/Packages/mootools-core/Source/Class/Class.js +115 -0
- data/Packages/mootools-core/Source/Core/Core.js +511 -0
- data/Packages/mootools-core/Source/Element/Element.Dimensions.js +283 -0
- data/Packages/mootools-core/Source/Element/Element.Event.js +175 -0
- data/Packages/mootools-core/Source/Element/Element.Style.js +184 -0
- data/Packages/mootools-core/Source/Element/Element.js +862 -0
- data/Packages/mootools-core/Source/Fx/Fx.CSS.js +149 -0
- data/Packages/mootools-core/Source/Fx/Fx.Morph.js +77 -0
- data/Packages/mootools-core/Source/Fx/Fx.Transitions.js +113 -0
- data/Packages/mootools-core/Source/Fx/Fx.Tween.js +103 -0
- data/Packages/mootools-core/Source/Fx/Fx.js +179 -0
- data/Packages/mootools-core/Source/Request/Request.HTML.js +88 -0
- data/Packages/mootools-core/Source/Request/Request.JSON.js +46 -0
- data/Packages/mootools-core/Source/Request/Request.js +278 -0
- data/Packages/mootools-core/Source/Slick/Slick.Finder.js +970 -0
- data/Packages/mootools-core/Source/Slick/Slick.Parser.js +230 -0
- data/Packages/mootools-core/Source/Types/Array.js +178 -0
- data/Packages/mootools-core/Source/Types/Event.js +135 -0
- data/Packages/mootools-core/Source/Types/Function.js +118 -0
- data/Packages/mootools-core/Source/Types/Number.js +52 -0
- data/Packages/mootools-core/Source/Types/Object.js +209 -0
- data/Packages/mootools-core/Source/Types/String.js +82 -0
- data/Packages/mootools-core/Source/Utilities/Cookie.js +74 -0
- data/Packages/mootools-core/Source/Utilities/DOMReady.js +105 -0
- data/Packages/mootools-core/Source/Utilities/JSON.js +81 -0
- data/Packages/mootools-core/Source/Utilities/Swiff.js +113 -0
- data/Packages/mootools-core/Source/license.txt +21 -0
- data/Packages/mootools-core/build +40 -0
- data/Packages/mootools-core/package.yml +43 -0
- data/Packages/mootools-custom-event/Demos/index.html +147 -0
- data/Packages/mootools-custom-event/Demos/mootools-core.js +3183 -0
- data/Packages/mootools-custom-event/Demos/style.css +44 -0
- data/Packages/mootools-custom-event/LICENSE +24 -0
- data/Packages/mootools-custom-event/README.md +128 -0
- data/Packages/mootools-custom-event/Source/Element.defineCustomEvent.js +90 -0
- data/Packages/mootools-custom-event/package.yml +20 -0
- data/Packages/mootools-ext/Examples/Class.Includes.js +47 -0
- data/Packages/mootools-ext/Examples/Class.Macros.js +69 -0
- data/Packages/mootools-ext/Examples/Class.States.js +20 -0
- data/Packages/mootools-ext/Examples/_includes.haml +17 -0
- data/Packages/mootools-ext/Examples/examples.js +8 -0
- data/Packages/mootools-ext/Examples/index.haml +22 -0
- data/Packages/mootools-ext/README.md +8 -0
- data/Packages/mootools-ext/Rakefile +5 -0
- data/Packages/mootools-ext/Source/Core/Class.Binds.Remover.js +21 -0
- data/Packages/mootools-ext/Source/Core/Class.Includes.js +68 -0
- data/Packages/mootools-ext/Source/Core/Class.Macros.js +90 -0
- data/Packages/mootools-ext/Source/Core/Class.Mixin.js +89 -0
- data/Packages/mootools-ext/Source/Core/Class.Shortcuts.js +124 -0
- data/Packages/mootools-ext/Source/Core/Class.States.js +95 -0
- data/Packages/mootools-ext/Source/Drag/Drag.Limits.js +42 -0
- data/Packages/mootools-ext/Source/Drag/Slider.js +33 -0
- data/Packages/mootools-ext/Source/Drag/Sortables.Delegation.js +64 -0
- data/Packages/mootools-ext/Source/Element/Element.Selection.js +45 -0
- data/Packages/mootools-ext/Source/Element/Element.from.js +50 -0
- data/Packages/mootools-ext/Source/Element/Element.js +47 -0
- data/Packages/mootools-ext/Source/Element/Element.onDispose.js +36 -0
- data/Packages/mootools-ext/Source/Element/Events/Input.js +23 -0
- data/Packages/mootools-ext/Source/Element/Events/Keypress.js +65 -0
- data/Packages/mootools-ext/Source/Element/Properties/BorderRadius.js +41 -0
- data/Packages/mootools-ext/Source/Element/Properties/BoxShadow.js +61 -0
- data/Packages/mootools-ext/Source/Element/Properties/Data.js +32 -0
- data/Packages/mootools-ext/Source/Element/Properties/Item.js +210 -0
- data/Packages/mootools-ext/Source/Element/Properties/UserSelect.js +32 -0
- data/Packages/mootools-ext/Source/Element/Properties/Widget.js +32 -0
- data/Packages/mootools-ext/Source/Request/Request.Auto.js +38 -0
- data/Packages/mootools-ext/Source/Request/Request.Form.js +108 -0
- data/Packages/mootools-ext/Source/Request/Request.Headers.js +41 -0
- data/Packages/mootools-ext/Source/Request/Request.Statuses.js +95 -0
- data/Packages/mootools-ext/Source/Types/Event.js +336 -0
- data/Packages/mootools-ext/Source/Types/FastArray.js +74 -0
- data/Packages/mootools-ext/Source/Types/Object.js +34 -0
- data/Packages/mootools-ext/Source/Types/String.js +33 -0
- data/Packages/mootools-ext/package.yml +45 -0
- data/Packages/mootools-history/Demos/demo.css +14 -0
- data/Packages/mootools-history/Demos/demo.js +66 -0
- data/Packages/mootools-history/Demos/index.html +32 -0
- data/Packages/mootools-history/Demos/mootools-class-extras.js +27 -0
- data/Packages/mootools-history/Demos/mootools-core.js +4422 -0
- data/Packages/mootools-history/Demos/mootools.html +27 -0
- data/Packages/mootools-history/Demos/other.html +27 -0
- data/Packages/mootools-history/Demos/style.css +96 -0
- data/Packages/mootools-history/LICENSE +24 -0
- data/Packages/mootools-history/README.md +97 -0
- data/Packages/mootools-history/Source/History.handleInitialState.js +42 -0
- data/Packages/mootools-history/Source/History.js +102 -0
- data/Packages/mootools-history/package.yml +21 -0
- data/Packages/mootools-mobile/Demos/custom-event.js +91 -0
- data/Packages/mootools-mobile/Demos/demo.css +13 -0
- data/Packages/mootools-mobile/Demos/index.html +99 -0
- data/Packages/mootools-mobile/Demos/mootools-core.js +3831 -0
- data/Packages/mootools-mobile/Demos/pinch.html +60 -0
- data/Packages/mootools-mobile/Demos/style.css +121 -0
- data/Packages/mootools-mobile/Demos/swipe.html +45 -0
- data/Packages/mootools-mobile/Demos/touchhold.html +50 -0
- data/Packages/mootools-mobile/LICENSE +24 -0
- data/Packages/mootools-mobile/README.md +173 -0
- data/Packages/mootools-mobile/Source/Browser/Features.Touch.js +52 -0
- data/Packages/mootools-mobile/Source/Browser/Mobile.js +37 -0
- data/Packages/mootools-mobile/Source/Desktop/Mouse.js +60 -0
- data/Packages/mootools-mobile/Source/Touch/Click.js +30 -0
- data/Packages/mootools-mobile/Source/Touch/Pinch.js +66 -0
- data/Packages/mootools-mobile/Source/Touch/Swipe.js +95 -0
- data/Packages/mootools-mobile/Source/Touch/Touch.js +62 -0
- data/Packages/mootools-mobile/Source/Touch/Touchhold.js +69 -0
- data/Packages/mootools-mobile/package.yml +24 -0
- data/Packages/mootools-more/Docs/Class/Chain.Wait.md +69 -0
- data/Packages/mootools-more/Docs/Class/Class.Binds.md +84 -0
- data/Packages/mootools-more/Docs/Class/Class.Occlude.md +61 -0
- data/Packages/mootools-more/Docs/Class/Class.Refactor.md +65 -0
- data/Packages/mootools-more/Docs/Class/Events.Pseudos.md +125 -0
- data/Packages/mootools-more/Docs/Drag/Drag.Move.md +147 -0
- data/Packages/mootools-more/Docs/Drag/Drag.md +206 -0
- data/Packages/mootools-more/Docs/Drag/Slider.md +249 -0
- data/Packages/mootools-more/Docs/Drag/Sortables.md +287 -0
- data/Packages/mootools-more/Docs/Element/Element.Delegation.md +120 -0
- data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.Keys.md +67 -0
- data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.md +124 -0
- data/Packages/mootools-more/Docs/Element/Element.Forms.md +231 -0
- data/Packages/mootools-more/Docs/Element/Element.Measure.md +130 -0
- data/Packages/mootools-more/Docs/Element/Element.Pin.md +56 -0
- data/Packages/mootools-more/Docs/Element/Element.Position.md +77 -0
- data/Packages/mootools-more/Docs/Element/Element.Shortcuts.md +121 -0
- data/Packages/mootools-more/Docs/Element/Elements.From.md +32 -0
- data/Packages/mootools-more/Docs/Forms/Form.Request.Append.md +36 -0
- data/Packages/mootools-more/Docs/Forms/Form.Request.md +141 -0
- data/Packages/mootools-more/Docs/Forms/Form.Validator.Extras.md +157 -0
- data/Packages/mootools-more/Docs/Forms/Form.Validator.Inline.md +100 -0
- data/Packages/mootools-more/Docs/Forms/Form.Validator.md +666 -0
- data/Packages/mootools-more/Docs/Forms/OverText.md +237 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Accordion.md +178 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Elements.md +114 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Move.md +160 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Reveal.md +235 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Scroll.md +291 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Slide.md +272 -0
- data/Packages/mootools-more/Docs/Fx/Fx.SmoothScroll.md +50 -0
- data/Packages/mootools-more/Docs/Fx/Fx.Sort.md +201 -0
- data/Packages/mootools-more/Docs/Interface/HtmlTable.Select.md +246 -0
- data/Packages/mootools-more/Docs/Interface/HtmlTable.Sort.md +193 -0
- data/Packages/mootools-more/Docs/Interface/HtmlTable.Zebra.md +94 -0
- data/Packages/mootools-more/Docs/Interface/HtmlTable.md +250 -0
- data/Packages/mootools-more/Docs/Interface/Keyboard.Extras.md +163 -0
- data/Packages/mootools-more/Docs/Interface/Keyboard.md +226 -0
- data/Packages/mootools-more/Docs/Interface/Mask.md +232 -0
- data/Packages/mootools-more/Docs/Interface/Scroller.md +97 -0
- data/Packages/mootools-more/Docs/Interface/Spinner.md +284 -0
- data/Packages/mootools-more/Docs/Interface/Tips.md +267 -0
- data/Packages/mootools-more/Docs/Locale/Date.md +222 -0
- data/Packages/mootools-more/Docs/Locale/Form.Validator.md +197 -0
- data/Packages/mootools-more/Docs/Locale/Locale.Set.From.md +29 -0
- data/Packages/mootools-more/Docs/Locale/Locale.md +208 -0
- data/Packages/mootools-more/Docs/Locale/Number.md +97 -0
- data/Packages/mootools-more/Docs/More/More.md +20 -0
- data/Packages/mootools-more/Docs/Request/Request.JSONP.md +126 -0
- data/Packages/mootools-more/Docs/Request/Request.Periodical.md +82 -0
- data/Packages/mootools-more/Docs/Request/Request.Queue.md +337 -0
- data/Packages/mootools-more/Docs/Types/Array.Extras.md +193 -0
- data/Packages/mootools-more/Docs/Types/Date.Extras.md +97 -0
- data/Packages/mootools-more/Docs/Types/Date.md +564 -0
- data/Packages/mootools-more/Docs/Types/Hash.Extras.md +111 -0
- data/Packages/mootools-more/Docs/Types/Hash.md +633 -0
- data/Packages/mootools-more/Docs/Types/Number.Format.md +91 -0
- data/Packages/mootools-more/Docs/Types/Object.Extras.md +134 -0
- data/Packages/mootools-more/Docs/Types/String.Extras.md +188 -0
- data/Packages/mootools-more/Docs/Types/String.QueryString.md +56 -0
- data/Packages/mootools-more/Docs/Types/URI.Relative.md +46 -0
- data/Packages/mootools-more/Docs/Types/URI.md +213 -0
- data/Packages/mootools-more/Docs/Utilities/Assets.md +175 -0
- data/Packages/mootools-more/Docs/Utilities/Color.md +276 -0
- data/Packages/mootools-more/Docs/Utilities/Group.md +75 -0
- data/Packages/mootools-more/Docs/Utilities/Hash.Cookie.md +117 -0
- data/Packages/mootools-more/Docs/Utilities/IframeShim.md +136 -0
- data/Packages/mootools-more/Docs/Utilities/Table.md +114 -0
- data/Packages/mootools-more/Docs/license.md +8 -0
- data/Packages/mootools-more/README.md +244 -0
- data/Packages/mootools-more/Source/Class/Chain.Wait.js +63 -0
- data/Packages/mootools-more/Source/Class/Class.Binds.js +37 -0
- data/Packages/mootools-more/Source/Class/Class.Occlude.js +38 -0
- data/Packages/mootools-more/Source/Class/Class.Refactor.js +41 -0
- data/Packages/mootools-more/Source/Class/Events.Pseudos.js +180 -0
- data/Packages/mootools-more/Source/Drag/Drag.Move.js +197 -0
- data/Packages/mootools-more/Source/Drag/Drag.js +234 -0
- data/Packages/mootools-more/Source/Drag/Slider.js +225 -0
- data/Packages/mootools-more/Source/Drag/Sortables.js +233 -0
- data/Packages/mootools-more/Source/Element/Element.Delegation.js +140 -0
- data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.Keys.js +82 -0
- data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.js +36 -0
- data/Packages/mootools-more/Source/Element/Element.Forms.js +140 -0
- data/Packages/mootools-more/Source/Element/Element.Measure.js +170 -0
- data/Packages/mootools-more/Source/Element/Element.Pin.js +130 -0
- data/Packages/mootools-more/Source/Element/Element.Position.js +235 -0
- data/Packages/mootools-more/Source/Element/Element.Shortcuts.js +76 -0
- data/Packages/mootools-more/Source/Element/Elements.From.js +40 -0
- data/Packages/mootools-more/Source/Forms/Form.Request.Append.js +77 -0
- data/Packages/mootools-more/Source/Forms/Form.Request.js +203 -0
- data/Packages/mootools-more/Source/Forms/Form.Validator.Extras.js +231 -0
- data/Packages/mootools-more/Source/Forms/Form.Validator.Inline.js +190 -0
- data/Packages/mootools-more/Source/Forms/Form.Validator.js +523 -0
- data/Packages/mootools-more/Source/Forms/OverText.js +258 -0
- data/Packages/mootools-more/Source/Fx/Fx.Accordion.js +240 -0
- data/Packages/mootools-more/Source/Fx/Fx.Elements.js +74 -0
- data/Packages/mootools-more/Source/Fx/Fx.Move.js +71 -0
- data/Packages/mootools-more/Source/Fx/Fx.Reveal.js +246 -0
- data/Packages/mootools-more/Source/Fx/Fx.Scroll.js +180 -0
- data/Packages/mootools-more/Source/Fx/Fx.Slide.js +170 -0
- data/Packages/mootools-more/Source/Fx/Fx.SmoothScroll.js +70 -0
- data/Packages/mootools-more/Source/Fx/Fx.Sort.js +172 -0
- data/Packages/mootools-more/Source/Interface/HtmlTable.Select.js +352 -0
- data/Packages/mootools-more/Source/Interface/HtmlTable.Sort.js +349 -0
- data/Packages/mootools-more/Source/Interface/HtmlTable.Zebra.js +64 -0
- data/Packages/mootools-more/Source/Interface/HtmlTable.js +150 -0
- data/Packages/mootools-more/Source/Interface/Keyboard.Extras.js +109 -0
- data/Packages/mootools-more/Source/Interface/Keyboard.js +242 -0
- data/Packages/mootools-more/Source/Interface/Mask.js +211 -0
- data/Packages/mootools-more/Source/Interface/Scroller.js +104 -0
- data/Packages/mootools-more/Source/Interface/Spinner.js +216 -0
- data/Packages/mootools-more/Source/Interface/Tips.js +259 -0
- data/Packages/mootools-more/Source/Locale/Locale.EU.Number.js +30 -0
- data/Packages/mootools-more/Source/Locale/Locale.Set.From.js +52 -0
- data/Packages/mootools-more/Source/Locale/Locale.ar.Date.js +28 -0
- data/Packages/mootools-more/Source/Locale/Locale.ar.Form.Validator.js +40 -0
- data/Packages/mootools-more/Source/Locale/Locale.ca-CA.Date.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.ca-CA.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.cs-CZ.Date.js +80 -0
- data/Packages/mootools-more/Source/Locale/Locale.cs-CZ.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.da-DK.Date.js +68 -0
- data/Packages/mootools-more/Source/Locale/Locale.da-DK.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.de-CH.Date.js +22 -0
- data/Packages/mootools-more/Source/Locale/Locale.de-CH.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.de-DE.Date.js +70 -0
- data/Packages/mootools-more/Source/Locale/Locale.de-DE.Form.Validator.js +57 -0
- data/Packages/mootools-more/Source/Locale/Locale.de-DE.Number.js +22 -0
- data/Packages/mootools-more/Source/Locale/Locale.en-GB.Date.js +29 -0
- data/Packages/mootools-more/Source/Locale/Locale.en-US.Date.js +70 -0
- data/Packages/mootools-more/Source/Locale/Locale.en-US.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.en-US.Number.js +51 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-AR.Date.js +23 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-AR.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-ES.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-ES.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-VE.Date.js +22 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-VE.Form.Validator.js +34 -0
- data/Packages/mootools-more/Source/Locale/Locale.es-VE.Number.js +44 -0
- data/Packages/mootools-more/Source/Locale/Locale.et-EE.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.et-EE.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.fa.Date.js +66 -0
- data/Packages/mootools-more/Source/Locale/Locale.fa.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Date.js +72 -0
- data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Number.js +26 -0
- data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Date.js +70 -0
- data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Form.Validator.js +56 -0
- data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Number.js +27 -0
- data/Packages/mootools-more/Source/Locale/Locale.he-IL.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.he-IL.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.he-IL.Number.js +30 -0
- data/Packages/mootools-more/Source/Locale/Locale.hu-HU.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.hu-HU.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.it-IT.Date.js +68 -0
- data/Packages/mootools-more/Source/Locale/Locale.it-IT.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Number.js +31 -0
- data/Packages/mootools-more/Source/Locale/Locale.js +188 -0
- data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Date.js +68 -0
- data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Form.Validator.js +57 -0
- data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Number.js +25 -0
- data/Packages/mootools-more/Source/Locale/Locale.no-NO.Date.js +39 -0
- data/Packages/mootools-more/Source/Locale/Locale.no-NO.Form.Validator.js +40 -0
- data/Packages/mootools-more/Source/Locale/Locale.pl-PL.Date.js +57 -0
- data/Packages/mootools-more/Source/Locale/Locale.pl-PL.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Date.js +27 -0
- data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Number.js +33 -0
- data/Packages/mootools-more/Source/Locale/Locale.pt-PT.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.pt-PT.Form.Validator.js +40 -0
- data/Packages/mootools-more/Source/Locale/Locale.ru-RU.Date.js +98 -0
- data/Packages/mootools-more/Source/Locale/Locale.ru-RU.Form.Validator.js +46 -0
- data/Packages/mootools-more/Source/Locale/Locale.si-SI.Date.js +75 -0
- data/Packages/mootools-more/Source/Locale/Locale.si-SI.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Date.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Number.js +29 -0
- data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Date.js +67 -0
- data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Form.Validator.js +55 -0
- data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Number.js +29 -0
- data/Packages/mootools-more/Source/Locale/Locale.uk-UA.Date.js +82 -0
- data/Packages/mootools-more/Source/Locale/Locale.uk-UA.Form.Validator.js +54 -0
- data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Date.js +117 -0
- data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Form.Validator.js +110 -0
- data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Number.js +32 -0
- data/Packages/mootools-more/Source/More/More.js +33 -0
- data/Packages/mootools-more/Source/Request/Request.JSONP.js +142 -0
- data/Packages/mootools-more/Source/Request/Request.Periodical.js +51 -0
- data/Packages/mootools-more/Source/Request/Request.Queue.js +212 -0
- data/Packages/mootools-more/Source/Types/Array.Extras.js +79 -0
- data/Packages/mootools-more/Source/Types/Date.Extras.js +117 -0
- data/Packages/mootools-more/Source/Types/Date.js +559 -0
- data/Packages/mootools-more/Source/Types/Hash.Extras.js +38 -0
- data/Packages/mootools-more/Source/Types/Hash.js +145 -0
- data/Packages/mootools-more/Source/Types/Number.Format.js +105 -0
- data/Packages/mootools-more/Source/Types/Object.Extras.js +66 -0
- data/Packages/mootools-more/Source/Types/String.Extras.js +148 -0
- data/Packages/mootools-more/Source/Types/String.QueryString.js +68 -0
- data/Packages/mootools-more/Source/Types/URI.Relative.js +57 -0
- data/Packages/mootools-more/Source/Types/URI.js +169 -0
- data/Packages/mootools-more/Source/Utilities/Assets.js +131 -0
- data/Packages/mootools-more/Source/Utilities/Color.js +162 -0
- data/Packages/mootools-more/Source/Utilities/Group.js +60 -0
- data/Packages/mootools-more/Source/Utilities/Hash.Cookie.js +61 -0
- data/Packages/mootools-more/Source/Utilities/IframeShim.js +130 -0
- data/Packages/mootools-more/Source/Utilities/Table.js +57 -0
- data/Packages/mootools-more/Source/license.txt +21 -0
- data/Packages/mootools-more/Styles/Interface/Mask/mask.css +8 -0
- data/Packages/mootools-more/Styles/Interface/Spinner/spinner.css +19 -0
- data/Packages/mootools-more/Styles/Interface/Spinner/spinner.gif +0 -0
- data/Packages/mootools-more/Tests/Interactive/Class/Chain.Wait_(tween).html +14 -0
- data/Packages/mootools-more/Tests/Interactive/Class/Chain.Wait_(tween).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(basic).html +39 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(basic).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).html +130 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag).html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag_border).html +48 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag_border).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(droppables).html +88 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(droppables).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(no_offsetParent).html +42 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(no_offsetParent).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(position_right_bottom).html +41 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(style_false).html +23 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(style_false).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag_(resize).html +48 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag_(resize).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Slider.html +169 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Slider.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(images).html +19 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(images).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(multi).html +44 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(multi).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(revert).html +51 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(single).html +67 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(single).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(table).html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(table).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation.html +89 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation_(focus_blur).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation_(non_bubbling).html +126 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.Keys.html +39 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.Keys.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.html +56 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Forms.html +125 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Forms.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Pin.html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Pin.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(basic).html +118 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(basic).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolled).html +47 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolled).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolling).html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolling).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Shortcuts.html +171 -0
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Shortcuts.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.Append.html +29 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.Append.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.html +49 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras.html +88 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras_(data-).html +87 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras_(data-).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline.html +54 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-).html +54 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-warnings).html +42 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-warnings).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onBlur).html +60 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onBlur).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onChange).html +68 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onChange).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(single_input).html +33 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(single_input).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(warnings).html +42 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(warnings).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/OverText.html +116 -0
- data/Packages/mootools-more/Tests/Interactive/Forms/OverText.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Accordion.html +152 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Accordion.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Elements.html +34 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Elements.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Move.html +91 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Move.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Reveal.html +42 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Reveal.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(element).html +107 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(element).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(window).html +88 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(window).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Slide.html +63 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Slide.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.SmoothScroll.html +77 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.SmoothScroll.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Sort.html +100 -0
- data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Sort.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.Select.html +109 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.Select.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(empty_and_refill).html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(empty_and_refill).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).html +43 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(sortable).html +256 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(sortable).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).html +93 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).html +129 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).html +93 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Mask.html +63 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Mask.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Scroller.html +40 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Scroller.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Scroller_(With_Drag).html +45 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Scroller_(With_Drag).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Spinner.html +125 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Spinner.yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Tips.html +156 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Tips.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Tips_(offset).html +64 -0
- data/Packages/mootools-more/Tests/Interactive/Interface/Tips_(offset).yml +3 -0
- data/Packages/mootools-more/Tests/Interactive/README.md +3 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP.html +22 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(async).html +33 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(async).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(timeout).html +46 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(timeout).yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.Periodical.html +38 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.Periodical.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.Queue.html +42 -0
- data/Packages/mootools-more/Tests/Interactive/Request/Request.Queue.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Utilities/Assets.html +78 -0
- data/Packages/mootools-more/Tests/Interactive/Utilities/Assets.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/Utilities/IframeShim.html +36 -0
- data/Packages/mootools-more/Tests/Interactive/Utilities/IframeShim.yml +2 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/Assets.css.test.css +24 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/Assets.js.test.js +3 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/bullet_arrow_down.png +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/bullet_arrow_up.png +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/cow.png +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/mask.css +8 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/mediaplayer.swf +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/mootools.png +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/spinner.css +19 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/spinner.gif +0 -0
- data/Packages/mootools-more/Tests/Interactive/_assets/video.flv +0 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Chain.Wait.js +74 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Binds.js +91 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Occlude.js +49 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Refactor.js +103 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Events.Pseudos.js +367 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Delegation.js +32 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.Keys.js +33 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.js +69 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Forms.js +155 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Measure.js +92 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Pin.js +131 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Position.js +181 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Shortcuts.js +93 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Elements.From.js +22 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Forms/Form.Validator.js +384 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Fx/Fx.Reveal.js +24 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Fx/Fx.Slide.js +21 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Select.js +153 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Sort.js +181 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Zebra.js +39 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.js +153 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/Keyboard.js +130 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Locale/Locale.js +104 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Request/Request.JSONP.js +55 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Array.Extras.js +119 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.Extras.js +80 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.js +709 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Hash.Extras.js +21 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Hash.js +202 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Number.Format.js +90 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Object.Extras.js +105 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Object.Extras_client.js +17 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/String.Extras.js +72 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/String.QueryString.js +63 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/URI.Relative.js +114 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/URI.js +123 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Assets.js +211 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Color.js +78 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Group.js +25 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Hash.Cookie.js +50 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Table.js +56 -0
- data/Packages/mootools-more/Tests/Specs/Configuration.js +245 -0
- data/Packages/mootools-more/Tests/Specs/assets/Assets.css.test.css +24 -0
- data/Packages/mootools-more/Tests/Specs/assets/Assets.js.test.js +3 -0
- data/Packages/mootools-more/Tests/Specs/assets/cow.png +0 -0
- data/Packages/mootools-more/Tests/Specs/assets/jsonp.js +8 -0
- data/Packages/mootools-more/Tests/Specs/assets/mootools.png +0 -0
- data/Packages/mootools-more/Tests/Specs/index.html +26 -0
- data/Packages/mootools-more/Tests/Specs/package.yml +47 -0
- data/Packages/mootools-more/build +40 -0
- data/Packages/mootools-more/package.yml +145 -0
- data/Packages/mootools-resource/README.md +60 -0
- data/Packages/mootools-resource/Source/Resource.Collection.js +40 -0
- data/Packages/mootools-resource/Source/Resource.Model.Actions.js +98 -0
- data/Packages/mootools-resource/Source/Resource.Model.js +175 -0
- data/Packages/mootools-resource/Source/Resource.Parser.HTML.js +28 -0
- data/Packages/mootools-resource/Source/Resource.Parser.JSON.js +35 -0
- data/Packages/mootools-resource/Source/Resource.Parser.XML.js +31 -0
- data/Packages/mootools-resource/Source/Resource.Parser.js +50 -0
- data/Packages/mootools-resource/Source/Resource.js +282 -0
- data/Packages/mootools-resource/package.yml +18 -0
- data/Packages/mootools-speedups/README.md +10 -0
- data/Packages/mootools-speedups/Source/Core/Class.Extras.Speedups.js +14 -0
- data/Packages/mootools-speedups/Source/Core/Class.Speedups.js +129 -0
- data/Packages/mootools-speedups/Source/Core/Core.Speedups.js +89 -0
- data/Packages/mootools-speedups/Source/Types/Object.js +36 -0
- data/Packages/mootools-speedups/package.yml +19 -0
- data/Packages/mootools-string-inflections/README.md +292 -0
- data/Packages/mootools-string-inflections/Source/String.Inflections.js +230 -0
- data/Packages/mootools-string-inflections/TODO.md +2 -0
- data/Packages/mootools-string-inflections/Tests/index.html +12 -0
- data/Packages/mootools-string-inflections/Tests/test.js +95 -0
- data/Packages/mootools-string-inflections/package.yml +7 -0
- data/Packages/qfocuser/README +63 -0
- data/Packages/qfocuser/Source/QFocuser.js +278 -0
- data/Packages/qfocuser/package.yml +8 -0
- data/Packages/slick/Makefile +19 -0
- data/Packages/slick/README.md +127 -0
- data/Packages/slick/SlickSpec/Configuration.js +56 -0
- data/Packages/slick/SlickSpec/assets/JSSpecHelpers.js +187 -0
- data/Packages/slick/SlickSpec/assets/getgetter.js +65 -0
- data/Packages/slick/SlickSpec/assets/ie.css +37 -0
- data/Packages/slick/SlickSpec/assets/moobugger/bookmarklet.html +46 -0
- data/Packages/slick/SlickSpec/assets/moobugger/debugger-iframe.js +386 -0
- data/Packages/slick/SlickSpec/assets/moobugger/debugger.css +190 -0
- data/Packages/slick/SlickSpec/assets/moobugger/debugger.html +25 -0
- data/Packages/slick/SlickSpec/assets/moobugger/debugger.js +284 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/close.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/error.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/group-close.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/group-open.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/icon.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/info.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/lick.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/max.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/min.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/mootools.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/time.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/images/warning.png +0 -0
- data/Packages/slick/SlickSpec/assets/moobugger/mootools.js +57 -0
- data/Packages/slick/SlickSpec/assets/moobugger/test.html +88 -0
- data/Packages/slick/SlickSpec/assets/screen.css +259 -0
- data/Packages/slick/SlickSpec/assets/simple_request.js +67 -0
- data/Packages/slick/SlickSpec/assets/slickspec.css +366 -0
- data/Packages/slick/SlickSpec/bootstrap/moo12.slickspec.js +55 -0
- data/Packages/slick/SlickSpec/bootstrap/nwmatcher.slickspec.js +27 -0
- data/Packages/slick/SlickSpec/bootstrap/sizzle.slickspec.js +65 -0
- data/Packages/slick/SlickSpec/bootstrap/slick.slickspec.js +66 -0
- data/Packages/slick/SlickSpec/bootstrap/yui.slickspec.js +36 -0
- data/Packages/slick/SlickSpec/index.html +26 -0
- data/Packages/slick/SlickSpec/mocks/MooTools_Logo.svg +24 -0
- data/Packages/slick/SlickSpec/mocks/html5-shim.html +70 -0
- data/Packages/slick/SlickSpec/mocks/query_test-dojo.html +79 -0
- data/Packages/slick/SlickSpec/mocks/query_test-google_closure.html +72 -0
- data/Packages/slick/SlickSpec/mocks/query_test-jquery.html +213 -0
- data/Packages/slick/SlickSpec/mocks/query_test-prototype.html +95 -0
- data/Packages/slick/SlickSpec/mocks/query_test-slick.html +20 -0
- data/Packages/slick/SlickSpec/mocks/query_test-yui.html +88 -0
- data/Packages/slick/SlickSpec/mocks/template-almost.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template-chromeframe.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template-ie7.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template-quirks.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template-standard.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template-transitional.html +2932 -0
- data/Packages/slick/SlickSpec/mocks/template.xhtml +2476 -0
- data/Packages/slick/SlickSpec/mocks/template.xml +2475 -0
- data/Packages/slick/SlickSpec/mocks/xml.xml +21 -0
- data/Packages/slick/SlickSpec/select.html +107 -0
- data/Packages/slick/SlickSpec/setup.js +93 -0
- data/Packages/slick/SlickSpec/slickspec.html +261 -0
- data/Packages/slick/SlickSpec/specrunner_browser.html +69 -0
- data/Packages/slick/SlickSpec/specs/api.js +167 -0
- data/Packages/slick/SlickSpec/specs/browser_bugs.js +269 -0
- data/Packages/slick/SlickSpec/specs/dojo.js +260 -0
- data/Packages/slick/SlickSpec/specs/engine_bugs.js +388 -0
- data/Packages/slick/SlickSpec/specs/google_closure.js +176 -0
- data/Packages/slick/SlickSpec/specs/html.js +58 -0
- data/Packages/slick/SlickSpec/specs/html5.js +40 -0
- data/Packages/slick/SlickSpec/specs/isxml.js +24 -0
- data/Packages/slick/SlickSpec/specs/jquery.js +465 -0
- data/Packages/slick/SlickSpec/specs/match.js +139 -0
- data/Packages/slick/SlickSpec/specs/mock_template.js +360 -0
- data/Packages/slick/SlickSpec/specs/parser.js +409 -0
- data/Packages/slick/SlickSpec/specs/prototype.js +428 -0
- data/Packages/slick/SlickSpec/specs/select_exhaustive.js +84 -0
- data/Packages/slick/SlickSpec/specs/select_nth-child.js +64 -0
- data/Packages/slick/SlickSpec/specs/syntax.js +45 -0
- data/Packages/slick/SlickSpec/specs/unit.js +87 -0
- data/Packages/slick/SlickSpec/specs/xml.js +47 -0
- data/Packages/slick/SlickSpec/specs/yui.js +510 -0
- data/Packages/slick/SlickSpec/user-specs/pseudos.html +45 -0
- data/Packages/slick/Source/Slick.Finder.js +1012 -0
- data/Packages/slick/Source/Slick.Parser.js +231 -0
- data/Packages/slick/Source/slick.js +10 -0
- data/Packages/slick/package.json +12 -0
- data/Packages/slick/package.yml +19 -0
- data/Packages/slick/speed/frameworks/dojo-acme.js +1625 -0
- data/Packages/slick/speed/frameworks/dojo.js +16 -0
- data/Packages/slick/speed/frameworks/domass.js +1365 -0
- data/Packages/slick/speed/frameworks/jquery.js +4376 -0
- data/Packages/slick/speed/frameworks/mootools-core-1.3.js +5367 -0
- data/Packages/slick/speed/frameworks/mootools-slick.js +626 -0
- data/Packages/slick/speed/frameworks/mootools.js +4329 -0
- data/Packages/slick/speed/frameworks/native.js +0 -0
- data/Packages/slick/speed/frameworks/nwmatcher.js +1264 -0
- data/Packages/slick/speed/frameworks/prototype.js +4320 -0
- data/Packages/slick/speed/frameworks/sizzle.js +1102 -0
- data/Packages/slick/speed/frameworks/slick.js +1099 -0
- data/Packages/slick/speed/frameworks/sly.js +857 -0
- data/Packages/slick/speed/frameworks/yass.css3.js +490 -0
- data/Packages/slick/speed/jslitmus/JSLitmus.js +714 -0
- data/Packages/slick/speed/jslitmus/JSLitmusHelpers.js +3 -0
- data/Packages/slick/speed/jslitmus/bench_catch.html +49 -0
- data/Packages/slick/speed/jslitmus/bench_match.html +214 -0
- data/Packages/slick/speed/jslitmus/bench_match.js +98 -0
- data/Packages/slick/speed/jslitmus/bench_parse.html +161 -0
- data/Packages/slick/speed/jslitmus/bench_parse.js +68 -0
- data/Packages/slick/speed/jslitmus/bench_select.html +198 -0
- data/Packages/slick/speed/jslitmus/bench_select.js +106 -0
- data/Packages/slick/speed/jslitmus/bench_select2.js +106 -0
- data/Packages/slick/speed/jslitmus/bench_uidOf.html +121 -0
- data/Packages/slick/speed/jslitmus/closedNodes.html +92 -0
- data/Packages/slick/speed/jslitmus/demo.html +97 -0
- data/Packages/slick/speed/jslitmus/get_attribute.html +75 -0
- data/Packages/slick/speed/jslitmus/label_break-vs-fn_return.html +65 -0
- data/Packages/slick/speed/jslitmus/label_string-vs-var.html +94 -0
- data/Packages/slick/speed/jslitmus/method_vs_propfn.html +109 -0
- data/Packages/slick/speed/jslitmus/nodeListtoArray.html +89 -0
- data/Packages/slick/speed/jslitmus/parse_vs_clone.html +41 -0
- data/Packages/slick/speed/jslitmus/results.html +68 -0
- data/Packages/slick/speed/jslitmus/select.html +25 -0
- data/Packages/slick/speed/jslitmus/selectHTML.html +206 -0
- data/Packages/slick/speed/jslitmus/selectXML.html +140 -0
- data/Packages/slick/speed/jslitmus/select_class-doctypes.html +150 -0
- data/Packages/slick/speed/jslitmus/select_class.html +92 -0
- data/Packages/slick/speed/jslitmus/select_id.html +133 -0
- data/Packages/slick/speed/slickspeed/config.ini +54 -0
- data/Packages/slick/speed/slickspeed/footer.html +3 -0
- data/Packages/slick/speed/slickspeed/header.php +28 -0
- data/Packages/slick/speed/slickspeed/index.php +36 -0
- data/Packages/slick/speed/slickspeed/instructions.txt +4 -0
- data/Packages/slick/speed/slickspeed/logo.png +0 -0
- data/Packages/slick/speed/slickspeed/selectors.list.crazy.css +319 -0
- data/Packages/slick/speed/slickspeed/selectors.list.css +40 -0
- data/Packages/slick/speed/slickspeed/selectors.list.extended.css +81 -0
- data/Packages/slick/speed/slickspeed/selectors.list.mine.css +54 -0
- data/Packages/slick/speed/slickspeed/selectors.list.org.css +37 -0
- data/Packages/slick/speed/slickspeed/selectors.list.simple.css +105 -0
- data/Packages/slick/speed/slickspeed/selectors.list.sly.css +54 -0
- data/Packages/slick/speed/slickspeed/selectors.list.yahoo.css +33 -0
- data/Packages/slick/speed/slickspeed/style.css +197 -0
- data/Packages/slick/speed/slickspeed/system/index.php +172 -0
- data/Packages/slick/speed/slickspeed/system/slickspeed.js +162 -0
- data/Packages/slick/speed/slickspeed/system/template.php +154 -0
- data/Packages/slick/speed/slickspeed/system_slackerspeed/index.php +295 -0
- data/Packages/slick/speed/slickspeed/system_slackerspeed/slickspeed.js +147 -0
- data/Packages/slick/speed/slickspeed/system_slackerspeed/template.php +54 -0
- data/Packages/slick/speed/slickspeed/template.html +2921 -0
- data/Packages/slick/speed/slickspeed/template.yahoo.html +1 -0
- data/Packages/slick/speed/speedtests/deepmatch/index.html +294 -0
- data/Packages/slick/speed/speedtests/index.html +14 -0
- data/Packages/slick/speed/speedtests/setdocument/index.html +44 -0
- data/Packages/slick/speed/speedtests/setdocument/slow-document.js +69 -0
- data/Packages/slick/speed/subtleslickspeed/README.mdown +6 -0
- data/Packages/slick/speed/subtleslickspeed/lib/ie.css +26 -0
- data/Packages/slick/speed/subtleslickspeed/lib/jslib.js +389 -0
- data/Packages/slick/speed/subtleslickspeed/lib/own_tests/report_test.html +64 -0
- data/Packages/slick/speed/subtleslickspeed/lib/print.css +30 -0
- data/Packages/slick/speed/subtleslickspeed/lib/screen.css +251 -0
- data/Packages/slick/speed/subtleslickspeed/lib/subtlesandbox.js +174 -0
- data/Packages/slick/speed/subtleslickspeed/lib/subtlesandbox_strict.html +18 -0
- data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.js +290 -0
- data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.reports.js +87 -0
- data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.reports.table.js +353 -0
- data/Packages/slick/speed/subtleslickspeed/lib/table_report.css +241 -0
- data/Packages/slick/speed/subtleslickspeed/selectors.html +156 -0
- data/Packages/slick/speed/subtleslickspeed/string_replace.html +2998 -0
- data/Packages/slick/speed/subtleslickspeed/tests/selectors/template.html +14 -0
- data/Packages/slick/speed/subtleslickspeed/tests/selectors/template.js +2924 -0
- data/Packages/slick/speed/subtleslickspeed/tests/selectors/tests.js +177 -0
- data/lib/lsd/helper.rb +12 -0
- data/lib/lsd/packages.rb +25 -0
- data/lib/lsd/railtie.rb +33 -0
- data/lib/lsd/source.rb +37 -0
- data/lib/lsd/widget_generator.rb +24 -0
- data/lib/lsd.rake +17 -0
- data/lib/lsd.rb +20 -0
- data/lib/templates/Application.js +37 -0
- data/lib/templates/Widget.js +25 -0
- data/lib/templates/app_name.js +18 -0
- data/lib/templates/new_widget.js +25 -0
- data/lib/templates/package.yml +18 -0
- metadata +1053 -0
@@ -0,0 +1,1625 @@
|
|
1
|
+
//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
|
2
|
+
if(typeof dojo != "undefined"){
|
3
|
+
//>>excludeEnd("webkitMobile");
|
4
|
+
dojo.provide("dojo._base.query");
|
5
|
+
dojo.require("dojo._base.NodeList");
|
6
|
+
dojo.require("dojo._base.lang");
|
7
|
+
|
8
|
+
//>>excludeStart("acmeExclude", fileName.indexOf("dojo") != -1);
|
9
|
+
|
10
|
+
}else if(!this["acme"] && !this["queryPortability"]){
|
11
|
+
// NOTE:
|
12
|
+
// the functions and properties are duplicates of things found
|
13
|
+
// elsewhere in Dojo. They've been copied here to make query.js a
|
14
|
+
// stand-alone system. The "acmeExclude" ensures that it *never*
|
15
|
+
// shows up in builds of Dojo.
|
16
|
+
(function(){
|
17
|
+
// a self-sufficient query impl
|
18
|
+
acme = {
|
19
|
+
trim: function(/*String*/ str){
|
20
|
+
// summary:
|
21
|
+
// trims whitespaces from both sides of the string
|
22
|
+
str = str.replace(/^\s+/, '');
|
23
|
+
for(var i = str.length - 1; i >= 0; i--){
|
24
|
+
if(/\S/.test(str.charAt(i))){
|
25
|
+
str = str.substring(0, i + 1);
|
26
|
+
break;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
return str; // String
|
30
|
+
},
|
31
|
+
forEach: function(/*String*/ arr, /*Function*/ callback, /*Object?*/ thisObject){
|
32
|
+
// summary:
|
33
|
+
// an iterator function that passes items, indexes,
|
34
|
+
// and the array to a callback
|
35
|
+
if(!arr || !arr.length){ return; }
|
36
|
+
for(var i=0,l=arr.length; i<l; ++i){
|
37
|
+
callback.call(thisObject||window, arr[i], i, arr);
|
38
|
+
}
|
39
|
+
},
|
40
|
+
byId: function(id, doc){
|
41
|
+
// summary:
|
42
|
+
// a function that return an element by ID, but also
|
43
|
+
// accepts nodes safely
|
44
|
+
if(typeof id == "string"){
|
45
|
+
return (doc||document).getElementById(id); // DomNode
|
46
|
+
}else{
|
47
|
+
return id; // DomNode
|
48
|
+
}
|
49
|
+
},
|
50
|
+
isString: function(item){
|
51
|
+
// summary:
|
52
|
+
// is item a string?
|
53
|
+
return (typeof item == "string"); // Boolean
|
54
|
+
},
|
55
|
+
// the default document to search
|
56
|
+
doc: document,
|
57
|
+
// the constructor for node list objects returned from query()
|
58
|
+
NodeList: Array
|
59
|
+
};
|
60
|
+
|
61
|
+
// define acme.isIE, acme.isSafari, acme.isOpera, etc.
|
62
|
+
var n = navigator;
|
63
|
+
var dua = n.userAgent;
|
64
|
+
var dav = n.appVersion;
|
65
|
+
var tv = parseFloat(dav);
|
66
|
+
acme.isOpera = (dua.indexOf("Opera") >= 0) ? tv: undefined;
|
67
|
+
acme.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : undefined;
|
68
|
+
acme.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined;
|
69
|
+
acme.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined;
|
70
|
+
var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0);
|
71
|
+
if(index && !acme.isChrome){
|
72
|
+
acme.isSafari = parseFloat(dav.split("Version/")[1]);
|
73
|
+
if(!acme.isSafari || parseFloat(dav.substr(index + 7)) <= 419.3){
|
74
|
+
acme.isSafari = 2;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
if(document.all && !acme.isOpera){
|
78
|
+
acme.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
|
79
|
+
}
|
80
|
+
|
81
|
+
Array._wrap = function(arr){ return arr; };
|
82
|
+
})();
|
83
|
+
|
84
|
+
//>>excludeEnd("acmeExclude");
|
85
|
+
//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
|
86
|
+
}
|
87
|
+
|
88
|
+
/*
|
89
|
+
dojo.query() architectural overview:
|
90
|
+
|
91
|
+
dojo.query is a relatively full-featured CSS3 query library. It is
|
92
|
+
designed to take any valid CSS3 selector and return the nodes matching
|
93
|
+
the selector. To do this quickly, it processes queries in several
|
94
|
+
steps, applying caching where profitable.
|
95
|
+
|
96
|
+
The steps (roughly in reverse order of the way they appear in the code):
|
97
|
+
1.) check to see if we already have a "query dispatcher"
|
98
|
+
- if so, use that with the given parameterization. Skip to step 4.
|
99
|
+
2.) attempt to determine which branch to dispatch the query to:
|
100
|
+
- JS (optimized DOM iteration)
|
101
|
+
- native (FF3.1+, Safari 3.1+, IE 8+)
|
102
|
+
3.) tokenize and convert to executable "query dispatcher"
|
103
|
+
- this is where the lion's share of the complexity in the
|
104
|
+
system lies. In the DOM version, the query dispatcher is
|
105
|
+
assembled as a chain of "yes/no" test functions pertaining to
|
106
|
+
a section of a simple query statement (".blah:nth-child(odd)"
|
107
|
+
but not "div div", which is 2 simple statements). Individual
|
108
|
+
statement dispatchers are cached (to prevent re-definition)
|
109
|
+
as are entire dispatch chains (to make re-execution of the
|
110
|
+
same query fast)
|
111
|
+
4.) the resulting query dispatcher is called in the passed scope
|
112
|
+
(by default the top-level document)
|
113
|
+
- for DOM queries, this results in a recursive, top-down
|
114
|
+
evaluation of nodes based on each simple query section
|
115
|
+
- for native implementations, this may mean working around spec
|
116
|
+
bugs. So be it.
|
117
|
+
5.) matched nodes are pruned to ensure they are unique (if necessary)
|
118
|
+
*/
|
119
|
+
|
120
|
+
;(function(d){
|
121
|
+
// define everything in a closure for compressability reasons. "d" is an
|
122
|
+
// alias to "dojo" (or the toolkit alias object, e.g., "acme").
|
123
|
+
|
124
|
+
////////////////////////////////////////////////////////////////////////
|
125
|
+
// Toolkit aliases
|
126
|
+
////////////////////////////////////////////////////////////////////////
|
127
|
+
|
128
|
+
// if you are extracing dojo.query for use in your own system, you will
|
129
|
+
// need to provide these methods and properties. No other porting should be
|
130
|
+
// necessary, save for configuring the system to use a class other than
|
131
|
+
// dojo.NodeList as the return instance instantiator
|
132
|
+
var trim = d.trim;
|
133
|
+
var each = d.forEach;
|
134
|
+
// d.isIE; // float
|
135
|
+
// d.isSafari; // float
|
136
|
+
// d.isOpera; // float
|
137
|
+
// d.isWebKit; // float
|
138
|
+
// d.doc ; // document element
|
139
|
+
var qlc = d._queryListCtor = d.NodeList;
|
140
|
+
var isString = d.isString;
|
141
|
+
|
142
|
+
var getDoc = function(){ return d.doc; };
|
143
|
+
var cssCaseBug = (d.isWebKit && ((getDoc().compatMode) == "BackCompat"));
|
144
|
+
|
145
|
+
////////////////////////////////////////////////////////////////////////
|
146
|
+
// Global utilities
|
147
|
+
////////////////////////////////////////////////////////////////////////
|
148
|
+
|
149
|
+
|
150
|
+
// on browsers that support the "children" collection we can avoid a lot of
|
151
|
+
// iteration on chaff (non-element) nodes.
|
152
|
+
// why.
|
153
|
+
var childNodesName = !!getDoc().firstChild["children"] ? "children" : "childNodes";
|
154
|
+
|
155
|
+
var specials = ">~+";
|
156
|
+
|
157
|
+
// global thunk to determine whether we should treat the current query as
|
158
|
+
// case sensitive or not. This switch is flipped by the query evaluator
|
159
|
+
// based on the document passed as the context to search.
|
160
|
+
var caseSensitive = false;
|
161
|
+
|
162
|
+
// how high?
|
163
|
+
var yesman = function(){ return true; };
|
164
|
+
|
165
|
+
////////////////////////////////////////////////////////////////////////
|
166
|
+
// Tokenizer
|
167
|
+
////////////////////////////////////////////////////////////////////////
|
168
|
+
|
169
|
+
var getQueryParts = function(query){
|
170
|
+
// summary:
|
171
|
+
// state machine for query tokenization
|
172
|
+
// description:
|
173
|
+
// instead of using a brittle and slow regex-based CSS parser,
|
174
|
+
// dojo.query implements an AST-style query representation. This
|
175
|
+
// representation is only generated once per query. For example,
|
176
|
+
// the same query run multiple times or under different root nodes
|
177
|
+
// does not re-parse the selector expression but instead uses the
|
178
|
+
// cached data structure. The state machine implemented here
|
179
|
+
// terminates on the last " " (space) charachter and returns an
|
180
|
+
// ordered array of query component structures (or "parts"). Each
|
181
|
+
// part represents an operator or a simple CSS filtering
|
182
|
+
// expression. The structure for parts is documented in the code
|
183
|
+
// below.
|
184
|
+
|
185
|
+
|
186
|
+
// NOTE:
|
187
|
+
// this code is designed to run fast and compress well. Sacrifices
|
188
|
+
// to readibility and maintainability have been made. Your best
|
189
|
+
// bet when hacking the tokenizer is to put The Donnas on *really*
|
190
|
+
// loud (may we recommend their "Spend The Night" release?) and
|
191
|
+
// just assume you're gonna make mistakes. Keep the unit tests
|
192
|
+
// open and run them frequently. Knowing is half the battle ;-)
|
193
|
+
if(specials.indexOf(query.slice(-1)) >= 0){
|
194
|
+
// if we end with a ">", "+", or "~", that means we're implicitly
|
195
|
+
// searching all children, so make it explicit
|
196
|
+
query += " * "
|
197
|
+
}else{
|
198
|
+
// if you have not provided a terminator, one will be provided for
|
199
|
+
// you...
|
200
|
+
query += " ";
|
201
|
+
}
|
202
|
+
|
203
|
+
var ts = function(/*Integer*/ s, /*Integer*/ e){
|
204
|
+
// trim and slice.
|
205
|
+
|
206
|
+
// take an index to start a string slice from and an end position
|
207
|
+
// and return a trimmed copy of that sub-string
|
208
|
+
return trim(query.slice(s, e));
|
209
|
+
}
|
210
|
+
|
211
|
+
// the overall data graph of the full query, as represented by queryPart objects
|
212
|
+
var queryParts = [];
|
213
|
+
|
214
|
+
|
215
|
+
// state keeping vars
|
216
|
+
var inBrackets = -1, inParens = -1, inMatchFor = -1,
|
217
|
+
inPseudo = -1, inClass = -1, inId = -1, inTag = -1,
|
218
|
+
lc = "", cc = "", pStart;
|
219
|
+
|
220
|
+
// iteration vars
|
221
|
+
var x = 0, // index in the query
|
222
|
+
ql = query.length,
|
223
|
+
currentPart = null, // data structure representing the entire clause
|
224
|
+
_cp = null; // the current pseudo or attr matcher
|
225
|
+
|
226
|
+
// several temporary variables are assigned to this structure durring a
|
227
|
+
// potential sub-expression match:
|
228
|
+
// attr:
|
229
|
+
// a string representing the current full attribute match in a
|
230
|
+
// bracket expression
|
231
|
+
// type:
|
232
|
+
// if there's an operator in a bracket expression, this is
|
233
|
+
// used to keep track of it
|
234
|
+
// value:
|
235
|
+
// the internals of parenthetical expression for a pseudo. for
|
236
|
+
// :nth-child(2n+1), value might be "2n+1"
|
237
|
+
|
238
|
+
var endTag = function(){
|
239
|
+
// called when the tokenizer hits the end of a particular tag name.
|
240
|
+
// Re-sets state variables for tag matching and sets up the matcher
|
241
|
+
// to handle the next type of token (tag or operator).
|
242
|
+
if(inTag >= 0){
|
243
|
+
var tv = (inTag == x) ? null : ts(inTag, x); // .toLowerCase();
|
244
|
+
currentPart[ (specials.indexOf(tv) < 0) ? "tag" : "oper" ] = tv;
|
245
|
+
inTag = -1;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
var endId = function(){
|
250
|
+
// called when the tokenizer might be at the end of an ID portion of a match
|
251
|
+
if(inId >= 0){
|
252
|
+
currentPart.id = ts(inId, x).replace(/\\/g, "");
|
253
|
+
inId = -1;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
var endClass = function(){
|
258
|
+
// called when the tokenizer might be at the end of a class name
|
259
|
+
// match. CSS allows for multiple classes, so we augment the
|
260
|
+
// current item with another class in its list
|
261
|
+
if(inClass >= 0){
|
262
|
+
currentPart.classes.push(ts(inClass+1, x).replace(/\\/g, ""));
|
263
|
+
inClass = -1;
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|
267
|
+
var endAll = function(){
|
268
|
+
// at the end of a simple fragment, so wall off the matches
|
269
|
+
endId(); endTag(); endClass();
|
270
|
+
}
|
271
|
+
|
272
|
+
var endPart = function(){
|
273
|
+
endAll();
|
274
|
+
if(inPseudo >= 0){
|
275
|
+
currentPart.pseudos.push({ name: ts(inPseudo+1, x) });
|
276
|
+
}
|
277
|
+
// hint to the selector engine to tell it whether or not it
|
278
|
+
// needs to do any iteration. Many simple selectors don't, and
|
279
|
+
// we can avoid significant construction-time work by advising
|
280
|
+
// the system to skip them
|
281
|
+
currentPart.loops = (
|
282
|
+
currentPart.pseudos.length ||
|
283
|
+
currentPart.attrs.length ||
|
284
|
+
currentPart.classes.length );
|
285
|
+
|
286
|
+
currentPart.oquery = currentPart.query = ts(pStart, x); // save the full expression as a string
|
287
|
+
|
288
|
+
|
289
|
+
// otag/tag are hints to suggest to the system whether or not
|
290
|
+
// it's an operator or a tag. We save a copy of otag since the
|
291
|
+
// tag name is cast to upper-case in regular HTML matches. The
|
292
|
+
// system has a global switch to figure out if the current
|
293
|
+
// expression needs to be case sensitive or not and it will use
|
294
|
+
// otag or tag accordingly
|
295
|
+
currentPart.otag = currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
|
296
|
+
|
297
|
+
if(currentPart.tag){
|
298
|
+
// if we're in a case-insensitive HTML doc, we likely want
|
299
|
+
// the toUpperCase when matching on element.tagName. If we
|
300
|
+
// do it here, we can skip the string op per node
|
301
|
+
// comparison
|
302
|
+
currentPart.tag = currentPart.tag.toUpperCase();
|
303
|
+
}
|
304
|
+
|
305
|
+
// add the part to the list
|
306
|
+
if(queryParts.length && (queryParts[queryParts.length-1].oper)){
|
307
|
+
// operators are always infix, so we remove them from the
|
308
|
+
// list and attach them to the next match. The evaluator is
|
309
|
+
// responsible for sorting out how to handle them.
|
310
|
+
currentPart.infixOper = queryParts.pop();
|
311
|
+
currentPart.query = currentPart.infixOper.query + " " + currentPart.query;
|
312
|
+
/*
|
313
|
+
console.debug( "swapping out the infix",
|
314
|
+
currentPart.infixOper,
|
315
|
+
"and attaching it to",
|
316
|
+
currentPart);
|
317
|
+
*/
|
318
|
+
}
|
319
|
+
queryParts.push(currentPart);
|
320
|
+
|
321
|
+
currentPart = null;
|
322
|
+
}
|
323
|
+
|
324
|
+
// iterate over the query, charachter by charachter, building up a
|
325
|
+
// list of query part objects
|
326
|
+
for(; lc=cc, cc=query.charAt(x), x < ql; x++){
|
327
|
+
// cc: the current character in the match
|
328
|
+
// lc: the last charachter (if any)
|
329
|
+
|
330
|
+
// someone is trying to escape something, so don't try to match any
|
331
|
+
// fragments. We assume we're inside a literal.
|
332
|
+
if(lc == "\\"){ continue; }
|
333
|
+
if(!currentPart){ // a part was just ended or none has yet been created
|
334
|
+
// NOTE: I hate all this alloc, but it's shorter than writing tons of if's
|
335
|
+
pStart = x;
|
336
|
+
// rules describe full CSS sub-expressions, like:
|
337
|
+
// #someId
|
338
|
+
// .className:first-child
|
339
|
+
// but not:
|
340
|
+
// thinger > div.howdy[type=thinger]
|
341
|
+
// the indidual components of the previous query would be
|
342
|
+
// split into 3 parts that would be represented a structure
|
343
|
+
// like:
|
344
|
+
// [
|
345
|
+
// {
|
346
|
+
// query: "thinger",
|
347
|
+
// tag: "thinger",
|
348
|
+
// },
|
349
|
+
// {
|
350
|
+
// query: "div.howdy[type=thinger]",
|
351
|
+
// classes: ["howdy"],
|
352
|
+
// infixOper: {
|
353
|
+
// query: ">",
|
354
|
+
// oper: ">",
|
355
|
+
// }
|
356
|
+
// },
|
357
|
+
// ]
|
358
|
+
currentPart = {
|
359
|
+
query: null, // the full text of the part's rule
|
360
|
+
pseudos: [], // CSS supports multiple pseud-class matches in a single rule
|
361
|
+
attrs: [], // CSS supports multi-attribute match, so we need an array
|
362
|
+
classes: [], // class matches may be additive, e.g.: .thinger.blah.howdy
|
363
|
+
tag: null, // only one tag...
|
364
|
+
oper: null, // ...or operator per component. Note that these wind up being exclusive.
|
365
|
+
id: null, // the id component of a rule
|
366
|
+
getTag: function(){
|
367
|
+
return (caseSensitive) ? this.otag : this.tag;
|
368
|
+
}
|
369
|
+
};
|
370
|
+
|
371
|
+
// if we don't have a part, we assume we're going to start at
|
372
|
+
// the beginning of a match, which should be a tag name. This
|
373
|
+
// might fault a little later on, but we detect that and this
|
374
|
+
// iteration will still be fine.
|
375
|
+
inTag = x;
|
376
|
+
}
|
377
|
+
|
378
|
+
if(inBrackets >= 0){
|
379
|
+
// look for a the close first
|
380
|
+
if(cc == "]"){ // if we're in a [...] clause and we end, do assignment
|
381
|
+
if(!_cp.attr){
|
382
|
+
// no attribute match was previously begun, so we
|
383
|
+
// assume this is an attribute existance match in the
|
384
|
+
// form of [someAttributeName]
|
385
|
+
_cp.attr = ts(inBrackets+1, x);
|
386
|
+
}else{
|
387
|
+
// we had an attribute already, so we know that we're
|
388
|
+
// matching some sort of value, as in [attrName=howdy]
|
389
|
+
_cp.matchFor = ts((inMatchFor||inBrackets+1), x);
|
390
|
+
}
|
391
|
+
var cmf = _cp.matchFor;
|
392
|
+
if(cmf){
|
393
|
+
// try to strip quotes from the matchFor value. We want
|
394
|
+
// [attrName=howdy] to match the same
|
395
|
+
// as [attrName = 'howdy' ]
|
396
|
+
if( (cmf.charAt(0) == '"') || (cmf.charAt(0) == "'") ){
|
397
|
+
_cp.matchFor = cmf.slice(1, -1);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
// end the attribute by adding it to the list of attributes.
|
401
|
+
currentPart.attrs.push(_cp);
|
402
|
+
_cp = null; // necessary?
|
403
|
+
inBrackets = inMatchFor = -1;
|
404
|
+
}else if(cc == "="){
|
405
|
+
// if the last char was an operator prefix, make sure we
|
406
|
+
// record it along with the "=" operator.
|
407
|
+
var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : "";
|
408
|
+
_cp.type = addToCc+cc;
|
409
|
+
_cp.attr = ts(inBrackets+1, x-addToCc.length);
|
410
|
+
inMatchFor = x+1;
|
411
|
+
}
|
412
|
+
// now look for other clause parts
|
413
|
+
}else if(inParens >= 0){
|
414
|
+
// if we're in a parenthetical expression, we need to figure
|
415
|
+
// out if it's attached to a pseduo-selector rule like
|
416
|
+
// :nth-child(1)
|
417
|
+
if(cc == ")"){
|
418
|
+
if(inPseudo >= 0){
|
419
|
+
_cp.value = ts(inParens+1, x);
|
420
|
+
}
|
421
|
+
inPseudo = inParens = -1;
|
422
|
+
}
|
423
|
+
}else if(cc == "#"){
|
424
|
+
// start of an ID match
|
425
|
+
endAll();
|
426
|
+
inId = x+1;
|
427
|
+
}else if(cc == "."){
|
428
|
+
// start of a class match
|
429
|
+
endAll();
|
430
|
+
inClass = x;
|
431
|
+
}else if(cc == ":"){
|
432
|
+
// start of a pseudo-selector match
|
433
|
+
endAll();
|
434
|
+
inPseudo = x;
|
435
|
+
}else if(cc == "["){
|
436
|
+
// start of an attribute match.
|
437
|
+
endAll();
|
438
|
+
inBrackets = x;
|
439
|
+
// provide a new structure for the attribute match to fill-in
|
440
|
+
_cp = {
|
441
|
+
/*=====
|
442
|
+
attr: null, type: null, matchFor: null
|
443
|
+
=====*/
|
444
|
+
};
|
445
|
+
}else if(cc == "("){
|
446
|
+
// we really only care if we've entered a parenthetical
|
447
|
+
// expression if we're already inside a pseudo-selector match
|
448
|
+
if(inPseudo >= 0){
|
449
|
+
// provide a new structure for the pseudo match to fill-in
|
450
|
+
_cp = {
|
451
|
+
name: ts(inPseudo+1, x),
|
452
|
+
value: null
|
453
|
+
}
|
454
|
+
currentPart.pseudos.push(_cp);
|
455
|
+
}
|
456
|
+
inParens = x;
|
457
|
+
}else if(
|
458
|
+
(cc == " ") &&
|
459
|
+
// if it's a space char and the last char is too, consume the
|
460
|
+
// current one without doing more work
|
461
|
+
(lc != cc)
|
462
|
+
){
|
463
|
+
endPart();
|
464
|
+
}
|
465
|
+
}
|
466
|
+
return queryParts;
|
467
|
+
};
|
468
|
+
|
469
|
+
|
470
|
+
////////////////////////////////////////////////////////////////////////
|
471
|
+
// DOM query infrastructure
|
472
|
+
////////////////////////////////////////////////////////////////////////
|
473
|
+
|
474
|
+
var agree = function(first, second){
|
475
|
+
// the basic building block of the yes/no chaining system. agree(f1,
|
476
|
+
// f2) generates a new function which returns the boolean results of
|
477
|
+
// both of the passed functions to a single logical-anded result. If
|
478
|
+
// either are not possed, the other is used exclusively.
|
479
|
+
if(!first){ return second; }
|
480
|
+
if(!second){ return first; }
|
481
|
+
|
482
|
+
return function(){
|
483
|
+
return first.apply(window, arguments) && second.apply(window, arguments);
|
484
|
+
}
|
485
|
+
};
|
486
|
+
|
487
|
+
var getArr = function(i, arr){
|
488
|
+
// helps us avoid array alloc when we don't need it
|
489
|
+
var r = arr||[]; // FIXME: should this be 'new d._queryListCtor()' ?
|
490
|
+
if(i){ r.push(i); }
|
491
|
+
return r;
|
492
|
+
};
|
493
|
+
|
494
|
+
var _isElement = function(n){ return (1 == n.nodeType); };
|
495
|
+
|
496
|
+
// FIXME: need to coalesce _getAttr with defaultGetter
|
497
|
+
var blank = "";
|
498
|
+
var _getAttr = function(elem, attr){
|
499
|
+
if(!elem){ return blank; }
|
500
|
+
if(attr == "class"){
|
501
|
+
return elem.className || blank;
|
502
|
+
}
|
503
|
+
if(attr == "for"){
|
504
|
+
return elem.htmlFor || blank;
|
505
|
+
}
|
506
|
+
if(attr == "style"){
|
507
|
+
return elem.style.cssText || blank;
|
508
|
+
}
|
509
|
+
return (caseSensitive ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || blank;
|
510
|
+
};
|
511
|
+
|
512
|
+
var attrs = {
|
513
|
+
"*=": function(attr, value){
|
514
|
+
return function(elem){
|
515
|
+
// E[foo*="bar"]
|
516
|
+
// an E element whose "foo" attribute value contains
|
517
|
+
// the substring "bar"
|
518
|
+
return (_getAttr(elem, attr).indexOf(value)>=0);
|
519
|
+
}
|
520
|
+
},
|
521
|
+
"^=": function(attr, value){
|
522
|
+
// E[foo^="bar"]
|
523
|
+
// an E element whose "foo" attribute value begins exactly
|
524
|
+
// with the string "bar"
|
525
|
+
return function(elem){
|
526
|
+
return (_getAttr(elem, attr).indexOf(value)==0);
|
527
|
+
}
|
528
|
+
},
|
529
|
+
"$=": function(attr, value){
|
530
|
+
// E[foo$="bar"]
|
531
|
+
// an E element whose "foo" attribute value ends exactly
|
532
|
+
// with the string "bar"
|
533
|
+
var tval = " "+value;
|
534
|
+
return function(elem){
|
535
|
+
var ea = " "+_getAttr(elem, attr);
|
536
|
+
return (ea.lastIndexOf(value)==(ea.length-value.length));
|
537
|
+
}
|
538
|
+
},
|
539
|
+
"~=": function(attr, value){
|
540
|
+
// E[foo~="bar"]
|
541
|
+
// an E element whose "foo" attribute value is a list of
|
542
|
+
// space-separated values, one of which is exactly equal
|
543
|
+
// to "bar"
|
544
|
+
|
545
|
+
// return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
|
546
|
+
var tval = " "+value+" ";
|
547
|
+
return function(elem){
|
548
|
+
var ea = " "+_getAttr(elem, attr)+" ";
|
549
|
+
return (ea.indexOf(tval)>=0);
|
550
|
+
}
|
551
|
+
},
|
552
|
+
"|=": function(attr, value){
|
553
|
+
// E[hreflang|="en"]
|
554
|
+
// an E element whose "hreflang" attribute has a
|
555
|
+
// hyphen-separated list of values beginning (from the
|
556
|
+
// left) with "en"
|
557
|
+
var valueDash = " "+value+"-";
|
558
|
+
return function(elem){
|
559
|
+
var ea = " "+_getAttr(elem, attr);
|
560
|
+
return (
|
561
|
+
(ea == value) ||
|
562
|
+
(ea.indexOf(valueDash)==0)
|
563
|
+
);
|
564
|
+
}
|
565
|
+
},
|
566
|
+
"=": function(attr, value){
|
567
|
+
return function(elem){
|
568
|
+
return (_getAttr(elem, attr) == value);
|
569
|
+
}
|
570
|
+
}
|
571
|
+
};
|
572
|
+
|
573
|
+
// avoid testing for node type if we can. Defining this in the negative
|
574
|
+
// here to avoid negation in the fast path.
|
575
|
+
var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
|
576
|
+
var _ns = !_noNES ? "nextElementSibling" : "nextSibling";
|
577
|
+
var _ps = !_noNES ? "previousElementSibling" : "previousSibling";
|
578
|
+
var _simpleNodeTest = (_noNES ? _isElement : yesman);
|
579
|
+
|
580
|
+
var _lookLeft = function(node){
|
581
|
+
// look left
|
582
|
+
while(node = node[_ps]){
|
583
|
+
if(_simpleNodeTest(node)){ return false; }
|
584
|
+
}
|
585
|
+
return true;
|
586
|
+
};
|
587
|
+
|
588
|
+
var _lookRight = function(node){
|
589
|
+
// look right
|
590
|
+
while(node = node[_ns]){
|
591
|
+
if(_simpleNodeTest(node)){ return false; }
|
592
|
+
}
|
593
|
+
return true;
|
594
|
+
};
|
595
|
+
|
596
|
+
var getNodeIndex = function(node){
|
597
|
+
var root = node.parentNode;
|
598
|
+
var i = 0,
|
599
|
+
tret = root[childNodesName],
|
600
|
+
ci = (node["_i"]||-1),
|
601
|
+
cl = (root["_l"]||-1);
|
602
|
+
|
603
|
+
if(!tret){ return -1; }
|
604
|
+
var l = tret.length;
|
605
|
+
|
606
|
+
// we calcuate the parent length as a cheap way to invalidate the
|
607
|
+
// cache. It's not 100% accurate, but it's much more honest than what
|
608
|
+
// other libraries do
|
609
|
+
if( cl == l && ci >= 0 && cl >= 0 ){
|
610
|
+
// if it's legit, tag and release
|
611
|
+
return ci;
|
612
|
+
}
|
613
|
+
|
614
|
+
// else re-key things
|
615
|
+
root["_l"] = l;
|
616
|
+
ci = -1;
|
617
|
+
for(var te = root["firstElementChild"]||root["firstChild"]; te; te = te[_ns]){
|
618
|
+
if(_simpleNodeTest(te)){
|
619
|
+
te["_i"] = ++i;
|
620
|
+
if(node === te){
|
621
|
+
// NOTE:
|
622
|
+
// shortcuting the return at this step in indexing works
|
623
|
+
// very well for benchmarking but we avoid it here since
|
624
|
+
// it leads to potential O(n^2) behavior in sequential
|
625
|
+
// getNodexIndex operations on a previously un-indexed
|
626
|
+
// parent. We may revisit this at a later time, but for
|
627
|
+
// now we just want to get the right answer more often
|
628
|
+
// than not.
|
629
|
+
ci = i;
|
630
|
+
}
|
631
|
+
}
|
632
|
+
}
|
633
|
+
return ci;
|
634
|
+
};
|
635
|
+
|
636
|
+
var isEven = function(elem){
|
637
|
+
return !((getNodeIndex(elem)) % 2);
|
638
|
+
};
|
639
|
+
|
640
|
+
var isOdd = function(elem){
|
641
|
+
return ((getNodeIndex(elem)) % 2);
|
642
|
+
};
|
643
|
+
|
644
|
+
var pseudos = {
|
645
|
+
"checked": function(name, condition){
|
646
|
+
return function(elem){
|
647
|
+
// FIXME: make this more portable!!
|
648
|
+
return !!d.attr(elem, "checked");
|
649
|
+
}
|
650
|
+
},
|
651
|
+
"first-child": function(){ return _lookLeft; },
|
652
|
+
"last-child": function(){ return _lookRight; },
|
653
|
+
"only-child": function(name, condition){
|
654
|
+
return function(node){
|
655
|
+
if(!_lookLeft(node)){ return false; }
|
656
|
+
if(!_lookRight(node)){ return false; }
|
657
|
+
return true;
|
658
|
+
};
|
659
|
+
},
|
660
|
+
"empty": function(name, condition){
|
661
|
+
return function(elem){
|
662
|
+
// DomQuery and jQuery get this wrong, oddly enough.
|
663
|
+
// The CSS 3 selectors spec is pretty explicit about it, too.
|
664
|
+
var cn = elem.childNodes;
|
665
|
+
var cnl = elem.childNodes.length;
|
666
|
+
// if(!cnl){ return true; }
|
667
|
+
for(var x=cnl-1; x >= 0; x--){
|
668
|
+
var nt = cn[x].nodeType;
|
669
|
+
if((nt === 1)||(nt == 3)){ return false; }
|
670
|
+
}
|
671
|
+
return true;
|
672
|
+
}
|
673
|
+
},
|
674
|
+
"contains": function(name, condition){
|
675
|
+
var cz = condition.charAt(0);
|
676
|
+
if( cz == '"' || cz == "'" ){ //remove quote
|
677
|
+
condition = condition.slice(1, -1);
|
678
|
+
}
|
679
|
+
return function(elem){
|
680
|
+
return (elem.innerHTML.indexOf(condition) >= 0);
|
681
|
+
}
|
682
|
+
},
|
683
|
+
"not": function(name, condition){
|
684
|
+
var p = getQueryParts(condition)[0];
|
685
|
+
var ignores = { el: 1 };
|
686
|
+
if(p.tag != "*"){
|
687
|
+
ignores.tag = 1;
|
688
|
+
}
|
689
|
+
if(!p.classes.length){
|
690
|
+
ignores.classes = 1;
|
691
|
+
}
|
692
|
+
var ntf = getSimpleFilterFunc(p, ignores);
|
693
|
+
return function(elem){
|
694
|
+
return (!ntf(elem));
|
695
|
+
}
|
696
|
+
},
|
697
|
+
"nth-child": function(name, condition){
|
698
|
+
var pi = parseInt;
|
699
|
+
// avoid re-defining function objects if we can
|
700
|
+
if(condition == "odd"){
|
701
|
+
return isOdd;
|
702
|
+
}else if(condition == "even"){
|
703
|
+
return isEven;
|
704
|
+
}
|
705
|
+
// FIXME: can we shorten this?
|
706
|
+
if(condition.indexOf("n") != -1){
|
707
|
+
var tparts = condition.split("n", 2);
|
708
|
+
var pred = tparts[0] ? ((tparts[0] == '-') ? -1 : pi(tparts[0])) : 1;
|
709
|
+
var idx = tparts[1] ? pi(tparts[1]) : 0;
|
710
|
+
var lb = 0, ub = -1;
|
711
|
+
if(pred > 0){
|
712
|
+
if(idx < 0){
|
713
|
+
idx = (idx % pred) && (pred + (idx % pred));
|
714
|
+
}else if(idx>0){
|
715
|
+
if(idx >= pred){
|
716
|
+
lb = idx - idx % pred;
|
717
|
+
}
|
718
|
+
idx = idx % pred;
|
719
|
+
}
|
720
|
+
}else if(pred<0){
|
721
|
+
pred *= -1;
|
722
|
+
// idx has to be greater than 0 when pred is negative;
|
723
|
+
// shall we throw an error here?
|
724
|
+
if(idx > 0){
|
725
|
+
ub = idx;
|
726
|
+
idx = idx % pred;
|
727
|
+
}
|
728
|
+
}
|
729
|
+
if(pred > 0){
|
730
|
+
return function(elem){
|
731
|
+
var i = getNodeIndex(elem);
|
732
|
+
return (i>=lb) && (ub<0 || i<=ub) && ((i % pred) == idx);
|
733
|
+
}
|
734
|
+
}else{
|
735
|
+
condition = idx;
|
736
|
+
}
|
737
|
+
}
|
738
|
+
var ncount = pi(condition);
|
739
|
+
return function(elem){
|
740
|
+
return (getNodeIndex(elem) == ncount);
|
741
|
+
}
|
742
|
+
}
|
743
|
+
};
|
744
|
+
|
745
|
+
var defaultGetter = (d.isIE) ? function(cond){
|
746
|
+
var clc = cond.toLowerCase();
|
747
|
+
if(clc == "class"){ cond = "className"; }
|
748
|
+
return function(elem){
|
749
|
+
return (caseSensitive ? elem.getAttribute(cond) : elem[cond]||elem[clc]);
|
750
|
+
}
|
751
|
+
} : function(cond){
|
752
|
+
return function(elem){
|
753
|
+
return (elem && elem.getAttribute && elem.hasAttribute(cond));
|
754
|
+
}
|
755
|
+
};
|
756
|
+
|
757
|
+
var getSimpleFilterFunc = function(query, ignores){
|
758
|
+
// generates a node tester function based on the passed query part. The
|
759
|
+
// query part is one of the structures generatd by the query parser
|
760
|
+
// when it creates the query AST. The "ignores" object specifies which
|
761
|
+
// (if any) tests to skip, allowing the system to avoid duplicating
|
762
|
+
// work where it may have already been taken into account by other
|
763
|
+
// factors such as how the nodes to test were fetched in the first
|
764
|
+
// place
|
765
|
+
if(!query){ return yesman; }
|
766
|
+
ignores = ignores||{};
|
767
|
+
|
768
|
+
var ff = null;
|
769
|
+
|
770
|
+
if(!("el" in ignores)){
|
771
|
+
ff = agree(ff, _isElement);
|
772
|
+
}
|
773
|
+
|
774
|
+
if(!("tag" in ignores)){
|
775
|
+
if(query.tag != "*"){
|
776
|
+
ff = agree(ff, function(elem){
|
777
|
+
return (elem && (elem.tagName == query.getTag()));
|
778
|
+
});
|
779
|
+
}
|
780
|
+
}
|
781
|
+
|
782
|
+
if(!("classes" in ignores)){
|
783
|
+
each(query.classes, function(cname, idx, arr){
|
784
|
+
// get the class name
|
785
|
+
/*
|
786
|
+
var isWildcard = cname.charAt(cname.length-1) == "*";
|
787
|
+
if(isWildcard){
|
788
|
+
cname = cname.substr(0, cname.length-1);
|
789
|
+
}
|
790
|
+
// I dislike the regex thing, even if memozied in a cache, but it's VERY short
|
791
|
+
var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)");
|
792
|
+
*/
|
793
|
+
var re = new RegExp("(?:^|\\s)" + cname + "(?:\\s|$)");
|
794
|
+
ff = agree(ff, function(elem){
|
795
|
+
return re.test(elem.className);
|
796
|
+
});
|
797
|
+
ff.count = idx;
|
798
|
+
});
|
799
|
+
}
|
800
|
+
|
801
|
+
if(!("pseudos" in ignores)){
|
802
|
+
each(query.pseudos, function(pseudo){
|
803
|
+
var pn = pseudo.name;
|
804
|
+
if(pseudos[pn]){
|
805
|
+
ff = agree(ff, pseudos[pn](pn, pseudo.value));
|
806
|
+
}
|
807
|
+
});
|
808
|
+
}
|
809
|
+
|
810
|
+
if(!("attrs" in ignores)){
|
811
|
+
each(query.attrs, function(attr){
|
812
|
+
var matcher;
|
813
|
+
var a = attr.attr;
|
814
|
+
// type, attr, matchFor
|
815
|
+
if(attr.type && attrs[attr.type]){
|
816
|
+
matcher = attrs[attr.type](a, attr.matchFor);
|
817
|
+
}else if(a.length){
|
818
|
+
matcher = defaultGetter(a);
|
819
|
+
}
|
820
|
+
if(matcher){
|
821
|
+
ff = agree(ff, matcher);
|
822
|
+
}
|
823
|
+
});
|
824
|
+
}
|
825
|
+
|
826
|
+
if(!("id" in ignores)){
|
827
|
+
if(query.id){
|
828
|
+
ff = agree(ff, function(elem){
|
829
|
+
return (!!elem && (elem.id == query.id));
|
830
|
+
});
|
831
|
+
}
|
832
|
+
}
|
833
|
+
|
834
|
+
if(!ff){
|
835
|
+
if(!("default" in ignores)){
|
836
|
+
ff = yesman;
|
837
|
+
}
|
838
|
+
}
|
839
|
+
return ff;
|
840
|
+
};
|
841
|
+
|
842
|
+
var _nextSibling = function(filterFunc){
|
843
|
+
return function(node, ret, bag){
|
844
|
+
while(node = node[_ns]){
|
845
|
+
if(_noNES && (!_isElement(node))){ continue; }
|
846
|
+
if(
|
847
|
+
(!bag || _isUnique(node, bag)) &&
|
848
|
+
filterFunc(node)
|
849
|
+
){
|
850
|
+
ret.push(node);
|
851
|
+
}
|
852
|
+
break;
|
853
|
+
}
|
854
|
+
return ret;
|
855
|
+
}
|
856
|
+
};
|
857
|
+
|
858
|
+
var _nextSiblings = function(filterFunc){
|
859
|
+
return function(root, ret, bag){
|
860
|
+
var te = root[_ns];
|
861
|
+
while(te){
|
862
|
+
if(_simpleNodeTest(te)){
|
863
|
+
if(bag && !_isUnique(te, bag)){
|
864
|
+
break;
|
865
|
+
}
|
866
|
+
if(filterFunc(te)){
|
867
|
+
ret.push(te);
|
868
|
+
}
|
869
|
+
}
|
870
|
+
te = te[_ns];
|
871
|
+
}
|
872
|
+
return ret;
|
873
|
+
}
|
874
|
+
};
|
875
|
+
|
876
|
+
// get an array of child *elements*, skipping text and comment nodes
|
877
|
+
var _childElements = function(filterFunc){
|
878
|
+
filterFunc = filterFunc||yesman;
|
879
|
+
return function(root, ret, bag){
|
880
|
+
// get an array of child elements, skipping text and comment nodes
|
881
|
+
var te, x = 0, tret = root[childNodesName];
|
882
|
+
while(te = tret[x++]){
|
883
|
+
if(
|
884
|
+
_simpleNodeTest(te) &&
|
885
|
+
(!bag || _isUnique(te, bag)) &&
|
886
|
+
(filterFunc(te, x))
|
887
|
+
){
|
888
|
+
ret.push(te);
|
889
|
+
}
|
890
|
+
}
|
891
|
+
return ret;
|
892
|
+
};
|
893
|
+
};
|
894
|
+
|
895
|
+
/*
|
896
|
+
// thanks, Dean!
|
897
|
+
var itemIsAfterRoot = d.isIE ? function(item, root){
|
898
|
+
return (item.sourceIndex > root.sourceIndex);
|
899
|
+
} : function(item, root){
|
900
|
+
return (item.compareDocumentPosition(root) == 2);
|
901
|
+
};
|
902
|
+
*/
|
903
|
+
|
904
|
+
// test to see if node is below root
|
905
|
+
var _isDescendant = function(node, root){
|
906
|
+
var pn = node.parentNode;
|
907
|
+
while(pn){
|
908
|
+
if(pn == root){
|
909
|
+
break;
|
910
|
+
}
|
911
|
+
pn = pn.parentNode;
|
912
|
+
}
|
913
|
+
return !!pn;
|
914
|
+
};
|
915
|
+
|
916
|
+
var _getElementsFuncCache = {};
|
917
|
+
|
918
|
+
var getElementsFunc = function(query){
|
919
|
+
var retFunc = _getElementsFuncCache[query.query];
|
920
|
+
// if we've got a cached dispatcher, just use that
|
921
|
+
if(retFunc){ return retFunc; }
|
922
|
+
// else, generate a new on
|
923
|
+
|
924
|
+
// NOTE:
|
925
|
+
// this function returns a function that searches for nodes and
|
926
|
+
// filters them. The search may be specialized by infix operators
|
927
|
+
// (">", "~", or "+") else it will default to searching all
|
928
|
+
// descendants (the " " selector). Once a group of children is
|
929
|
+
// founde, a test function is applied to weed out the ones we
|
930
|
+
// don't want. Many common cases can be fast-pathed. We spend a
|
931
|
+
// lot of cycles to create a dispatcher that doesn't do more work
|
932
|
+
// than necessary at any point since, unlike this function, the
|
933
|
+
// dispatchers will be called every time. The logic of generating
|
934
|
+
// efficient dispatchers looks like this in pseudo code:
|
935
|
+
//
|
936
|
+
// # if it's a purely descendant query (no ">", "+", or "~" modifiers)
|
937
|
+
// if infixOperator == " ":
|
938
|
+
// if only(id):
|
939
|
+
// return def(root):
|
940
|
+
// return d.byId(id, root);
|
941
|
+
//
|
942
|
+
// elif id:
|
943
|
+
// return def(root):
|
944
|
+
// return filter(d.byId(id, root));
|
945
|
+
//
|
946
|
+
// elif cssClass && getElementsByClassName:
|
947
|
+
// return def(root):
|
948
|
+
// return filter(root.getElementsByClassName(cssClass));
|
949
|
+
//
|
950
|
+
// elif only(tag):
|
951
|
+
// return def(root):
|
952
|
+
// return root.getElementsByTagName(tagName);
|
953
|
+
//
|
954
|
+
// else:
|
955
|
+
// # search by tag name, then filter
|
956
|
+
// return def(root):
|
957
|
+
// return filter(root.getElementsByTagName(tagName||"*"));
|
958
|
+
//
|
959
|
+
// elif infixOperator == ">":
|
960
|
+
// # search direct children
|
961
|
+
// return def(root):
|
962
|
+
// return filter(root.children);
|
963
|
+
//
|
964
|
+
// elif infixOperator == "+":
|
965
|
+
// # search next sibling
|
966
|
+
// return def(root):
|
967
|
+
// return filter(root.nextElementSibling);
|
968
|
+
//
|
969
|
+
// elif infixOperator == "~":
|
970
|
+
// # search rightward siblings
|
971
|
+
// return def(root):
|
972
|
+
// return filter(nextSiblings(root));
|
973
|
+
|
974
|
+
var io = query.infixOper;
|
975
|
+
var oper = (io ? io.oper : "");
|
976
|
+
// the default filter func which tests for all conditions in the query
|
977
|
+
// part. This is potentially inefficient, so some optimized paths may
|
978
|
+
// re-define it to test fewer things.
|
979
|
+
var filterFunc = getSimpleFilterFunc(query, { el: 1 });
|
980
|
+
var qt = query.tag;
|
981
|
+
var wildcardTag = ("*" == qt);
|
982
|
+
var ecs = getDoc()["getElementsByClassName"];
|
983
|
+
|
984
|
+
if(!oper){
|
985
|
+
// if there's no infix operator, then it's a descendant query. ID
|
986
|
+
// and "elements by class name" variants can be accelerated so we
|
987
|
+
// call them out explicitly:
|
988
|
+
if(query.id){
|
989
|
+
// testing shows that the overhead of yesman() is acceptable
|
990
|
+
// and can save us some bytes vs. re-defining the function
|
991
|
+
// everywhere.
|
992
|
+
filterFunc = (!query.loops && wildcardTag) ?
|
993
|
+
yesman :
|
994
|
+
getSimpleFilterFunc(query, { el: 1, id: 1 });
|
995
|
+
|
996
|
+
retFunc = function(root, arr){
|
997
|
+
var te = d.byId(query.id, (root.ownerDocument||root));
|
998
|
+
if(!te || !filterFunc(te)){ return; }
|
999
|
+
if(9 == root.nodeType){ // if root's a doc, we just return directly
|
1000
|
+
return getArr(te, arr);
|
1001
|
+
}else{ // otherwise check ancestry
|
1002
|
+
if(_isDescendant(te, root)){
|
1003
|
+
return getArr(te, arr);
|
1004
|
+
}
|
1005
|
+
}
|
1006
|
+
}
|
1007
|
+
}else if(
|
1008
|
+
ecs &&
|
1009
|
+
// isAlien check. Workaround for Prototype.js being totally evil/dumb.
|
1010
|
+
/\{\s*\[native code\]\s*\}/.test(String(ecs)) &&
|
1011
|
+
query.classes.length &&
|
1012
|
+
// WebKit bug where quirks-mode docs select by class w/o case sensitivity
|
1013
|
+
!cssCaseBug
|
1014
|
+
){
|
1015
|
+
// it's a class-based query and we've got a fast way to run it.
|
1016
|
+
|
1017
|
+
// ignore class and ID filters since we will have handled both
|
1018
|
+
filterFunc = getSimpleFilterFunc(query, { el: 1, classes: 1, id: 1 });
|
1019
|
+
var classesString = query.classes.join(" ");
|
1020
|
+
retFunc = function(root, arr){
|
1021
|
+
var ret = getArr(0, arr), te, x=0;
|
1022
|
+
var tret = root.getElementsByClassName(classesString);
|
1023
|
+
while((te = tret[x++])){
|
1024
|
+
if(filterFunc(te, root)){ ret.push(te); }
|
1025
|
+
}
|
1026
|
+
return ret;
|
1027
|
+
};
|
1028
|
+
|
1029
|
+
}else if(!wildcardTag && !query.loops){
|
1030
|
+
// it's tag only. Fast-path it.
|
1031
|
+
retFunc = function(root, arr){
|
1032
|
+
var ret = getArr(0, arr), te, x=0;
|
1033
|
+
var tret = root.getElementsByTagName(query.getTag());
|
1034
|
+
while((te = tret[x++])){
|
1035
|
+
ret.push(te);
|
1036
|
+
}
|
1037
|
+
return ret;
|
1038
|
+
};
|
1039
|
+
}else{
|
1040
|
+
// the common case:
|
1041
|
+
// a descendant selector without a fast path. By now it's got
|
1042
|
+
// to have a tag selector, even if it's just "*" so we query
|
1043
|
+
// by that and filter
|
1044
|
+
filterFunc = getSimpleFilterFunc(query, { el: 1, tag: 1, id: 1 });
|
1045
|
+
retFunc = function(root, arr){
|
1046
|
+
var ret = getArr(0, arr), te, x=0;
|
1047
|
+
// we use getTag() to avoid case sensitivity issues
|
1048
|
+
var tret = root.getElementsByTagName(query.getTag());
|
1049
|
+
while((te = tret[x++])){
|
1050
|
+
if(filterFunc(te, root)){ ret.push(te); }
|
1051
|
+
}
|
1052
|
+
return ret;
|
1053
|
+
};
|
1054
|
+
}
|
1055
|
+
}else{
|
1056
|
+
// the query is scoped in some way. Instead of querying by tag we
|
1057
|
+
// use some other collection to find candidate nodes
|
1058
|
+
var skipFilters = { el: 1 };
|
1059
|
+
if(wildcardTag){
|
1060
|
+
skipFilters.tag = 1;
|
1061
|
+
}
|
1062
|
+
filterFunc = getSimpleFilterFunc(query, skipFilters);
|
1063
|
+
if("+" == oper){
|
1064
|
+
retFunc = _nextSibling(filterFunc);
|
1065
|
+
}else if("~" == oper){
|
1066
|
+
retFunc = _nextSiblings(filterFunc);
|
1067
|
+
}else if(">" == oper){
|
1068
|
+
retFunc = _childElements(filterFunc);
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
// cache it and return
|
1072
|
+
return _getElementsFuncCache[query.query] = retFunc;
|
1073
|
+
};
|
1074
|
+
|
1075
|
+
var filterDown = function(root, queryParts){
|
1076
|
+
// NOTE:
|
1077
|
+
// this is the guts of the DOM query system. It takes a list of
|
1078
|
+
// parsed query parts and a root and finds children which match
|
1079
|
+
// the selector represented by the parts
|
1080
|
+
var candidates = getArr(root), qp, x, te, qpl = queryParts.length, bag, ret;
|
1081
|
+
|
1082
|
+
for(var i = 0; i < qpl; i++){
|
1083
|
+
ret = [];
|
1084
|
+
qp = queryParts[i];
|
1085
|
+
x = candidates.length - 1;
|
1086
|
+
if(x > 0){
|
1087
|
+
// if we have more than one root at this level, provide a new
|
1088
|
+
// hash to use for checking group membership but tell the
|
1089
|
+
// system not to post-filter us since we will already have been
|
1090
|
+
// gauranteed to be unique
|
1091
|
+
bag = {};
|
1092
|
+
ret.nozip = true;
|
1093
|
+
}
|
1094
|
+
var gef = getElementsFunc(qp);
|
1095
|
+
while(te = candidates[x--]){
|
1096
|
+
// for every root, get the elements that match the descendant
|
1097
|
+
// selector, adding them to the "ret" array and filtering them
|
1098
|
+
// via membership in this level's bag. If there are more query
|
1099
|
+
// parts, then this level's return will be used as the next
|
1100
|
+
// level's candidates
|
1101
|
+
gef(te, ret, bag);
|
1102
|
+
}
|
1103
|
+
if(!ret.length){ break; }
|
1104
|
+
candidates = ret;
|
1105
|
+
}
|
1106
|
+
return ret;
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
////////////////////////////////////////////////////////////////////////
|
1110
|
+
// the query runner
|
1111
|
+
////////////////////////////////////////////////////////////////////////
|
1112
|
+
|
1113
|
+
// these are the primary caches for full-query results. The query
|
1114
|
+
// dispatcher functions are generated then stored here for hash lookup in
|
1115
|
+
// the future
|
1116
|
+
var _queryFuncCacheDOM = {},
|
1117
|
+
_queryFuncCacheQSA = {};
|
1118
|
+
|
1119
|
+
// this is the second level of spliting, from full-length queries (e.g.,
|
1120
|
+
// "div.foo .bar") into simple query expressions (e.g., ["div.foo",
|
1121
|
+
// ".bar"])
|
1122
|
+
var getStepQueryFunc = function(query){
|
1123
|
+
var qparts = getQueryParts(trim(query));
|
1124
|
+
|
1125
|
+
// if it's trivial, avoid iteration and zipping costs
|
1126
|
+
if(qparts.length == 1){
|
1127
|
+
// we optimize this case here to prevent dispatch further down the
|
1128
|
+
// chain, potentially slowing things down. We could more elegantly
|
1129
|
+
// handle this in filterDown(), but it's slower for simple things
|
1130
|
+
// that need to be fast (e.g., "#someId").
|
1131
|
+
var tef = getElementsFunc(qparts[0]);
|
1132
|
+
return function(root){
|
1133
|
+
var r = tef(root, new qlc());
|
1134
|
+
if(r){ r.nozip = true; }
|
1135
|
+
return r;
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
// otherwise, break it up and return a runner that iterates over the parts recursively
|
1140
|
+
return function(root){
|
1141
|
+
return filterDown(root, qparts);
|
1142
|
+
}
|
1143
|
+
};
|
1144
|
+
|
1145
|
+
// NOTES:
|
1146
|
+
// * we can't trust QSA for anything but document-rooted queries, so
|
1147
|
+
// caching is split into DOM query evaluators and QSA query evaluators
|
1148
|
+
// * caching query results is dirty and leak-prone (or, at a minimum,
|
1149
|
+
// prone to unbounded growth). Other toolkits may go this route, but
|
1150
|
+
// they totally destroy their own ability to manage their memory
|
1151
|
+
// footprint. If we implement it, it should only ever be with a fixed
|
1152
|
+
// total element reference # limit and an LRU-style algorithm since JS
|
1153
|
+
// has no weakref support. Caching compiled query evaluators is also
|
1154
|
+
// potentially problematic, but even on large documents the size of the
|
1155
|
+
// query evaluators is often < 100 function objects per evaluator (and
|
1156
|
+
// LRU can be applied if it's ever shown to be an issue).
|
1157
|
+
// * since IE's QSA support is currently only for HTML documents and even
|
1158
|
+
// then only in IE 8's "standards mode", we have to detect our dispatch
|
1159
|
+
// route at query time and keep 2 separate caches. Ugg.
|
1160
|
+
|
1161
|
+
// we need to determine if we think we can run a given query via
|
1162
|
+
// querySelectorAll or if we'll need to fall back on DOM queries to get
|
1163
|
+
// there. We need a lot of information about the environment and the query
|
1164
|
+
// to make the determiniation (e.g. does it support QSA, does the query in
|
1165
|
+
// question work in the native QSA impl, etc.).
|
1166
|
+
var nua = navigator.userAgent;
|
1167
|
+
// some versions of Safari provided QSA, but it was buggy and crash-prone.
|
1168
|
+
// We need te detect the right "internal" webkit version to make this work.
|
1169
|
+
var wk = "WebKit/";
|
1170
|
+
var is525 = (
|
1171
|
+
d.isWebKit &&
|
1172
|
+
(nua.indexOf(wk) > 0) &&
|
1173
|
+
(parseFloat(nua.split(wk)[1]) > 528)
|
1174
|
+
);
|
1175
|
+
|
1176
|
+
// IE QSA queries may incorrectly include comment nodes, so we throw the
|
1177
|
+
// zipping function into "remove" comments mode instead of the normal "skip
|
1178
|
+
// it" which every other QSA-clued browser enjoys
|
1179
|
+
var noZip = d.isIE ? "commentStrip" : "nozip";
|
1180
|
+
|
1181
|
+
var qsa = "querySelectorAll";
|
1182
|
+
var qsaAvail = (
|
1183
|
+
!!getDoc()[qsa] &&
|
1184
|
+
// see #5832
|
1185
|
+
(!d.isSafari || (d.isSafari > 3.1) || is525 )
|
1186
|
+
);
|
1187
|
+
var getQueryFunc = function(query, forceDOM){
|
1188
|
+
|
1189
|
+
if(qsaAvail){
|
1190
|
+
// if we've got a cached variant and we think we can do it, run it!
|
1191
|
+
var qsaCached = _queryFuncCacheQSA[query];
|
1192
|
+
if(qsaCached && !forceDOM){ return qsaCached; }
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
// else if we've got a DOM cached variant, assume that we already know
|
1196
|
+
// all we need to and use it
|
1197
|
+
var domCached = _queryFuncCacheDOM[query];
|
1198
|
+
if(domCached){ return domCached; }
|
1199
|
+
|
1200
|
+
// TODO:
|
1201
|
+
// today we're caching DOM and QSA branches separately so we
|
1202
|
+
// recalc useQSA every time. If we had a way to tag root+query
|
1203
|
+
// efficiently, we'd be in good shape to do a global cache.
|
1204
|
+
|
1205
|
+
var qcz = query.charAt(0);
|
1206
|
+
var nospace = (-1 == query.indexOf(" "));
|
1207
|
+
|
1208
|
+
// byId searches are wicked fast compared to QSA, even when filtering
|
1209
|
+
// is required
|
1210
|
+
if( (query.indexOf("#") >= 0) && (nospace) ){
|
1211
|
+
forceDOM = true;
|
1212
|
+
}
|
1213
|
+
|
1214
|
+
var useQSA = (
|
1215
|
+
qsaAvail && (!forceDOM) &&
|
1216
|
+
// as per CSS 3, we can't currently start w/ combinator:
|
1217
|
+
// http://www.w3.org/TR/css3-selectors/#w3cselgrammar
|
1218
|
+
(specials.indexOf(qcz) == -1) &&
|
1219
|
+
// IE's QSA impl sucks on pseudos
|
1220
|
+
(!d.isIE || (query.indexOf(":") == -1)) &&
|
1221
|
+
|
1222
|
+
(!(cssCaseBug && (query.indexOf(".") >= 0))) &&
|
1223
|
+
|
1224
|
+
// FIXME:
|
1225
|
+
// need to tighten up browser rules on ":contains" and "|=" to
|
1226
|
+
// figure out which aren't good
|
1227
|
+
(query.indexOf(":contains") == -1) &&
|
1228
|
+
(query.indexOf("|=") == -1) // some browsers don't grok it
|
1229
|
+
);
|
1230
|
+
|
1231
|
+
// TODO:
|
1232
|
+
// if we've got a descendant query (e.g., "> .thinger" instead of
|
1233
|
+
// just ".thinger") in a QSA-able doc, but are passed a child as a
|
1234
|
+
// root, it should be possible to give the item a synthetic ID and
|
1235
|
+
// trivially rewrite the query to the form "#synid > .thinger" to
|
1236
|
+
// use the QSA branch
|
1237
|
+
|
1238
|
+
|
1239
|
+
if(useQSA){
|
1240
|
+
var tq = (specials.indexOf(query.charAt(query.length-1)) >= 0) ?
|
1241
|
+
(query + " *") : query;
|
1242
|
+
return _queryFuncCacheQSA[query] = function(root){
|
1243
|
+
try{
|
1244
|
+
// the QSA system contains an egregious spec bug which
|
1245
|
+
// limits us, effectively, to only running QSA queries over
|
1246
|
+
// entire documents. See:
|
1247
|
+
// http://ejohn.org/blog/thoughts-on-queryselectorall/
|
1248
|
+
// despite this, we can also handle QSA runs on simple
|
1249
|
+
// selectors, but we don't want detection to be expensive
|
1250
|
+
// so we're just checking for the presence of a space char
|
1251
|
+
// right now. Not elegant, but it's cheaper than running
|
1252
|
+
// the query parser when we might not need to
|
1253
|
+
if(!((9 == root.nodeType) || nospace)){ throw ""; }
|
1254
|
+
var r = root[qsa](tq);
|
1255
|
+
// skip expensive duplication checks and just wrap in a NodeList
|
1256
|
+
r[noZip] = true;
|
1257
|
+
return r;
|
1258
|
+
}catch(e){
|
1259
|
+
// else run the DOM branch on this query, ensuring that we
|
1260
|
+
// default that way in the future
|
1261
|
+
return getQueryFunc(query, true)(root);
|
1262
|
+
}
|
1263
|
+
}
|
1264
|
+
}else{
|
1265
|
+
// DOM branch
|
1266
|
+
var parts = query.split(/\s*,\s*/);
|
1267
|
+
return _queryFuncCacheDOM[query] = ((parts.length < 2) ?
|
1268
|
+
// if not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher
|
1269
|
+
getStepQueryFunc(query) :
|
1270
|
+
// if it *is* a complex query, break it up into its
|
1271
|
+
// constituent parts and return a dispatcher that will
|
1272
|
+
// merge the parts when run
|
1273
|
+
function(root){
|
1274
|
+
var pindex = 0, // avoid array alloc for every invocation
|
1275
|
+
ret = [],
|
1276
|
+
tp;
|
1277
|
+
while((tp = parts[pindex++])){
|
1278
|
+
ret = ret.concat(getStepQueryFunc(tp)(root));
|
1279
|
+
}
|
1280
|
+
return ret;
|
1281
|
+
}
|
1282
|
+
);
|
1283
|
+
}
|
1284
|
+
};
|
1285
|
+
|
1286
|
+
var _zipIdx = 0;
|
1287
|
+
|
1288
|
+
// NOTE:
|
1289
|
+
// this function is Moo inspired, but our own impl to deal correctly
|
1290
|
+
// with XML in IE
|
1291
|
+
var _nodeUID = d.isIE ? function(node){
|
1292
|
+
if(caseSensitive){
|
1293
|
+
// XML docs don't have uniqueID on their nodes
|
1294
|
+
return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_zipIdx) || _zipIdx);
|
1295
|
+
|
1296
|
+
}else{
|
1297
|
+
return node.uniqueID;
|
1298
|
+
}
|
1299
|
+
} :
|
1300
|
+
function(node){
|
1301
|
+
return (node._uid || (node._uid = ++_zipIdx));
|
1302
|
+
};
|
1303
|
+
|
1304
|
+
// determine if a node in is unique in a "bag". In this case we don't want
|
1305
|
+
// to flatten a list of unique items, but rather just tell if the item in
|
1306
|
+
// question is already in the bag. Normally we'd just use hash lookup to do
|
1307
|
+
// this for us but IE's DOM is busted so we can't really count on that. On
|
1308
|
+
// the upside, it gives us a built in unique ID function.
|
1309
|
+
var _isUnique = function(node, bag){
|
1310
|
+
if(!bag){ return 1; }
|
1311
|
+
var id = _nodeUID(node);
|
1312
|
+
if(!bag[id]){ return bag[id] = 1; }
|
1313
|
+
return 0;
|
1314
|
+
};
|
1315
|
+
|
1316
|
+
// attempt to efficiently determine if an item in a list is a dupe,
|
1317
|
+
// returning a list of "uniques", hopefully in doucment order
|
1318
|
+
var _zipIdxName = "_zipIdx";
|
1319
|
+
var _zip = function(arr){
|
1320
|
+
if(arr && arr.nozip){
|
1321
|
+
return (qlc._wrap) ? qlc._wrap(arr) : arr;
|
1322
|
+
}
|
1323
|
+
// var ret = new d._queryListCtor();
|
1324
|
+
var ret = new qlc();
|
1325
|
+
if(!arr || !arr.length){ return ret; }
|
1326
|
+
if(arr[0]){
|
1327
|
+
ret.push(arr[0]);
|
1328
|
+
}
|
1329
|
+
if(arr.length < 2){ return ret; }
|
1330
|
+
|
1331
|
+
_zipIdx++;
|
1332
|
+
|
1333
|
+
// we have to fork here for IE and XML docs because we can't set
|
1334
|
+
// expandos on their nodes (apparently). *sigh*
|
1335
|
+
if(d.isIE && caseSensitive){
|
1336
|
+
var szidx = _zipIdx+"";
|
1337
|
+
arr[0].setAttribute(_zipIdxName, szidx);
|
1338
|
+
for(var x = 1, te; te = arr[x]; x++){
|
1339
|
+
if(arr[x].getAttribute(_zipIdxName) != szidx){
|
1340
|
+
ret.push(te);
|
1341
|
+
}
|
1342
|
+
te.setAttribute(_zipIdxName, szidx);
|
1343
|
+
}
|
1344
|
+
}else if(d.isIE && arr.commentStrip){
|
1345
|
+
try{
|
1346
|
+
for(var x = 1, te; te = arr[x]; x++){
|
1347
|
+
if(_isElement(te)){
|
1348
|
+
ret.push(te);
|
1349
|
+
}
|
1350
|
+
}
|
1351
|
+
}catch(e){ /* squelch */ }
|
1352
|
+
}else{
|
1353
|
+
if(arr[0]){ arr[0][_zipIdxName] = _zipIdx; }
|
1354
|
+
for(var x = 1, te; te = arr[x]; x++){
|
1355
|
+
if(arr[x][_zipIdxName] != _zipIdx){
|
1356
|
+
ret.push(te);
|
1357
|
+
}
|
1358
|
+
te[_zipIdxName] = _zipIdx;
|
1359
|
+
}
|
1360
|
+
}
|
1361
|
+
return ret;
|
1362
|
+
};
|
1363
|
+
|
1364
|
+
// the main executor
|
1365
|
+
d.query = function(/*String*/ query, /*String|DOMNode?*/ root){
|
1366
|
+
// summary:
|
1367
|
+
// Returns nodes which match the given CSS3 selector, searching the
|
1368
|
+
// entire document by default but optionally taking a node to scope
|
1369
|
+
// the search by. Returns an instance of dojo.NodeList.
|
1370
|
+
// description:
|
1371
|
+
// dojo.query() is the swiss army knife of DOM node manipulation in
|
1372
|
+
// Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's
|
1373
|
+
// "$" function, dojo.query provides robust, high-performance
|
1374
|
+
// CSS-based node selector support with the option of scoping searches
|
1375
|
+
// to a particular sub-tree of a document.
|
1376
|
+
//
|
1377
|
+
// Supported Selectors:
|
1378
|
+
// --------------------
|
1379
|
+
//
|
1380
|
+
// dojo.query() supports a rich set of CSS3 selectors, including:
|
1381
|
+
//
|
1382
|
+
// * class selectors (e.g., `.foo`)
|
1383
|
+
// * node type selectors like `span`
|
1384
|
+
// * ` ` descendant selectors
|
1385
|
+
// * `>` child element selectors
|
1386
|
+
// * `#foo` style ID selectors
|
1387
|
+
// * `*` universal selector
|
1388
|
+
// * `~`, the immediately preceeded-by sibling selector
|
1389
|
+
// * `+`, the preceeded-by sibling selector
|
1390
|
+
// * attribute queries:
|
1391
|
+
// | * `[foo]` attribute presence selector
|
1392
|
+
// | * `[foo='bar']` attribute value exact match
|
1393
|
+
// | * `[foo~='bar']` attribute value list item match
|
1394
|
+
// | * `[foo^='bar']` attribute start match
|
1395
|
+
// | * `[foo$='bar']` attribute end match
|
1396
|
+
// | * `[foo*='bar']` attribute substring match
|
1397
|
+
// * `:first-child`, `:last-child`, and `:only-child` positional selectors
|
1398
|
+
// * `:empty` content emtpy selector
|
1399
|
+
// * `:checked` pseudo selector
|
1400
|
+
// * `:nth-child(n)`, `:nth-child(2n+1)` style positional calculations
|
1401
|
+
// * `:nth-child(even)`, `:nth-child(odd)` positional selectors
|
1402
|
+
// * `:not(...)` negation pseudo selectors
|
1403
|
+
//
|
1404
|
+
// Any legal combination of these selectors will work with
|
1405
|
+
// `dojo.query()`, including compound selectors ("," delimited).
|
1406
|
+
// Very complex and useful searches can be constructed with this
|
1407
|
+
// palette of selectors and when combined with functions for
|
1408
|
+
// manipulation presented by dojo.NodeList, many types of DOM
|
1409
|
+
// manipulation operations become very straightforward.
|
1410
|
+
//
|
1411
|
+
// Unsupported Selectors:
|
1412
|
+
// ----------------------
|
1413
|
+
//
|
1414
|
+
// While dojo.query handles many CSS3 selectors, some fall outside of
|
1415
|
+
// what's resaonable for a programmatic node querying engine to
|
1416
|
+
// handle. Currently unsupported selectors include:
|
1417
|
+
//
|
1418
|
+
// * namespace-differentiated selectors of any form
|
1419
|
+
// * all `::` pseduo-element selectors
|
1420
|
+
// * certain pseduo-selectors which don't get a lot of day-to-day use:
|
1421
|
+
// | * `:root`, `:lang()`, `:target`, `:focus`
|
1422
|
+
// * all visual and state selectors:
|
1423
|
+
// | * `:root`, `:active`, `:hover`, `:visisted`, `:link`,
|
1424
|
+
// `:enabled`, `:disabled`
|
1425
|
+
// * `:*-of-type` pseudo selectors
|
1426
|
+
//
|
1427
|
+
// dojo.query and XML Documents:
|
1428
|
+
// -----------------------------
|
1429
|
+
//
|
1430
|
+
// `dojo.query` (as of dojo 1.2) supports searching XML documents
|
1431
|
+
// in a case-sensitive manner. If an HTML document is served with
|
1432
|
+
// a doctype that forces case-sensitivity (e.g., XHTML 1.1
|
1433
|
+
// Strict), dojo.query() will detect this and "do the right
|
1434
|
+
// thing". Case sensitivity is dependent upon the document being
|
1435
|
+
// searched and not the query used. It is therefore possible to
|
1436
|
+
// use case-sensitive queries on strict sub-documents (iframes,
|
1437
|
+
// etc.) or XML documents while still assuming case-insensitivity
|
1438
|
+
// for a host/root document.
|
1439
|
+
//
|
1440
|
+
// Non-selector Queries:
|
1441
|
+
// ---------------------
|
1442
|
+
//
|
1443
|
+
// If something other than a String is passed for the query,
|
1444
|
+
// `dojo.query` will return a new `dojo.NodeList` instance
|
1445
|
+
// constructed from that parameter alone and all further
|
1446
|
+
// processing will stop. This means that if you have a reference
|
1447
|
+
// to a node or NodeList, you can quickly construct a new NodeList
|
1448
|
+
// from the original by calling `dojo.query(node)` or
|
1449
|
+
// `dojo.query(list)`.
|
1450
|
+
//
|
1451
|
+
// query:
|
1452
|
+
// The CSS3 expression to match against. For details on the syntax of
|
1453
|
+
// CSS3 selectors, see <http://www.w3.org/TR/css3-selectors/#selectors>
|
1454
|
+
// root:
|
1455
|
+
// A DOMNode (or node id) to scope the search from. Optional.
|
1456
|
+
// returns: dojo.NodeList
|
1457
|
+
// An instance of `dojo.NodeList`. Many methods are available on
|
1458
|
+
// NodeLists for searching, iterating, manipulating, and handling
|
1459
|
+
// events on the matched nodes in the returned list.
|
1460
|
+
// example:
|
1461
|
+
// search the entire document for elements with the class "foo":
|
1462
|
+
// | dojo.query(".foo");
|
1463
|
+
// these elements will match:
|
1464
|
+
// | <span class="foo"></span>
|
1465
|
+
// | <span class="foo bar"></span>
|
1466
|
+
// | <p class="thud foo"></p>
|
1467
|
+
// example:
|
1468
|
+
// search the entire document for elements with the classes "foo" *and* "bar":
|
1469
|
+
// | dojo.query(".foo.bar");
|
1470
|
+
// these elements will match:
|
1471
|
+
// | <span class="foo bar"></span>
|
1472
|
+
// while these will not:
|
1473
|
+
// | <span class="foo"></span>
|
1474
|
+
// | <p class="thud foo"></p>
|
1475
|
+
// example:
|
1476
|
+
// find `<span>` elements which are descendants of paragraphs and
|
1477
|
+
// which have a "highlighted" class:
|
1478
|
+
// | dojo.query("p span.highlighted");
|
1479
|
+
// the innermost span in this fragment matches:
|
1480
|
+
// | <p class="foo">
|
1481
|
+
// | <span>...
|
1482
|
+
// | <span class="highlighted foo bar">...</span>
|
1483
|
+
// | </span>
|
1484
|
+
// | </p>
|
1485
|
+
// example:
|
1486
|
+
// set an "odd" class on all odd table rows inside of the table
|
1487
|
+
// `#tabular_data`, using the `>` (direct child) selector to avoid
|
1488
|
+
// affecting any nested tables:
|
1489
|
+
// | dojo.query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd");
|
1490
|
+
// example:
|
1491
|
+
// remove all elements with the class "error" from the document
|
1492
|
+
// and store them in a list:
|
1493
|
+
// | var errors = dojo.query(".error").orphan();
|
1494
|
+
// example:
|
1495
|
+
// add an onclick handler to every submit button in the document
|
1496
|
+
// which causes the form to be sent via Ajax instead:
|
1497
|
+
// | dojo.query("input[type='submit']").onclick(function(e){
|
1498
|
+
// | dojo.stopEvent(e); // prevent sending the form
|
1499
|
+
// | var btn = e.target;
|
1500
|
+
// | dojo.xhrPost({
|
1501
|
+
// | form: btn.form,
|
1502
|
+
// | load: function(data){
|
1503
|
+
// | // replace the form with the response
|
1504
|
+
// | var div = dojo.doc.createElement("div");
|
1505
|
+
// | dojo.place(div, btn.form, "after");
|
1506
|
+
// | div.innerHTML = data;
|
1507
|
+
// | dojo.style(btn.form, "display", "none");
|
1508
|
+
// | }
|
1509
|
+
// | });
|
1510
|
+
// | });
|
1511
|
+
|
1512
|
+
//Set list constructor to desired value. This can change
|
1513
|
+
//between calls, so always re-assign here.
|
1514
|
+
qlc = d._queryListCtor;
|
1515
|
+
|
1516
|
+
if(!query){
|
1517
|
+
return new qlc();
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
if(query.constructor == qlc){
|
1521
|
+
return query;
|
1522
|
+
}
|
1523
|
+
if(!isString(query)){
|
1524
|
+
return new qlc(query); // dojo.NodeList
|
1525
|
+
}
|
1526
|
+
if(isString(root)){
|
1527
|
+
root = d.byId(root);
|
1528
|
+
if(!root){ return new qlc(); }
|
1529
|
+
}
|
1530
|
+
|
1531
|
+
root = root||getDoc();
|
1532
|
+
var od = root.ownerDocument||root.documentElement;
|
1533
|
+
|
1534
|
+
// throw the big case sensitivity switch
|
1535
|
+
|
1536
|
+
// NOTE:
|
1537
|
+
// Opera in XHTML mode doesn't detect case-sensitivity correctly
|
1538
|
+
// and it's not clear that there's any way to test for it
|
1539
|
+
caseSensitive = (root.contentType && root.contentType=="application/xml") ||
|
1540
|
+
(d.isOpera && (root.doctype || od.toString() == "[object XMLDocument]")) ||
|
1541
|
+
(!!od) &&
|
1542
|
+
(d.isIE ? od.xml : (root.xmlVersion||od.xmlVersion));
|
1543
|
+
|
1544
|
+
// NOTE:
|
1545
|
+
// adding "true" as the 2nd argument to getQueryFunc is useful for
|
1546
|
+
// testing the DOM branch without worrying about the
|
1547
|
+
// behavior/performance of the QSA branch.
|
1548
|
+
var r = getQueryFunc(query)(root);
|
1549
|
+
|
1550
|
+
// FIXME:
|
1551
|
+
// need to investigate this branch WRT #8074 and #8075
|
1552
|
+
if(r && r.nozip && !qlc._wrap){
|
1553
|
+
return r;
|
1554
|
+
}
|
1555
|
+
return _zip(r); // dojo.NodeList
|
1556
|
+
}
|
1557
|
+
|
1558
|
+
// FIXME: need to add infrastructure for post-filtering pseudos, ala :last
|
1559
|
+
d.query.pseudos = pseudos;
|
1560
|
+
|
1561
|
+
// one-off function for filtering a NodeList based on a simple selector
|
1562
|
+
d._filterQueryResult = function(nodeList, simpleFilter){
|
1563
|
+
var tmpNodeList = new d._queryListCtor();
|
1564
|
+
var filterFunc = getSimpleFilterFunc(getQueryParts(simpleFilter)[0]);
|
1565
|
+
for(var x = 0, te; te = nodeList[x]; x++){
|
1566
|
+
if(filterFunc(te)){ tmpNodeList.push(te); }
|
1567
|
+
}
|
1568
|
+
return tmpNodeList;
|
1569
|
+
}
|
1570
|
+
})(this["queryPortability"]||this["acme"]||dojo);
|
1571
|
+
//>>excludeEnd("webkitMobile");
|
1572
|
+
|
1573
|
+
//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
|
1574
|
+
/*
|
1575
|
+
//>>excludeEnd("webkitMobile");
|
1576
|
+
//>>includeStart("webkitMobile", kwArgs.webkitMobile);
|
1577
|
+
if(!dojo["query"]){
|
1578
|
+
(function(){
|
1579
|
+
var ctr = 0;
|
1580
|
+
// QSA-only for webkit mobile. Welcome to the future.
|
1581
|
+
dojo.query = function(query, root){
|
1582
|
+
d._queryListCtor = dojo.NodeList;
|
1583
|
+
if(!query){
|
1584
|
+
return new d._queryListCtor();
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
if(query.constructor == d._queryListCtor){
|
1588
|
+
return query;
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
if(!dojo.isString(query)){
|
1592
|
+
return new d._queryListCtor(query); // dojo.NodeList
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
if(dojo.isString(root)){
|
1596
|
+
root = dojo.byId(root);
|
1597
|
+
if(!root){ return new d._queryListCtor(); }
|
1598
|
+
}
|
1599
|
+
|
1600
|
+
root = root||dojo.doc;
|
1601
|
+
var rootIsDoc = (root.nodeType == 9);
|
1602
|
+
var doc = rootIsDoc ? root : (root.ownerDocument||dojo.doc);
|
1603
|
+
// rewrite the query to be ID rooted
|
1604
|
+
if(!rootIsDoc || (">~+".indexOf(query.charAt(0)) >= 0)){
|
1605
|
+
root.id = root.id||("qUnique"+(ctr++));
|
1606
|
+
query = "#"+root.id+" "+query;
|
1607
|
+
}
|
1608
|
+
// rewrite the query to not choke on something like ".yada.yada >"
|
1609
|
+
// by adding a final descendant component
|
1610
|
+
|
1611
|
+
if(">~+".indexOf(query.slice(-1)) >= 0){
|
1612
|
+
query += " *";
|
1613
|
+
}
|
1614
|
+
return d._queryListCtor._wrap(
|
1615
|
+
Array.prototype.slice.call(
|
1616
|
+
doc.querySelectorAll(query)
|
1617
|
+
)
|
1618
|
+
);
|
1619
|
+
};
|
1620
|
+
})();
|
1621
|
+
}
|
1622
|
+
//>>includeEnd("webkitMobile");
|
1623
|
+
//>>excludeStart("webkitMobile", kwArgs.webkitMobile);
|
1624
|
+
*/
|
1625
|
+
//>>excludeEnd("webkitMobile");
|