You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Firefox 70 fails the "dimensions: width/height on a table row with phantom borders (gh-3698)" test #4529
The just released Firefox 70 (& newer) fails the "dimensions: width/height on a table row with phantom borders (gh-3698)" test. As Travis uses the newest version of Firefox, it started failing on master.
Link to test case
See the relevant test case in the jQuery repo, a screenshot:
Just a note, we keep track of swarm failures in the meeting notes. Those tests can be in flux a lot between releases and I don't think we need to create a GH issue for each failure. All failures are always addressed before a release can go out.
This doesn't fail on Swarm as we don't have Firefox 70 there yet; it fails on Travis as I've recently added Firefox testing there & Firefox 70 has been released today.
I think these issues make sense; they e.g. allow to assign an issue to a particular person, they also make it easier to distinguish flakes from consistent issues (this is the latter case). It looks like a real issue to me, it fails on stable, beta & nightly and I meant to look at it tomorrow.
and runs .outerWidth() & .outerWidth( true ) on the tr element. In all our tested browsers, including Chrome 78 & Firefox <70, it returns 42, with the exception of Firefox 70 where it returns 62. The issue is that Firefox 70 started reporting 10px for getComputedStyle( tr ).borderLeftWidth (the same for borderRightWidth); Firefox 68 reports 0px. However, Chrome already reports 10px as well... So why did it start breaking? Because in Firefox (both 68 & 70) getComputedStyle( tr ).width is 42px while in Chrome it's 22px - it used to add up to the same number even though partial results were different.
An interesting consequence of that is that in both Firefox 68 & 70 $( tr ).innerWidth() returns 42px while in Chrome it returns 22px - we just don't have a test that would report this difference.
Safari behaves just like Chrome while Edge & IE 11 returns auto for getComputedStyle( tr ).width - but we already work around that. getComputedStyle( tr ).borderLeftWidth is 10px in all browsers (Chrome 78, Firefox 70, Safari 13, Edge 18 & IE 11) except Firefox 68 so that change actually aligns them more with others.
I have been dreading this because table layout is just so special, but the reality is that we're surprisingly consistent with all browsers except for Firefox.
Collapsed-borders mode doesn't even come close to matching the CSS box model we assume in jQuery dimensions, so I think that can be thrown out for this discussion.
But in separated-borders mode, we have the right .outerWidth() for all browsers except Firefox 70 and the wrong.width() and .innerWidth() for all browsers except Firefox.
To fix .outerWidth(), I think we should be pragmatic and update the reliableTrDimensions test so that it additionally reports false for Firefox 70 (e.g., when the rounded sum of computed height and computed border width does not equal offsetHeight), sacrificing fractional pixels for computed dimensions of table rows (but not for their containers or children, where dimensions are more relevant).
I don't have any good ideas to fix .width() and .innerWidth() right now, but maybe it's fine for them to be broken in both table borders modes.
Activity
timmywil commentedon Oct 22, 2019
Just a note, we keep track of swarm failures in the meeting notes. Those tests can be in flux a lot between releases and I don't think we need to create a GH issue for each failure. All failures are always addressed before a release can go out.
mgol commentedon Oct 22, 2019
This doesn't fail on Swarm as we don't have Firefox 70 there yet; it fails on Travis as I've recently added Firefox testing there & Firefox 70 has been released today.
I think these issues make sense; they e.g. allow to assign an issue to a particular person, they also make it easier to distinguish flakes from consistent issues (this is the latter case). It looks like a real issue to me, it fails on stable, beta & nightly and I meant to look at it tomorrow.
mgol commentedon Oct 23, 2019
To clarify, I'm not saying we have to create issues for all those TestSwarm failures. But we can if we feel the need IMO.
mgol commentedon Oct 23, 2019
One additional reason to allow issue creation in such cases is that this creates a space to dump the investigation results which I plan to do soon.
mgol commentedon Oct 23, 2019
Results from my investigation:
The failing test case was added in #3738; it works on the following HTML:
and runs
.outerWidth()&.outerWidth( true )on thetrelement. In all our tested browsers, including Chrome 78 & Firefox <70, it returns42, with the exception of Firefox 70 where it returns62. The issue is that Firefox 70 started reporting10pxforgetComputedStyle( tr ).borderLeftWidth(the same forborderRightWidth); Firefox 68 reports0px. However, Chrome already reports10pxas well... So why did it start breaking? Because in Firefox (both 68 & 70)getComputedStyle( tr ).widthis42pxwhile in Chrome it's22px- it used to add up to the same number even though partial results were different.An interesting consequence of that is that in both Firefox 68 & 70
$( tr ).innerWidth()returns42pxwhile in Chrome it returns22px- we just don't have a test that would report this difference.Safari behaves just like Chrome while Edge & IE 11 returns
autoforgetComputedStyle( tr ).width- but we already work around that.getComputedStyle( tr ).borderLeftWidthis10pxin all browsers (Chrome 78, Firefox 70, Safari 13, Edge 18 & IE 11) except Firefox 68 so that change actually aligns them more with others.mgol commentedon Oct 23, 2019
Reported to Firefox at https://bugzilla.mozilla.org/show_bug.cgi?id=1590837.
Tests: Skip a "width/height on a table row with phantom borders" test…
Tests: Skip a "width/height on a table row with phantom borders" test…
Tests: Skip a "width/height on a table row with phantom borders" test…
3 remaining items
gibson042 commentedon Nov 5, 2019
I have been dreading this because table layout is just so special, but the reality is that we're surprisingly consistent with all browsers except for Firefox.
https://output.jsbin.com/siqolaxipa
Collapsed-borders mode doesn't even come close to matching the CSS box model we assume in jQuery dimensions, so I think that can be thrown out for this discussion.
But in separated-borders mode, we have the right
.outerWidth()for all browsers except Firefox 70 and the wrong.width()and.innerWidth()for all browsers except Firefox.To fix
.outerWidth(), I think we should be pragmatic and update thereliableTrDimensionstest so that it additionally reports false for Firefox 70 (e.g., when the rounded sum of computed height and computed border width does not equal offsetHeight), sacrificing fractional pixels for computed dimensions of table rows (but not for their containers or children, where dimensions are more relevant).I don't have any good ideas to fix
.width()and.innerWidth()right now, but maybe it's fine for them to be broken in both table borders modes.timmywil commentedon Dec 2, 2019
We'll at least do a PR for outerWidth.
Dimensions: Modify reliableTrDimensions support test to account for FF
Dimensions: Add offset prop fallback to FF for unreliable TR dimensions
Dimensions: Add offset prop fallback to FF for unreliable TR dimensions
Dimensions: Modify reliableTrDimensions support test to account for FF