aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/dimensions.js
Commit message (Collapse)AuthorAgeFilesLines
* CSS: Fix dimensions of table `<col>` elementsMichał Gołębiowski-Owczarek2025-02-241-6/+83
| | | | | | | | | | | | | | | | Changes: 1. Fix measurements of `<col span="2">` elements in Firefox. 2. Fix measurements of all implicitly sized `<col>` elements in Safari. Firefox always reports computed width as if `span` was 1. In Safari, computed width for columns is always 0. Work around both issues by using `offsetWidth`. In IE/Edge, `<col>` computed width is `"auto"` unless `width` is set explicitly via CSS so measurements there remain incorrect. Because of the lack of a proper workaround, we accept this limitation. Fixes gh-5628 Closes gh-5630 Ref gh-5634
* Core: Remove obsolete workarounds, update support commentsMichał Gołębiowski-Owczarek2025-02-241-23/+0
| | | Closes gh-5625
* Core: Simplify code post browser support reductionMichał Gołębiowski-Owczarek2023-09-201-0/+24
| | | | | | | | | | | | | | | | | Summary of the changes: * Core: Simplify code post browser support reduction * Tests: Remove legacy jQuery.cache & oldIE leftovers * Tests: Reformat JavaScript in delegatetest.html * Docs: "jQuery Foundation Projects" -> "jQuery Projects" * Tests: Drop an unused localfile.html file (modern browsers don't support the `file:` protocol this way, there's no point in keeping the file around) * Effects: Remove a redundant `!fn` check (`fn || !fn && easing` is equivalent to `fn || easing`; simplify the code) * CSS: Explain the fallback to direct object access in curCSS better * Tests: Deduplicate `jQuery.parseHTML` test titles * Dimensions: Add a test for fractional values * Tests: Fix a buggy WebKit regex Closes gh-5296
* CSS: Make `offsetHeight( true )`, etc. include negative marginsMichał Gołębiowski-Owczarek2023-04-041-1/+6
| | | | | | | | | | | | This regressed in gh-3656 as the added logic to include scroll gutters in `.innerWidth()` / `.innerHeight()` didn't take negative margins into account. This broke handling of negative margins in `.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate margin delta separately and only add it after the scroll gutter adjustment logic. Fixes gh-3982 Closes gh-5234 Ref gh-3656
* Tests: Exclude tests based on compilation flags, not API presenceMichał Gołębiowski-Owczarek2022-06-281-1/+1
| | | | | | | | | | Introduces a new test API, `includesModule`. The method returns whether a particular module like "ajax" or "deprecated" is included in the current jQuery build; it handles the slim build as well. The util was created so that we don't treat presence of particular APIs to decide whether to run a test as then if we accidentally remove an API, the tests would still not fail. Fixes gh-5069 Closes gh-5046
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-041-46/+46
| | | | | | | | | | | | | The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing when in jQuery source it's usually referring to the old deprecated Trac instance at https://bugs.jquery.com. This change replaces all such Trac references with `trac-NUMBER`. A few of the references came with the Sizzle integration and referred to the Sizzle GitHub bug tracker. Those have been replaced with full links instead. A new entry describing issue reference conventions has been added to README. Closes gh-4993
* Dimensions: Add offset prop fallback to FF for unreliable TR dimensionsTimmy Willison2021-01-111-7/+1
| | | | | | | | Firefox incorrectly (or perhaps correctly) includes table borders in computed dimensions, but they are the only one. Workaround this by testing for it and falling back to offset properties Fixes gh-4529 Closes gh-4808
* Manipulation: Make jQuery.htmlPrefilter an identity functionMichał Gołębiowski-Owczarek2020-03-161-15/+15
| | | Closes gh-4642
* Tests: Skip a "width/height on a table row with phantom borders" test in FirefoxMichał Gołębiowski-Owczarek2019-10-281-1/+8
| | | | | | | | | | | | Firefox 70 & newer fail this test but the issue there is more profound - Firefox doesn't subtract borders from table row computed widths. Closes gh-4537 Ref jquery/jquery#4529 Ref https://bugzilla.mozilla.org/show_bug.cgi?id=1590837 Ref w3c/csswg-drafts#4444 (cherry picked from commit c79e1d5fefc50b1df0a1c2ca3f06b567e79c0f9b)
* Core: Remove IE-specific support tests, rely on document.documentModeMichał Gołębiowski-Owczarek2019-05-131-3/+3
| | | | | | | Also, update some tests to IE-sniff when deciding whether to skip a test. Fixes gh-4386 Closes gh-4387
* Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJSMichał Gołębiowski-Owczarek2019-04-291-29/+5
| | | | | | | | | | | 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
* Tests: Make Android Browser 4.0-4.3 dimensions tests greenMichał Gołębiowski-Owczarek2019-03-271-2/+16
| | | | | | | | | | 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
* CSS: Avoid forcing a reflow in width/height getters unless necessaryMichał Gołębiowski-Owczarek2019-03-181-8/+8
| | | | | | | | Fixes gh-4322 Closes gh-4325 Ref gh-3991 Ref gh-4010 Ref gh-4185 Ref gh-4187
* Build: Update test code for compatibility with QUnit 2.x (#4297)abnud12019-02-181-1/+1
| | | | | | | | 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
* Tests: fix dimensions tests in testswarmTimmy Willison2018-12-031-1/+5
| | | Close gh-4248
* Dimensions: fall back to offsetWidth/Height for border-box in IETimmy Willison2018-11-271-5/+27
| | | | | | | | - Use getClientRects() to explicitly detect hidden/disconnected elements Close gh-4223 Fixes gh-4102
* Tests: use width style instead of SVG width attribute (#4157)Jason Bedard2018-08-201-3/+3
| | | | | The SVG width attribute seems to not support border-box in iOS7. Closes gh-4155
* Dimensions: fix computing outerWidth on SVGsJason Bedard2018-06-201-0/+60
| | | | Fixes gh-3964 Closes gh-4096
* Dimensions: Don't trust non-pixel computed width/heightRichard Gibson2017-08-071-0/+23
| | | | Fixes gh-3611 Closes gh-3741
* Dimensions: Improve offsetWidth/offsetHeight fallbackRichard Gibson2017-07-311-0/+19
| | | | | Fixes gh-3698 Fixes gh-3602 Closes gh-3738
* Support: Properly check for IE9 absolute scrollbox mishandlingRichard Gibson2017-07-181-34/+48
| | | | | | Ref gh-3589 Fixes gh-3699 Fixes gh-3730 Closes gh-3729
* Dimensions: Detect and account for content-box dimension mishandlingRichard Gibson2017-07-101-5/+12
| | | | Fixes gh-3699 Closes gh-3700
* Dimensions: Include scroll gutter in "padding" boxRichard Gibson2017-06-191-0/+83
| | | | Fixes gh-3589 Closes gh-3656
* Docs:Tests: Update IE/Edge-related support comments & testsMichał Gołębiowski2017-05-151-24/+16
| | | Closes gh-3661
* Dimensions: fall back to offsetWidth/Height for inline elemsTimmy Willison2017-03-201-0/+14
| | | | | Close gh-3577 Fixes gh-3571
* Dimensions: ignore transforms when retrieving width/heightTimmy Willison2017-03-131-0/+11
| | | | | Close gh-3561 Fixes gh-3193
* Build: ESLint detailsOleg Gaidarenko2016-06-111-3/+3
| | | | | | Use eslint pragmas, fix new errors, etc Closes gh-3148
* Tests: Refactor testIframe() to make it DRYer and more consistentDave Methvin2016-04-111-2/+2
| | | | | Ref gh-3040 Closes gh-3049
* Tests: Make iframe tests wait after checking isReadyDave Methvin2016-04-111-2/+2
| | | | Ref gh-3040
* Docs:Tests: Remove obsolete code from tests, update support commentsMichał Gołębiowski2016-03-081-4/+4
| | | | | | | | | | 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
* Dimensions: Add tests for negative borders & paddingsVitaliy Terziev2016-02-241-6/+32
| | | | Closes gh-2869
* Tests: use `jQuery` variable instead of `$`Oleg Gaidarenko2016-02-131-1/+1
| | | | | | For some reason that works with `amd` but not with builded version Fixes gh-2909
* Tests: test element position outside viewOleg Gaidarenko2016-02-111-0/+30
| | | | | | | Ref 49833f7795d665ff1d543c4f71f29fca95b567e9 Ref gh-2828 Ref gh-2836 Fixes gh-2909
* Dimensions: Empty sets should return undefinedDave Methvin2015-11-101-25/+13
| | | | | Ref gh-2319 Closes gh-2701
* Dimensions: properly manipulate non-px valuesTimmy Willison2015-11-091-30/+35
| | | | | Fixes gh-1712 Close gh-2695
* Dimensions: outerWidth/Height include scrollbarDave Methvin2015-11-071-40/+43
| | | | | Fixes gh-1729 Closes gh-2694
* Tests: Post-Summit cleanupRichard Gibson2015-10-251-8/+0
| | | | | Ref 67d7a2eefee768b59eb3d51cb1fb2c671873e58a Ref c752a5030bc00eb5b45dea9c28963f824a5c4f44
* CSS: Make show/hide/toggle methods a moduleDave Methvin2015-10-181-8/+8
| | | | | | | | 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
* Tests: further improvements QUnit 2.0 migrationOleg Gaidarenko2015-09-081-6/+6
| | | | | | | | * Remove QUnit jshint globals * Extend QUnit.assert methods * Use assert.async instead of start/stop/done Ref b930d14ce64937e9478405eee2828d4da091d2cb
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-120/+120
| | | | Fixes gh-2056
* Tests: partially use new qunit interfaceOleg Gaidarenko2015-08-161-176/+180
| | | | | | | | | | | | http://qunitjs.com/upgrade-guide-2.x/ For most of the boring work was used https://github.com/apsdehal/qunit-migrate package However, it can't update local qunit helpers, plus in some places old QUnit.asyncTest signature is still used Fixes gh-2540
* Tests: don't use deprecated argument in test declarationOleg Gaidarenko2015-07-301-2/+6
| | | | Closes gh-2507
* CSS: Make .css("width") & .css("height") return fractional valuesMichał Gołębiowski2015-07-071-16/+24
| | | | | Fixes gh-1724 Closes gh-2439
* Offset: Round offset value for the sake of floating errorsMichał Gołębiowski2015-03-231-2/+5
| | | | | | | | 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
* Tests: Tilt at a few style guide windmillsRichard Gibson2014-12-061-45/+43
| | | | Ref 3c13f4c6297566a71102c2362347987f6d6a636e
* Tests: Accommodate page changes from the QUnit HTML reporterRichard Gibson2014-12-061-21/+20
| | | | Ref 6748ba349650353c7bed6eec201a3192f6b2cae1
* Tests: Minor updates for QUnit 1.16 compatibilityRichard Gibson2014-12-051-6/+6
| | | | | | More to come later. (cherry picked from commit f6f8848fbe477fa93fd27ac7f10885dd6e97f633)
* Dimensions: allow modification of coordinates argumentOleg Gaidarenko2014-11-161-0/+12
| | | | | Fixes gh-1848 Closes gh-1853
* Misc: Drop support for older browsers; update support commentsMichał Gołębiowski2014-11-031-2/+2
| | | | | | | | That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks for old Blackberry. Closes gh-1820 Refs gh-1815
* Support: Document box-sizing was unprefixed in Firefox 29Michał Gołębiowski2014-02-051-1/+1
|