]> source.dussan.org Git - jquery.git/log
jquery.git
5 years agoSelector: Leverage the :scope pseudo-class where possible
Michał Gołębiowski-Owczarek [Mon, 19 Aug 2019 16:41:03 +0000 (18:41 +0200)]
Selector: Leverage the :scope pseudo-class where possible

The `:scope` pseudo-class[1] has surprisingly good browser support: Chrome,
Firefox & Safari have supported if for a long time; only IE & Edge lack support.
This commit leverages this pseudo-class to get rid of the ID hack in most cases.
Adding a temporary ID may cause layout thrashing which was reported a few times
in [the past.

We can't completely eliminate the ID hack in modern browses as sibling selectors
require us to change context to the parent and then `:scope` stops applying to
what we'd like. But it'd still improve performance in the vast majority of
cases.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:scope

Fixes gh-4453
Closes gh-4454
Ref gh-4332
Ref jquery/sizzle#405

5 years agoTests: Fix a comment in testinit.js
Michał Gołębiowski-Owczarek [Mon, 19 Aug 2019 16:36:21 +0000 (18:36 +0200)]
Tests: Fix a comment in testinit.js

A copied comment line was accidentally left out above the line defining
`QUnit.jQuerySelectorsPos`, making the sentence nonsense. This commit removes
that line.

Closes gh-4458

5 years agoTests: update npo.js and include unminified source instead
Timmy Willison [Mon, 12 Aug 2019 16:06:52 +0000 (12:06 -0400)]
Tests: update npo.js and include unminified source instead

Close gh-4446
Ref gh-4445

5 years agoSelector: Bring back querySelectorAll shortcut usage
Michał Gołębiowski-Owczarek [Fri, 9 Aug 2019 10:42:05 +0000 (12:42 +0200)]
Selector: Bring back querySelectorAll shortcut usage

Due to a faulty IE 8 workaround removal, the fast path qSA mode was skipped
when jQuery's find was called on an element node - i.e. in most cases. 😱

Ref gh-4395
Closes gh-4452

5 years agoSelector: Inline Sizzle into the selector module
Michał Gołębiowski-Owczarek [Mon, 29 Jul 2019 19:14:46 +0000 (21:14 +0200)]
Selector: Inline Sizzle into the selector module

This commit removes Sizzle from jQuery, inlining its code & removing obsolete
workarounds where applicable.

The selector-native module has been removed. Further work on the selector
module may decrease the size enough that it will no longer be necessary. If
it turns out it's still useful, we'll reinstate it but the code will look
different anyway as we'll want to share as much code as possible with
the existing selector module.

The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are
sorted by their first contributions to either of the two repositories.

The commit reduces the gzipped jQuery size by 1460 bytes compared to master.

Closes gh-4395

5 years agoSelector: Port Sizzle tests to jQuery
Michał Gołębiowski-Owczarek [Wed, 26 Jun 2019 19:39:10 +0000 (21:39 +0200)]
Selector: Port Sizzle tests to jQuery

Apart from porting most Sizzle tests to jQuery (mostly to its selector module),
this commit fixes selector-native so that a jQuery custom compilation that
excludes Sizzle passes all tests as well.

Closes gh-4406

5 years agoBuild: ESLint: forbid unused function parameters
Michał Gołębiowski-Owczarek [Mon, 13 May 2019 20:25:11 +0000 (22:25 +0200)]
Build: ESLint: forbid unused function parameters

This commit requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with `_`.

This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.

Unused AMD dependencies have been removed as part of this commit.

Closes gh-4381

5 years agoBuild: Fix the regex parsing AMD var-modules (#4389)
Michał Gołębiowski-Owczarek [Mon, 13 May 2019 19:55:45 +0000 (21:55 +0200)]
Build: Fix the regex parsing AMD var-modules (#4389)

The previous regex caused the final jQuery binary to have syntax errors for
var-modules with names starting with "return". For example, the following module
wouldn't work when the file is named `returnTrue.js`:

```js
define( function() {
"use strict";
return function returnTrue() {
return true;
};
} );
```

Closes gh-4389

5 years agoCore: Remove IE-specific support tests, rely on document.documentMode
Michał Gołębiowski-Owczarek [Mon, 13 May 2019 19:39:56 +0000 (21:39 +0200)]
Core: Remove IE-specific support tests, rely on document.documentMode

Also, update some tests to IE-sniff when deciding whether
to skip a test.

Fixes gh-4386
Closes gh-4387

5 years agoTraversing: Fix `contents()` on `<object>`s with children in IE
Michał Gołębiowski-Owczarek [Wed, 8 May 2019 08:12:36 +0000 (10:12 +0200)]
Traversing: Fix `contents()` on `<object>`s with children in IE

The original fix didn't account for the fact that in IE `<object>` elements
with no `data` attribute have an object `contentDocument`. The fix leverages
the fact that this special object has a null prototype.

Closes gh-4390
Ref gh-4384
Ref gh-4385

5 years agoTraversing: Fix `contents()` on `<object>`s with children
Pat O'Callaghan [Mon, 6 May 2019 17:23:00 +0000 (18:23 +0100)]
Traversing: Fix `contents()` on `<object>`s with children

Fixes gh-4384
Closes gh-4385

5 years agoEffect: Fix a unnecessary conditional statement in .stop()
Wonseop Kim [Wed, 1 May 2019 12:57:55 +0000 (21:57 +0900)]
Effect: Fix a unnecessary conditional statement in .stop()

Because of the above conditional, the 'type' variable has a value of type
'string' or undefined. Therefore, boolean comparisons for 'type' variable
is always unnecessary because it return true. The patch removed the
unnecessary conditional statement.

Fixes gh-4374
Closes gh-4375

5 years agoBuild: Fix AMD dependencies in curCSS
Michał Gołębiowski-Owczarek [Tue, 30 Apr 2019 19:21:18 +0000 (21:21 +0200)]
Build: Fix AMD dependencies in curCSS

A leftover `rboxStyle` was left in the wrapper parameters but not in the
dependency array, causing `getStyles` to be undefined in AMD mode.

Since `rboxStyle` is no longer used, it's now removed.

Ref gh-4347
Closes gh-4380

5 years agoCore: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS
Michał Gołębiowski-Owczarek [Mon, 29 Apr 2019 20:56:09 +0000 (22:56 +0200)]
Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS

Also, update support comments format to match format described in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
with the change from:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379
(open-ended ranges end with `+`).

Fixes gh-3950
Fixes gh-4299
Closes gh-4347

5 years agoTests: Restrict an event test fallback to TestSwarm
Richard Gibson [Tue, 16 Apr 2019 04:47:02 +0000 (00:47 -0400)]
Tests: Restrict an event test fallback to TestSwarm

Closes gh-4357

5 years agoCore: Remove deprecated jQuery APIs
Michał Gołębiowski-Owczarek [Mon, 29 Apr 2019 20:04:52 +0000 (22:04 +0200)]
Core: Remove deprecated jQuery APIs

Fixes gh-4056
Closes gh-4364

5 years agoTests: Fix the new focusin/focusout test in IE
Michał Gołębiowski-Owczarek [Mon, 29 Apr 2019 19:40:36 +0000 (21:40 +0200)]
Tests: Fix the new focusin/focusout test in IE

In IE, focus & blur events fire asynchronously, the test now accounts for that.

Ref gh-4362

5 years agoEvent: Stop shimming focusin & focusout events
Michał Gołębiowski-Owczarek [Mon, 29 Apr 2019 19:13:36 +0000 (21:13 +0200)]
Event: Stop shimming focusin & focusout events

Latest versions of all browsers now implement focusin & focusout natively
and they all converged on a common event order so it doesn't make much sense
for us to normalize it to a different order anymore.

Note that it means we no longer guarantee that focusin fires before focus
and focusout before blur.

Fixes gh-4300
Closes gh-4362

5 years agoData: Separate data & css/effects camelCase implementations
Michał Gołębiowski-Owczarek [Mon, 29 Apr 2019 19:06:53 +0000 (21:06 +0200)]
Data: Separate data & css/effects camelCase implementations

The camelCase implementation used by the data module no longer turns `-ms-foo`
into `msFoo` but to `MsFoo` now. This is because `data` is supposed to be
a generic utility not specifically bound to CSS use cases.

Fixes gh-3355
Closes gh-4365

5 years agoEvent: Prevent leverageNative from registering duplicate dummy handlers
Richard Gibson [Mon, 29 Apr 2019 17:26:53 +0000 (13:26 -0400)]
Event: Prevent leverageNative from registering duplicate dummy handlers

(cherry-picked from 6c1e7dbf7311ae7c0c31ba335fe216185047ae5f)

Closes gh-4353

5 years agoEvent: Fix handling of multiple async focus events
Richard Gibson [Mon, 29 Apr 2019 17:18:08 +0000 (13:18 -0400)]
Event: Fix handling of multiple async focus events

(cherry-picked from 24d71ac70406f522fc1b09bf7c4025251ec3aee6)

Fixes gh-4350
Closes gh-4354

5 years agoBuild: Test on Node.js 12, stop testing on Node.js 6 & 11
Michał Gołębiowski-Owczarek [Tue, 23 Apr 2019 20:44:15 +0000 (22:44 +0200)]
Build: Test on Node.js 12, stop testing on Node.js 6 & 11

Closes gh-4369

5 years agoBuild: Fix unresolved jQuery reference in finalPropName
Michał Gołębiowski-Owczarek [Wed, 17 Apr 2019 17:56:25 +0000 (19:56 +0200)]
Build: Fix unresolved jQuery reference in finalPropName

Also, prevent further similar breakages by changing our ESLint configuration
to disallow relying on a global jQuery object in AMD modules.

Fixes gh-4358
Closes gh-4361

5 years agoRelease: update AUTHORS.txt
Timmy Willison [Tue, 9 Apr 2019 21:17:10 +0000 (17:17 -0400)]
Release: update AUTHORS.txt

5 years agoBuild: Update Sizzle from 2.3.3 to 2.3.4
Michał Gołębiowski-Owczarek [Tue, 9 Apr 2019 07:50:45 +0000 (09:50 +0200)]
Build: Update Sizzle from 2.3.3 to 2.3.4

Fixes gh-1756
Fixes gh-4170
Fixes gh-4249
Closes gh-4345

5 years agoCSS: Don't automatically add "px" to properties with a few exceptions 4055/head
Michał Gołębiowski-Owczarek [Mon, 23 Apr 2018 19:00:14 +0000 (21:00 +0200)]
CSS: Don't automatically add "px" to properties with a few exceptions

Fixes gh-2795
Closes gh-4055
Ref gh-4009

5 years agoBuild: Update the master version to 4.0.0-pre
Michał Gołębiowski-Owczarek [Mon, 8 Apr 2019 16:21:36 +0000 (18:21 +0200)]
Build: Update the master version to 4.0.0-pre

5 years agoTests: Fix the core-js polyfill inclusion method
Michał Gołębiowski-Owczarek [Thu, 4 Apr 2019 21:45:57 +0000 (23:45 +0200)]
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

5 years agoBuild: Update Sinon from 2.3.7 to 7.3.1, other updates
Michał Gołębiowski-Owczarek [Thu, 4 Apr 2019 14:53:38 +0000 (16:53 +0200)]
Build: Update Sinon from 2.3.7 to 7.3.1, other updates

Closes gh-4341

5 years agoUpdate README.md
Timmy Willison [Tue, 2 Apr 2019 16:31:43 +0000 (12:31 -0400)]
Update README.md

5 years agoTests: Make Android Browser 4.0-4.3 dimensions tests green
Michał Gołębiowski-Owczarek [Wed, 27 Mar 2019 14:47:33 +0000 (15:47 +0100)]
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

5 years agoTests: Make Android Browser 4.0-4.3 AJAX tests green
Michał Gołębiowski-Owczarek [Wed, 27 Mar 2019 14:46:20 +0000 (15:46 +0100)]
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

5 years agoCore: Preserve CSP nonce on scripts with src attribute in DOM manipulation 4328/head
buddh4 [Tue, 19 Mar 2019 21:40:30 +0000 (22:40 +0100)]
Core: Preserve CSP nonce on scripts with src attribute in DOM manipulation

Fixes gh-4323
Closes gh-4328

5 years agoEvent: Prevent leverageNative from double-firing focusin
Richard Gibson [Mon, 25 Mar 2019 17:12:08 +0000 (13:12 -0400)]
Event: Prevent leverageNative from double-firing focusin

Also, reduce size.

Closes gh-4329
Ref gh-4279

5 years agoCore: Prevent Object.prototype pollution for $.extend( true, ... )
Michał Gołębiowski-Owczarek [Mon, 25 Mar 2019 16:57:30 +0000 (17:57 +0100)]
Core: Prevent Object.prototype pollution for $.extend( true, ... )

Closes gh-4333

5 years agoEvent: Leverage native events for focus/blur/click; propagate additional data
Richard Gibson [Wed, 11 Jan 2017 22:19:30 +0000 (15:19 -0700)]
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
   b442abacbb8464f0165059e8da734e3143d0721f 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

5 years agoCSS: Avoid forcing a reflow in width/height getters unless necessary
Michał Gołębiowski-Owczarek [Mon, 18 Mar 2019 17:44:43 +0000 (18:44 +0100)]
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

5 years agoBuild: Run the basic test suite in jsdom
Michał Gołębiowski-Owczarek [Mon, 11 Mar 2019 19:03:54 +0000 (20:03 +0100)]
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

5 years agoBuild: Remove manual QUnit fixture resetting
Michał Gołębiowski-Owczarek [Mon, 11 Mar 2019 16:25:48 +0000 (17:25 +0100)]
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

5 years agoBuild: Make Promises/A+ tests use the dot reporter instead of the default
Michał Gołębiowski-Owczarek [Mon, 11 Mar 2019 15:06:17 +0000 (16:06 +0100)]
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

5 years agoBuild: Update QUnit from 1.23.1 to 2.9.2 4314/head
Michał Gołębiowski-Owczarek [Mon, 4 Mar 2019 19:10:21 +0000 (20:10 +0100)]
Build: Update QUnit from 1.23.1 to 2.9.2

Closes gh-4307

5 years agoBuild: Run Karma browser tests on Node.js 10 instead of 8
Michał Gołębiowski-Owczarek [Mon, 4 Mar 2019 18:05:09 +0000 (19:05 +0100)]
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

5 years agoBuild: Update jsdom; migrate a test with Symbol polyfill to an iframe test
Michał Gołębiowski-Owczarek [Mon, 4 Mar 2019 17:30:51 +0000 (18:30 +0100)]
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

5 years agoBuild: Remove obsolete globals from ESLint configuration
Michał Gołębiowski-Owczarek [Tue, 19 Feb 2019 12:20:57 +0000 (13:20 +0100)]
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

5 years agoBuild: Update most dependencies
abnud1 [Sun, 11 Nov 2018 04:52:13 +0000 (06:52 +0200)]
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

5 years agoBuild: Update test code for compatibility with QUnit 2.x (#4297)
abnud1 [Mon, 18 Feb 2019 18:02:38 +0000 (19:02 +0100)]
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

5 years agoBuild: Advise to create test cases on JS Bin or CodePen, drop JSFiddle
Michał Gołębiowski-Owczarek [Tue, 29 Jan 2019 13:13:53 +0000 (14:13 +0100)]
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

5 years agoCore: Support passing nonce through jQuery.globalEval
Michał Gołębiowski-Owczarek [Mon, 21 Jan 2019 17:42:39 +0000 (18:42 +0100)]
Core: Support passing nonce through jQuery.globalEval

Fixes gh-4278
Closes gh-4280
Ref gh-3541
Ref gh-4269

5 years agoManipulation: Respect script nomodule attribute in DOM manipulation
Michał Gołębiowski-Owczarek [Mon, 21 Jan 2019 17:34:40 +0000 (18:34 +0100)]
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

5 years agoTests: Skip nonce tests in old iOS/Android as well
Michał Gołębiowski-Owczarek [Mon, 14 Jan 2019 18:49:28 +0000 (19:49 +0100)]
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 c7c2855ed13f23322c4064407c1ed84561b95738

5 years agoCore: Preserve CSP nonce on scripts in DOM manipulation
Michał Gołębiowski-Owczarek [Mon, 14 Jan 2019 18:29:54 +0000 (19:29 +0100)]
Core: Preserve CSP nonce on scripts in DOM manipulation

Fixes gh-3541
Closes gh-4269

5 years agoTests: Exclude Android 4.x from repeated header names test
Michał Gołębiowski-Owczarek [Fri, 14 Dec 2018 21:06:44 +0000 (22:06 +0100)]
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

5 years agoManipulation: Restore _evalUrl jQuery.ajax calls to dataType: script
Richard Gibson [Thu, 13 Dec 2018 17:54:39 +0000 (12:54 -0500)]
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

5 years agoManipulation: Only evaluate HTTP-successful script src
Richard Gibson [Wed, 12 Dec 2018 16:21:24 +0000 (11:21 -0500)]
Manipulation: Only evaluate HTTP-successful script src

Fixes gh-4126
Closes gh-4243

5 years agoCore: Tiny efficiency fix to jQuery.extend / jQuery.fn.extend (#4246)
Marja Hölttä [Wed, 12 Dec 2018 16:13:18 +0000 (17:13 +0100)]
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

5 years agoTests: fix dimensions tests in testswarm
Timmy Willison [Mon, 3 Dec 2018 17:03:04 +0000 (12:03 -0500)]
Tests: fix dimensions tests in testswarm

Close gh-4248

5 years agoDimensions: fall back to offsetWidth/Height for border-box in IE
Timmy Willison [Sun, 11 Nov 2018 22:34:43 +0000 (17:34 -0500)]
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

5 years agoTests: add IE launcher for debugging IE11 on Windows
Timmy Willison [Mon, 12 Nov 2018 16:49:44 +0000 (11:49 -0500)]
Tests: add IE launcher for debugging IE11 on Windows

5 years agoTests: fix ajax test failure; add to header instead of replace
Timmy Willison [Mon, 26 Nov 2018 17:46:58 +0000 (12:46 -0500)]
Tests: fix ajax test failure; add to header instead of replace

5 years agoAjax: Fix getResponseHeader(key) for IE11
Andrei Fangli [Mon, 26 Nov 2018 17:00:41 +0000 (19:00 +0200)]
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

5 years agoTests: Add Safari 12 & iOS 12 results
Michał Gołębiowski-Owczarek [Mon, 12 Nov 2018 17:55:47 +0000 (18:55 +0100)]
Tests: Add Safari 12 & iOS 12 results

5 years agoTests: Move latest Firefox before Firefox 60 test results
Michał Gołębiowski-Owczarek [Mon, 12 Nov 2018 17:54:15 +0000 (18:54 +0100)]
Tests: Move latest Firefox before Firefox 60 test results

5 years agoCore: Recognize Shadow DOM in attachment checks
Saptak Sengupta [Fri, 9 Nov 2018 11:15:31 +0000 (16:45 +0530)]
Core: Recognize Shadow DOM in attachment checks

Allow `isAttached` to check Shadow DOM for attachment.

Fixes gh-3504
Closes gh-3996
Ref gh-3977

5 years agoBuild: Run tests on Node.js 11 as well
Michał Gołębiowski-Owczarek [Wed, 31 Oct 2018 14:50:09 +0000 (15:50 +0100)]
Build: Run tests on Node.js 11 as well

6 years agoCSS: Don't read styles.position in the width/height cssHook unless necessary
Michał Gołębiowski-Owczarek [Mon, 8 Oct 2018 16:25:15 +0000 (18:25 +0200)]
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

6 years agoTests: Add tests for not auto-appending "px" to CSS Grid properties
Michał Gołębiowski-Owczarek [Wed, 3 Oct 2018 10:00:52 +0000 (12:00 +0200)]
Tests: Add tests for not auto-appending "px" to CSS Grid properties

Ref gh-4007
Ref gh-4028
Closes gh-4165

6 years agoTests: Allow Karma to load unminfied source
Richard Gibson [Fri, 7 Sep 2018 14:14:01 +0000 (10:14 -0400)]
Tests: Allow Karma to load unminfied source

Closes gh-4128

6 years agoCSS: Don't auto-append "px" to possibly-unitless CSS grid properties
Bert Zhang [Wed, 29 Aug 2018 13:54:27 +0000 (06:54 -0700)]
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

6 years agoTests: use width style instead of SVG width attribute (#4157)
Jason Bedard [Tue, 21 Aug 2018 04:13:33 +0000 (21:13 -0700)]
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

6 years agoTests: Account for the iPad with iOS 11.3 user agent
Michał Gołębiowski-Owczarek [Wed, 1 Aug 2018 13:12:30 +0000 (15:12 +0200)]
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.

6 years agoTests: Skip module tests in Edge
Michał Gołębiowski-Owczarek [Mon, 30 Jul 2018 16:41:08 +0000 (18:41 +0200)]
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

6 years agoTests: Make support tests pass in Firefox 52
Michał Gołębiowski-Owczarek [Mon, 30 Jul 2018 16:06:08 +0000 (18:06 +0200)]
Tests: Make support tests pass in Firefox 52

jQuery Core now supports Firefox ESR.

6 years agoDocs: add gitter badge to README.md
Timmy Willison [Fri, 27 Jul 2018 17:00:28 +0000 (13:00 -0400)]
Docs: add gitter badge to README.md

Close gh-4138

6 years ago Manipulation: Properly detect HTML elements with single-character names
Richard Gibson [Fri, 13 Jul 2018 04:35:08 +0000 (00:35 -0400)]
 Manipulation: Properly detect HTML elements with single-character names

Fixes gh-4124
Closes gh-4125

6 years agoTests: Add support test results for Firefox 61+
Michał Gołębiowski-Owczarek [Mon, 9 Jul 2018 16:37:52 +0000 (18:37 +0200)]
Tests: Add support test results for Firefox 61+

Firefox 61 now passes the reliableMarginLeft test.

Closes gh-4122

6 years agoDimensions: fix computing outerWidth on SVGs
Jason Bedard [Thu, 21 Jun 2018 05:09:29 +0000 (22:09 -0700)]
Dimensions: fix computing outerWidth on SVGs

Fixes gh-3964
Closes gh-4096

6 years agoSerialize: jQuery.param: return empty string when given null/undefined
Timmy Willison [Wed, 20 Jun 2018 16:07:44 +0000 (12:07 -0400)]
Serialize: jQuery.param: return empty string when given null/undefined

Fixes gh-2633
Close gh-4108

6 years agoUpdate node dependencies (sans jsdom, qunit, and sinon)
Timmy Willison [Wed, 20 Jun 2018 16:06:45 +0000 (12:06 -0400)]
Update node dependencies (sans jsdom, qunit, and sinon)

Close gh-4098

6 years agoBuild: Remove unnecessary ESLint exception
Ed S [Mon, 18 Jun 2018 16:50:16 +0000 (17:50 +0100)]
Build: Remove unnecessary ESLint exception

The linked-to issue was fixed 2 years ago.

Closes gh-4095

6 years agoTest: enable a spec testing CSS whitespace preserving in Edge 17
Michał Gołębiowski-Owczarek [Mon, 18 Jun 2018 16:48:15 +0000 (18:48 +0200)]
Test: enable a spec testing CSS whitespace preserving in Edge 17

In Edge 14-16 setting a style property to a whitespace-only value resets it to
the default, forcing us to skip a relevant CSS test in Edge. Now that Edge 17
has fixed the issue we can re-enable this test there.

Ref gh-3204
Closes gh-4101

6 years agoMisc: Add config for lockbot
Dave Methvin [Tue, 8 May 2018 20:55:14 +0000 (16:55 -0400)]
Misc: Add config for lockbot

6 years agoCSS: Don't auto-append "px" to CSS variables (#4064)
Michał Gołębiowski-Owczarek [Mon, 4 Jun 2018 16:08:06 +0000 (18:08 +0200)]
CSS: Don't auto-append "px" to CSS variables (#4064)

Fixes gh-4063
Closes gh-4064

6 years agoREADME: Add FOSSA license scan status badge
Kris Borchers [Tue, 15 May 2018 09:12:34 +0000 (11:12 +0200)]
README: Add FOSSA license scan status badge

6 years agosquash! Set attributes all at once, src last
Dave Methvin [Thu, 8 Mar 2018 01:09:09 +0000 (20:09 -0500)]
squash! Set attributes all at once, src last

6 years agoAjax: Allow custom attributes when script transport is used
Dave Methvin [Tue, 12 Sep 2017 16:40:00 +0000 (12:40 -0400)]
Ajax: Allow custom attributes when script transport is used

Fixes gh-3028
Ref gh-2612

Useful, for example, to add `nonce`, `integrity`, or `crossorigin`.

6 years agoMisc: Update license prolog/epilog to placate Github checker
Dave Methvin [Tue, 17 Apr 2018 21:59:04 +0000 (17:59 -0400)]
Misc: Update license prolog/epilog to placate Github checker

6 years agoTraversing: $.fn.contents() support for object
Luis Emilio Velasco Sanchez [Mon, 14 May 2018 17:36:30 +0000 (13:36 -0400)]
Traversing: $.fn.contents() support for object

Fixes gh-4045
Closes gh-4046

6 years agoCSS: Correctly detect scrollbox support with non-default zoom
Richard Gibson [Mon, 7 May 2018 13:28:18 +0000 (09:28 -0400)]
CSS: Correctly detect scrollbox support with non-default zoom

Fixes gh-4029
Closes gh-4030

6 years agoCSS: Ensure camel- vs kebab-cased names are not collapsed for CSS vars
Michał Gołębiowski-Owczarek [Wed, 2 May 2018 15:08:20 +0000 (17:08 +0200)]
CSS: Ensure camel- vs kebab-cased names are not collapsed for CSS vars

Closes gh-4062

6 years agoCSS: Skip the px-appending logic for animations of non-element props
Michał Gołębiowski-Owczarek [Mon, 30 Apr 2018 16:52:39 +0000 (18:52 +0200)]
CSS: Skip the px-appending logic for animations of non-element props

Without this change animating properties from jQuery.cssNumber on non-elements
throws an error.

Ref gh-4055
Closes gh-4061

6 years agoBuild: Test on Node 10, stop testing on Node 4 & 9
Michał Gołębiowski-Owczarek [Wed, 25 Apr 2018 07:55:38 +0000 (09:55 +0200)]
Build: Test on Node 10, stop testing on Node 4 & 9

Node.js 4 & 9 are ending their life, Node.js 10 has just been released.

Closes gh-4057

6 years agoTests: ensure support tests are failed by at least one tested browser 4052/head
Michał Gołębiowski-Owczarek [Mon, 23 Apr 2018 12:16:21 +0000 (14:16 +0200)]
Tests: ensure support tests are failed by at least one tested browser

A whitelist is available so that some tests can be allowed to always succeed.
This is used only for ajax for now as it can be manually disabled in IE but
is enabled by default.

Closes gh-4052

6 years agoEvent: Add "code" property to Event object
tmybr11 [Tue, 17 Apr 2018 21:29:11 +0000 (18:29 -0300)]
Event: Add "code" property to Event object

Fixes gh-3978
Closes gh-3998

6 years agoDimensions: avoid fetching boxSizing when setting width/height
Jason Bedard [Wed, 14 Mar 2018 06:05:33 +0000 (23:05 -0700)]
Dimensions: avoid fetching boxSizing when setting width/height
- this avoids forcing a reflow in some cases

Fixes #3991

6 years agoCSS: Avoid filling jQuery.cssProps 4005/head
Dave Methvin [Sat, 24 Feb 2018 22:17:24 +0000 (17:17 -0500)]
CSS: Avoid filling jQuery.cssProps

Fixes gh-3986
Closes gh-4005

Avoids filling jQuery.cssProps by introducing a second internal
prop cache. This allows jQuery Migrate to detect external usage.

6 years agoBuild: Don't require sudo on Travis, use sandboxless headless Chrome
Michał Gołębiowski-Owczarek [Mon, 19 Mar 2018 17:12:23 +0000 (18:12 +0100)]
Build: Don't require sudo on Travis, use sandboxless headless Chrome

The Chrome sandbox doesn't work on Travis unless sudo is enabled. Instead,
we're disabling the Chrome sandbox.

Closes gh-4011

6 years agoBuild: remove artefact from previous commit
Oleg Gaydarenko [Wed, 7 Mar 2018 08:33:39 +0000 (11:33 +0300)]
Build: remove artefact from previous commit

Follow-up for 09684ba3f210594e41ecddf369ac94c688d53ccb

6 years agoCore: Use isAttached to check for attachment of element
Saptak Sengupta [Mon, 5 Mar 2018 17:57:03 +0000 (23:27 +0530)]
Core: Use isAttached to check for attachment of element

This change replaces the use of contains to check for attachment
by isAttached function

Closes gh-3977
Ref gh-3504

6 years agoBuild: Seasonal update of uglify and its options
Oleg Gaydarenko [Fri, 2 Mar 2018 17:21:33 +0000 (20:21 +0300)]
Build: Seasonal update of uglify and its options

raw     gz Compared to last run
 =      = dist/jquery.js
-294    -88 dist/jquery.min.js

Closes gh-3994

6 years agoTests: Fix Android 4.0 Deferred tests
Michał Gołębiowski-Owczarek [Mon, 12 Feb 2018 19:24:58 +0000 (20:24 +0100)]
Tests: Fix Android 4.0 Deferred tests

Closes gh-3967