Commit Graph

2182 Commits

Author SHA1 Message Date
Michał Gołębiowski
c17543fd3c Tests: Correct a typo in the regex matching Safari 8 2015-06-14 00:37:31 +02:00
Michał Gołębiowski
bb026fc12c Core: Make jQuery objects iterable
Make iterating over jQuery objects possible using ES 2015 for-of:

    for ( node of $( "<div id=narwhal>" ) ) {
        console.log( node.id ); // "narwhal"
    }

Fixes gh-1693
2015-06-13 23:14:36 +02:00
Michał Gołębiowski
9c8a3ecdc4 Build: Refactor Node smoke tests
Utilize the assert module, avoid inline JSHint comments.
2015-06-13 23:08:19 +02:00
Michał Gołębiowski
1556c4661a Build: Update grunt-contrib-jshint 2015-06-13 22:45:52 +02:00
Michał Gołębiowski
d471842b3e CSS: Don't cache unrecognized CSS property names
This prevents jQuery from caching a prefixed property name if provided
directly by the user, e.g. the following code:

	elem.css( "msTransform", "translate(5px, 2px)" );

should not prevent one from from later setting the transition directly:

	elem.css( "transform", "translate(5px, 2px)" );

on a browser not understanding the unprefixed version which is the case
for Safari 8 & transform.

Fixes gh-2015
Closes gh-2298
2015-06-01 14:05:05 +02:00
Oleg Gaidarenko
6df669f0fb Event: remove outdated originalEvent hack
Closes gh-2335
Ref 7475d5debe
2015-05-29 20:32:59 +03:00
Gabriel Schulhof
7475d5debe Event: Remove fake originalEvent from jQuery.Event.simulate
Fixes gh-2300
Closes gh-2303
2015-05-29 19:56:06 +03:00
Oleg Gaidarenko
0705be4750 Event: remove deprecated event aliases
Fixes gh-2286
Closes gh-2287
Ref trac-11733
2015-05-19 13:43:34 +03:00
Oleg Gaidarenko
c074006a69 Event: provide verbose comment for focus(in | out) & rename support prop
Closes gh-2312
2015-05-19 13:43:34 +03:00
Richard McDaniel
2d715940b9 Offset: account for scroll when calculating position
Fixes gh-1708
Close gh-1714
2015-05-12 10:34:57 -04:00
Timmy Willison
c252c5fac2 Core: remove custom ready event
Fixes gh-2264
Close gh-2265
2015-05-12 10:26:21 -04:00
Timmy Willison
20aaed367f Attributes: add SVG class manipulation
- Note: support for SVG is limited in jQuery,
  but this is one area where the cost vs benefit ratio
  was acceptable.

Fixes gh-2199
Close gh-2268
2015-05-12 10:13:46 -04:00
Timmy Willison
56bb677725 Data: remove the expando when there's no more data
Fixes gh-1760
Close gh-2271
2015-05-12 10:09:40 -04:00
Timmy Willison
16713fb609 Tests: fix tests in accordance with new :visible behavior 2015-05-12 09:58:55 -04:00
Timmy Willison
79bcb29132 CSS: fix :visible/:hidden selectors for inline element w/ content
- Reverts behavior from 10399dd, which we never released.
  BR and inline elements are considered visible.
- The possibility of dropping .offsetWidth and .offsetHeight
  was debunked by this perf:
  http://jsperf.com/visible-hidden-and-getclientrects

Fixes gh-2227
Close gh-2281
2015-05-12 09:14:16 -04:00
Richard Gibson
86419b10bf CSS: Ignore the CSS cascade in show()/hide()/etc.
Fixes gh-1767
Fixes gh-2071
Closes gh-2180
2015-05-11 13:00:49 -04:00
Timmy Willison
6d7ef56ed3 Effects: add tests for jQuery.easing._default in Animation and Tween
Ref gh-2219
2015-05-05 11:22:40 -07:00
Timmy Willison
5f2ea40258 Effects: set default easing using jQuery.easing._default
Fixes gh-2219
Close gh-2218
2015-05-05 10:24:20 -07:00
Timmy Willison
0d11c1182f Offset: allow offset setter to throw for disconnected elements
Fixes gh-2114
2015-05-05 08:53:17 -07:00
Timmy Willison
6176567361 Offset: remove ownerDocument check in offset getter
Fixes gh-2115
2015-05-05 08:31:39 -07:00
Arthur Stolyar
1617479fcf Offset: Fix .offset() to correctly work with ShadowDOM
Fixes gh-1784
Close gh-2043
2015-05-05 08:16:29 -07:00
Timmy Willison
add85afed5 Selector: add test for jQuery.unique() alias 2015-05-05 07:59:12 -07:00
Timmy Willison
e1090c3d2b Selector: add jQuery.uniqueSort; deprecate jQuery.unique
Fixes gh-2228
2015-05-04 15:27:12 -07:00
Timmy Willison
172cad80ac Data: camelCasing should not ignore case
Fixes gh-2070
2015-05-04 10:49:21 -04:00
Timmy Willison
0e790985a7 Data: always camelCase keys in .data()
- This effectively implements our "Embrace HTML5" option
- Related: http://goo.gl/GcQAtn

Fixes gh-2257
2015-05-04 10:27:30 -04:00
Timmy Willison
2862a07af6 Data: do not include digits when camelCasing
Fixes gh-1751
2015-05-03 08:25:19 -04:00
Oleg Gaidarenko
fac67a9842 Event: remove guard for falsy handler argument of jQuery#on method
Since we don't have this in off method and its a common perception
that this is a rudiment code

