rAF logic was introduced almost three years ago relative to this commit,
as a primary method for scheduling animation (see gh-1578 pull).
With it there was two substantial changes - one was explicitly mentioned
and the other was not.
First, if browser window was hidden aka `document.hidden === true`
it would immediately execute all scheduled animation without waiting
for time pass i.e. tick time become `0` instead of 13 ms of a default value.
Which created possibility for circular executions in case if `complete`
method executed the same animation (see gh-3434 issue).
And the second one - since then there was two ways of scheduling animation:
with `setInterval` and `requestAnimationFrame`, but there was a
difference in their execution.
In case of `setInterval` it waited default `jQuery.fx.interval` value before
actually starting the new tick, not counting the first step which wasn't
set to be executed through tick method (aka `jQuery.fx.tick`).
Whereas `requestAnimationFrame` first scheduled the call and executed
the `step` method right after that, counting the first call of
`jQuery.fx.timer`, `tick` was happening twice in one frame.
But since tests explicitly disabled rAF method i.e.
`requestAnimationFrame = null` and checking only `setInterval` logic,
since it's impossible to do it otherwise - we missed that change.
Faulty logic also was presented with `cancelAnimationFrame`, which couldn't
clear any timers since `raf` scheduler didn't define new `timerId` value.
Because that change was so subtle, apparently no user noticed it proving
that both `cancelAnimationFrame` and `clearInterval` code paths are redundant.
Since `cancelAnimationFrame` didn't work properly and rAF is and was a primary
used code path, plus the same approach is used in other popular animation libs.
Therefore those code paths were removed.
These changes also replace two different functions which schedule the animation
with one, which checks what type of logic should be used and executes it
appropriatley, but for secondary path it now uses `setTimeout` making it more
consistent with rAF path.
Since ticks are happening globally we also don't require to listen
`visibilitychange` event.
It also changes the way how first call is scheduled so execution of
animation will not happen twice in one frame.
No new tests were not introduced, since now `setTimeout` logic should be
equivalent to the rAF one, but one test was changed since now we actually
execute animation at the first tick.
Fixes gh-3434
Closes gh-3559
Notify full progress before resolving empty animations
Register animation callbacks before their ticker
Remove the right timer when immediately-done animations spawn more
Ref 9d822bc1c1
Fixes gh-3502
Fixes gh-3503
Closes gh-3496
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
existing tests are adequate.
Fixes gh-3003
Fixes gh-3072
Close gh-3316
Working around this problem would require us to skip setting whitespace-only
values except when they're valid which would be very fragile. Another option
would be to set the value and see if it succeeded and then react to that.
We've tried something like that in the past to be able to overwrite !important
styles (see 24e5879) but it broke the CSS cascade (see
https://bugs.jquery.com/ticket/14836#comment:5) and was triggering
MutationObserver callbacks too often so it was reverted in PR gh-1532.
Ref gh-3204
Ref gh-1532
- For compability reasons, we had already added the global
in AMD mode, but without noConflict. This adds back noConflict
to AMD (which fixes noConflict mode in the tests).
Fixes gh-2930
Progress parameters are now correctly propagated from a deferred to which
another deferred resolved unwrapping it.
Thanks to @gibson042 for the report and a clear description of the problem
and the needed fix.
Fixes gh-3062
Closes gh-3150
Attribute hooks are determined for the lowercase versions of attribute names
but this has not been reflected in the bool attribute hooks. The code that
temporarily removed a handler to avoid an infinite loop was removing an
incorrect handler causing stack overflow.
Fixes gh-3133
Refs gh-2914
Refs gh-2916
Closes gh-3134
One test in the attribute module was overwriting jQuery.expr.attrHandle.checked
and wasn't restoring the original state after it finished. It started causing
issues for another checked-related test.
Ref gh-2736
The exception stack has the name of the immediately outer function where the
exception occurred, which can be very handy for tracing errors. Since we already
have the exception object we might as well use it.
Fixes gh-3103
Fixes gh-1746
Closes gh-2860
- Removes the copy loop in jQuery.event.fix
- Avoids accessing properties such as client/offset/page/screen X/Y
which may cause style recalc or layouts
- Simplifies adding property hooks to event object
This commits backports some changes done in the patch to the then-existing
compat branch that removed support for old browsers and added some support
comments.
Refs 90d7cc1d8b
Support comments that were lacking the final IE/Edge version that exhibits
the bug were checked & updated. Links to the Chromium bug tracker were updated.
Code in tests related to unsupported browsers (like Android 2.3 in non-basic
tests) has been removed.
Fixes gh-2868
Closes gh-2949
This reverts commit 2d715940b9.
This commit provoked new issues: gh-2836, gh-2828.
At the meeting, we decided to revert offending commit
(in all three branches - 2.2-stable, 1.12-stable and master)
and tackle this issue in 3.x.
Fixes gh-2828
Chromium < 35 incorrectly upper-cases µ; Android 4.4 uses such a version by
default (and its WebView, being un-updatable, will use it for eternity) so we
need to blacklist that one for the tests to pass.
Some Chrome versions newer than 30 but older than 42 display the "undefined is
not a function" error, not mentioning the function name. This has been fixed
in Chrome 42. Relax two tests to allow for this divergence in older Chromoiums.
This affects our Android 5.0 & Yandex.Browser testing.
- Ignore certain tests that obviously are not supported
- Beefed up the sortOrder, uniqueSort, isXMLDoc, and attr functions
Fixes gh-1742
Fixes gh-2048
Close gh-2703
Fixes gh-2302
Closes gh-2687
At the moment it's not possible to run the full event unit tests without aliases
so this was just tested with a custom build by running this one test.
Fixes gh-2498
Closes gh-2682
The added unit test shows how this could be used to support an
ArrayBuffer return, but $.ajax does not support it natively.
The goal with this change was to avoid the exception.
Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.
Fixes gh-2193
Close gh-2648
In ECMAScript 2015 (ES6), the native typeof operator returns "symbol"
for Symbol primitives. As it is possible to wrap symbols using the
Object constructor, symbols can be objects as well as any other
primitive type in JavaScript and should be determined by jQuery.type.
Closes gh-2627
* Changes "baar" to "bar" when used with "foo" in readme
and comments of js files
* mousenter -> mouseenter
Thanks @garysye, @KimTaehee
Closes gh-2613
Closes gh-2601
IE 8 doesn't have indexOf on arrays. Also, one toLowerCase() was missing. Oops.
This commit is not necessary on master but has been brought here to keep
tests similar in both branches.
(cherry-picked from 1b48eef4ca)
IE 8 prints tag names in upper case which was breaking some tests.
This commit is not necessary on master but has been brought here to keep
tests similar in both branches.