Commit Graph

6385 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
0b2c36adb4
Build: Update Sizzle from 2.3.3 to 2.3.4
Fixes gh-1756
Fixes gh-4170
Fixes gh-4249
Closes gh-4345
2019-04-09 09:50:45 +02:00
Michał Gołębiowski-Owczarek
00a9c2e5f4 CSS: Don't automatically add "px" to properties with a few exceptions
Fixes gh-2795
Closes gh-4055
Ref gh-4009
2019-04-08 19:26:08 +02:00
Michał Gołębiowski-Owczarek
c4f2fa2fb3 Build: Update the master version to 4.0.0-pre 2019-04-08 18:21:36 +02:00
Michał Gołębiowski-Owczarek
2e4b79ab8f
Tests: Fix the core-js polyfill inclusion method
core-js 3 no longer includes a built file in the bundle but core-js-bundle
does.

Closes gh-4342
Ref gh-4341
2019-04-04 23:45:57 +02:00
Michał Gołębiowski-Owczarek
fea7a2a328
Build: Update Sinon from 2.3.7 to 7.3.1, other updates
Closes gh-4341
2019-04-04 16:53:38 +02:00
Timmy Willison
9b9fca45f3
Update README.md 2019-04-02 12:31:43 -04:00
Michał Gołębiowski-Owczarek
a2a73db99c
Tests: Make Android Browser 4.0-4.3 dimensions tests green
Android Browser disregards td's box-sizing, treating it like it was content-box.
Unlike in IE, offsetHeight shares the same issue so there's no easy way to
workaround the issue without incurring high size penalty. Let's at least check
we get the size as the browser sees it.

Also, fix the nearby support comment syntax.

Closes gh-4335
2019-03-27 15:47:33 +01:00
Michał Gołębiowski-Owczarek
4455f8db4e
Tests: Make Android Browser 4.0-4.3 AJAX tests green
Android Browser versions provided by BrowserStack fail the "prototype collision
(constructor)" test while locally fired emulators don't, even when they connect
to TestSwarm. Just skip the test there to avoid a red build.

Closes gh-4334
2019-03-27 15:46:20 +01:00
buddh4
005040379d Core: Preserve CSP nonce on scripts with src attribute in DOM manipulation
Fixes gh-4323
Closes gh-4328
2019-03-25 18:14:24 +01:00
Richard Gibson
fe5f04de8f Event: Prevent leverageNative from double-firing focusin
Also, reduce size.

Closes gh-4329
Ref gh-4279
2019-03-25 18:12:08 +01:00
Michał Gołębiowski-Owczarek
753d591aea
Core: Prevent Object.prototype pollution for $.extend( true, ... )
Closes gh-4333
2019-03-25 17:57:30 +01:00
Richard Gibson
669f720edc Event: Leverage native events for focus/blur/click; propagate additional data
Summary of the changes/fixes:
1. Trigger checkbox and radio click events identically (cherry-picked from
   b442abacbb that was reverted before).
2. Manually trigger a native event before checkbox/radio handlers.
3. Add test coverage for triggering namespaced native-backed events.
4. Propagate extra parameters passed when triggering the click event to
   the handlers.
5. Intercept and preserve namespaced native-backed events.
6. Leverage native events for focus and blur.
7. Accept that focusin handlers may fire more than once for now.

Fixes gh-1741
Fixes gh-3423
Fixes gh-3751
Fixes gh-4139
Closes gh-4279
Ref gh-1367
Ref gh-3494
2019-03-20 16:40:16 +01:00
Michał Gołębiowski-Owczarek
a0abd15b9e
CSS: Avoid forcing a reflow in width/height getters unless necessary
Fixes gh-4322
Closes gh-4325
Ref gh-3991
Ref gh-4010
Ref gh-4185
Ref gh-4187
2019-03-18 18:44:43 +01:00
Michał Gołębiowski-Owczarek
0ec25abba2
Build: Run the basic test suite in jsdom
The basic test suite is now run in jsdom on all supported Node.js versions
(8, 10 & 11 as of now).

Closes gh-4310
2019-03-11 20:03:54 +01:00
Michał Gołębiowski-Owczarek
84b6a0beb1
Build: Remove manual QUnit fixture resetting
It was needed when QUnit 1.x one used but we've since upgraded to QUnit 2.x.

Closes gh-4312
Ref gh-4307
2019-03-11 17:25:48 +01:00
Michał Gołębiowski-Owczarek
ca9356ecce
Build: Make Promises/A+ tests use the dot reporter instead of the default
The default reporter is very verbose as it prints all the test names it
encounters. We already use the dot reporter for Karma tests.

Closes gh-4313
2019-03-11 16:06:17 +01:00
Michał Gołębiowski-Owczarek
6ced2639b5
Build: Update QUnit from 1.23.1 to 2.9.2
Closes gh-4307
2019-03-04 20:10:21 +01:00
Michał Gołębiowski-Owczarek
16ad9889f5
Build: Run Karma browser tests on Node.js 10 instead of 8
Node.js 10 has been in Active LTS since 2018-04-24 and Node.js 8 is now in
maintenance mode.