Ref gh-2248
Closes gh-2249
2015-05-03 13:28:27 +03:00
Richard Gibson
225bde37c9 Manipulation: Make an HTML interception point
Fixes gh-1747
Closes gh-2203
2015-04-30 13:15:33 -04:00
Richard Gibson
4b27ae16a2 Manipulation: Detect sneaky no-content replaceWith input
Fixes gh-2204
Ref 642e9a4557
Closes gh-1752
Closes gh-2206
2015-04-30 11:36:38 -04:00
Timmy Willison
1541664582 Core: add workaround for iOS JIT error in isArrayLike
Fixes gh-2145
2015-04-29 18:02:45 -04:00
Michał Gołębiowski
ab40725879 Core: Test all factory use cases from intro.js
There is a lot of logic in intro.js; now we test four cases:
1. (implicitly, via QUnit tests) A real browser with window being the global
2. Browserify where there are both global & window variables.
3. Node with jsdom where window is passed manually to the jQuery factory.
4. Pure Node with incorrect window passed; jQuery should throw then.

Previously the second & fourth case was not tested and the third was tested
in a way that interfered with the main test environment.

We now also test if in the Browserify case we're not creating a jQuery global
by default.

Fixes gh-2181
Closes gh-2234
2015-04-27 22:44:47 +02:00
Michał Gołębiowski
ff18d8e206 Tests: Increase QUnit timeout
Android 2.3 is very slow & times out a lot in async tests, they have to be
restarted multiple times to settle. Long test execution is not a huge problem
as Android 2.3 is tested only periodically during the night, unstable tests
are a bigger problem. This might mitigate that.

In a regular scenario almost all tests should pass so increasing the timeout
for all browsers shouldn't have a huge impact on overall test time.

Closes gh-2232
2015-04-27 20:27:05 +02:00
Richard Gibson
002240a6eb Deferred: Always handle progress callbacks before done/fail
Fixes gh-2013
Fixes gh-2010
Closes gh-2210
2015-04-22 15:24:37 -04:00
Timmy Willison
2905961bf7 Attributes: revert returning null for non-existant attributes
Ref https://github.com/jquery/jquery/issues/2118
2015-03-30 15:32:54 -04:00
Dave Methvin
7b09235cee Wrap: Support .unwrap( selector) for selective unwrapping
Fixes gh-1744
Closes gh-2003
2015-03-30 13:38:40 -04:00
Michał Gołębiowski
95c0a10e15 Data: Drop the tests relying on applets
BrowserStack regularly has outdated Java in their IE instances causing our
data tests to hang & give no output. Skip the tests that create applets,
applets are treated in the same way as an embed elements which we're already
testing.

Fixes gh-1938
Closes gh-2166
2015-03-25 23:01:57 +01:00
Michał Gołębiowski
62ae2d0fb7 Offset: Round offset value for the sake of floating errors
IE10+ may return not exactly the offset.top value set in an offset callback
if parent has fractional top offset itself. Checking for being close to the
desired result fixes the test error.

Fixes gh-2147
2015-03-23 18:14:37 +01:00
Richard Gibson
555a50d340 Deferred: Backwards-compatible standards interoperability
Fixes gh-1722
Closes gh-1996
2015-03-20 02:00:17 -04:00
Richard Gibson
e22ef5d901 Tests: Expand CSS relative adjustment tolerance for IE
Ref 48be675200
2015-03-16 23:49:48 -04:00
Richard Gibson
48be675200 Tests: Fix CSS relative adjustment test for round-down browsers
Ref 9b03f6df88
2015-03-16 23:05:36 -04:00
Timmy Willison
7632b7454b Attributes: revert returning null for non-elements 2015-03-16 14:11:38 -04:00
Timmy Willison
5dc4616ca0 Attributes: fix failing test for new return value 2015-03-16 11:52:05 -04:00
Winston Howes
aaeed53e9f Attributes: return null when attribute does not exist
Fixes gh-2118
Close gh-2129
2015-03-16 11:21:24 -04:00
Rick Waldron
332fd941b4 Data: restore explicit data removal of private data in cleanData.
Fixes gh-2127
Closes gh-2132
2015-03-09 13:51:16 -04:00
Mr21
9b03f6df88 CSS: Support relative adjustment in any applicable unit
Fixes gh-1711
Closes gh-2011
2015-03-09 12:00:10 -04:00
Stephen Edgar
34da7d5529 Build: remove deprecated JSHint options
JSHint no longer supports `onevar`, `smarttabs` or `trailing` options.

Closes gh-2029
2015-03-08 06:30:01 +03:00
Rick Waldron
d702b7637a Data: move element cache to element[expando]
- avoid explicit data.discard() cleanup calls
- explicitly remove the data.events property, only when private data exists
- reduces code footprint

Fixes gh-1734
Close gh-1428
2015-03-04 17:26:47 -05:00
Oleg Gaidarenko
8356281bed Tests: make top of the HTML suite compliant with style guide
See http://contribute.jquery.org/style-guide/html/

Closes gh-2098
2015-02-19 11:30:57 +03:00
Oleg Gaidarenko
9d1b989f20 Ajax: remove deprecated extensions from ajax promise
Fixes gh-2084
Closes gh-2092
2015-02-17 09:58:45 +03:00
Oleg Gaidarenko
8b6aeae52d Build: fix broken assertions caused by QUnit update
QUnit update broke couple traversing and manipulation tests, since new qunit
added another form to the test-suite while some of
jQuery selectors weren't specific

Ref 2d5c5d213f
2015-02-15 02:22:09 +03:00