See https://github.com/nodejs/Release for more details.

Closes gh-4311
2019-03-04 19:05:09 +01:00
Michał Gołębiowski-Owczarek
9cb124ed00
Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test
So far, we've been testing that jQuery element iteration works with polyfilled
Symbol & transpiled for-of via a Node test with jsdom with the Symbol global
removed. Unfortunately, jsdom now requires Symbol to be present for its internal
functionality so such a test is no longer possible. Instead, it's been migrated
to an iframe test with transpiled JavaScript.

This PR also enables us to use ECMAScript 2017 or newer in Node.js code.

Closes gh-4305
2019-03-04 18:30:51 +01:00
Michał Gołębiowski-Owczarek
c10945d0e1
Build: Remove obsolete globals from ESLint configuration
We had quite a few obsolete globals declared in various ESLint config files. We also no longer allow to rely on the `noGlobal` & `jQuery` globals in the built file which is not needed.

Closes gh-4301
2019-02-19 13:20:57 +01:00
abnud1
8751e9ef86 Build: Update most dependencies
The only packages not fully updated are:
- qunitjs & karma-qunit as that's a QUnit 2.x update that will require some
changes and we'll do that later
- jsdom as we need to first rewrite the test with the Symbol polyfill - newer
jsdom versions don't work with such a hacked Symbol instance
- sinon as the v2 -> v7 upgrade requires to update our unit tests
- uglify-js & grunt-contrib-uglify as latest uglify-js versions slightly worsen
the minified gzipped size

Closes gh-4227
Closes gh-4228
Closes gh-4230
Closes gh-4232
2019-02-19 13:05:09 +01:00
abnud1
c349818742 Build: Update test code for compatibility with QUnit 2.x (#4297)
Also, run `grunt npmcopy` to sync the "external" directory with dependencies
from package.json. For example, the Sinon library version didn't match.

Ref gh-4234
Closes gh-4297
2019-02-18 19:03:26 +01:00
Michał Gołębiowski-Owczarek
da44ff39c2
Build: Advise to create test cases on JS Bin or CodePen, drop JSFiddle
JSFiddle doesn't support IE (even 11) anymore so we shouldn't advise users
to use it to create test cases. To make people have a choice, add CodePen
to the list.

Also, link to specific starter templates so that novices don't need to spend
time thinking how to set up the basic structure.

Closes gh-4289
2019-01-29 14:13:53 +01:00
Michał Gołębiowski-Owczarek
5bdc85b82b
Core: Support passing nonce through jQuery.globalEval
Fixes gh-4278
Closes gh-4280
Ref gh-3541
Ref gh-4269
2019-01-21 18:42:39 +01:00
Michał Gołębiowski-Owczarek
e4de8b4626
Manipulation: Respect script nomodule attribute in DOM manipulation
PR #3869 added support for `<script type="module">` & some support for
the `nomodule` attribute but with no tests for `nomodule` and with the
attribute only respected on inline scripts. This commit adds support for
source-based scripts as well. It also adds tests for `nomodule`, including
making sure legacy browsers execute such scripts as they'd natively do - that's
the whole point of `nomodule` scripts, after all.

Fixes gh-4281
Closes gh-4282
Ref gh-3871
Ref gh-3869
2019-01-21 18:34:40 +01:00
Michał Gołębiowski-Owczarek
543d3d24ea Tests: Skip nonce tests in old iOS/Android as well
Old iOS & Android Browser versions support script-src but not nonce, making the
nonce test impossible to run. Browsers not supporting CSP at all are not
a problem as they'll skip script-src restrictions completely.

Ref gh-3541
Ref gh-4269
Ref c7c2855ed1
2019-01-14 19:49:28 +01:00
Michał Gołębiowski-Owczarek
c7c2855ed1
Core: Preserve CSP nonce on scripts in DOM manipulation
Fixes gh-3541
Closes gh-4269
2019-01-14 19:29:54 +01:00
Michał Gołębiowski-Owczarek
9cb162f6b6
Tests: Exclude Android 4.x from repeated header names test
Android Browser only returns the last value for each header so there's no way
for jQuery get all parts.

Closes gh-4259
Ref gh-3403
Ref gh-4173
2018-12-14 22:06:44 +01:00
Richard Gibson
13de7c9ede
Manipulation: Restore _evalUrl jQuery.ajax calls to dataType: script
IE and iOS <10 XHR transport does not succeed on data: URIs
Ref gh-4243
Ref gh-4126
Closes gh-4258
2018-12-13 12:54:39 -05:00
Richard Gibson
c2026b117d Manipulation: Only evaluate HTTP-successful script src
Fixes gh-4126
Closes gh-4243
2018-12-12 17:21:24 +01:00
Marja Hölttä
4ffb1df8e4 Core: Tiny efficiency fix to jQuery.extend / jQuery.fn.extend (#4246)
Read target[name] only when it's needed.

In addition to doing the property read-only when needed, this
avoids a slow path in V8 (see the issue for more details).

Fixes gh-4245
Closes gh-4246
2018-12-12 17:13:18 +01:00
Timmy Willison
13f3cd1611
Tests: fix dimensions tests in testswarm
Close gh-4248
2018-12-03 12:03:04 -05:00
Timmy Willison
315199c156
Dimensions: fall back to offsetWidth/Height for border-box in IE
- Use getClientRects() to explicitly detect hidden/disconnected
  elements

Close gh-4223
Fixes gh-4102
2018-11-27 14:28:59 -05:00
Timmy Willison
13d0be101f
Tests: add IE launcher for debugging IE11 on Windows 2018-11-27 14:28:57 -05:00
Timmy Willison
b8195fb94c
Tests: fix ajax test failure; add to header instead of replace 2018-11-26 12:46:58 -05:00
Andrei Fangli
e0d9411569 Ajax: Fix getResponseHeader(key) for IE11
- getResponseHeader(key) combines all header values for the provided key into a
single result where values are concatenated by ', '. This does not happen for
IE11 since multiple values for the same header are returned on separate lines.
This makes the function only return the last value of the header for IE11.
- Updated ajax headers test to better cover Object.prototype collisions

Close gh-4173
Fixes gh-3403
2018-11-26 12:00:41 -05:00
Michał Gołębiowski-Owczarek
3ac907864c Tests: Add Safari 12 & iOS 12 results 2018-11-12 18:55:47 +01:00
Michał Gołębiowski-Owczarek
bc8aedf042 Tests: Move latest Firefox before Firefox 60 test results 2018-11-12 18:54:15 +01:00
Saptak Sengupta
9b77def560 Core: Recognize Shadow DOM in attachment checks
Allow `isAttached` to check Shadow DOM for attachment.

Fixes gh-3504
Closes gh-3996
Ref gh-3977
2018-11-09 12:15:31 +01:00
Michał Gołębiowski-Owczarek
549b32a05a Build: Run tests on Node.js 11 as well 2018-10-31 15:50:09 +01:00
Michał Gołębiowski-Owczarek
354f6036f2
CSS: Don't read styles.position in the width/height cssHook unless necessary
Current width/height cssHook reads the computed position style even if not
necessary as the browser passes the scrollboxSize support test. That has been
changed.

This commit also makes the scrollboxSize support test in line with all others
(i.e. only return true or false) and changes the variable name in the hook
to make the code clearer.

Fixes gh-4185
Closes gh-4187
2018-10-08 18:25:15 +02:00
Michał Gołębiowski-Owczarek
dae5f3ce3d
Tests: Add tests for not auto-appending "px" to CSS Grid properties
Ref gh-4007
Ref gh-4028
Closes gh-4165
2018-10-03 12:00:52 +02:00
Richard Gibson
dfa92ccead
Tests: Allow Karma to load unminfied source
Closes gh-4128
2018-09-07 10:14:01 -04:00
Bert Zhang
f997241f00 CSS: Don't auto-append "px" to possibly-unitless CSS grid properties
This commit adds some CSS grid-related properties to jQuery.cssNumber.

Fixes gh-4007
2018-08-29 15:54:27 +02:00
Jason Bedard
6153eb0fd4
Tests: use width style instead of SVG width attribute (#4157)
The SVG width attribute seems to not support border-box in iOS7.

Closes gh-4155
2018-08-20 21:13:33 -07:00
Michał Gołębiowski-Owczarek
c9aae3565e Tests: Account for the iPad with iOS 11.3 user agent
The user agent of the iPad with iOS 11.3 on BrowserStack is missing the "iPhone"
part in the "iPhone OS 11_3" part. This commit makes the iOS regex accept such
(probably?) malformed UAs.
2018-08-01 15:12:30 +02:00
Michał Gołębiowski-Owczarek
ae82e85e64
Tests: Skip module tests in Edge
Edge sometimes doesn't execute module scripts. It needs to be investigated why
but for now, we're skipping the test to make our tests more stable.

Closes gh-4140
2018-07-30 18:41:08 +02:00
Michał Gołębiowski-Owczarek
063c1f2ca3 Tests: Make support tests pass in Firefox 52
jQuery Core now supports Firefox ESR.
2018-07-30 18:06:08 +02:00
Timmy Willison
7869f83ddd
Docs: add gitter badge to README.md
Close gh-4138
2018-07-27 13:00:28 -04:00
Richard Gibson
979809c5a8
Manipulation: Properly detect HTML elements with single-character names
Fixes gh-4124
Closes gh-4125
2018-07-13 00:35:08 -04:00