}
trStyle = window.getComputedStyle( tr );
- reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
- parseInt( trStyle.borderTopWidth, 10 ) +
- parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
+ reliableTrDimensionsVal = ( Math.round( parseFloat( trStyle.height ) ) +
+ Math.round( parseFloat( trStyle.borderTopWidth ) ) +
+ Math.round( parseFloat( trStyle.borderBottomWidth ) ) ) === tr.offsetHeight;
documentElement.removeChild( table );
}
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <style>
+ html {
+ zoom: 2.1;
+ }
+ </style>
+</head>
+<body>
+ <div>
+ <script src="../../jquery.js"></script>
+ <script src="../iframeTest.js"></script>
+ <script src="getComputedSupport.js"></script>
+ </div>
+ <script>
+ startIframeTest(
+ getComputedStyle( document.documentElement ),
+ getComputedSupport( jQuery.support )
+ );
+ </script>
+</body>
+</html>
"css/cssWidthBrowserZoom.html",
function( assert, jQuery, window, document, widthBeforeSet, widthAfterSet ) {
assert.expect( 2 );
- assert.strictEqual( widthBeforeSet, "100px", "elem.css('width') works correctly with browser zoom" );
- assert.strictEqual( widthAfterSet, "100px", "elem.css('width', val) works correctly with browser zoom" );
+
+ // Support: Firefox 126+
+ // Newer Firefox implements CSS zoom in a way it affects
+ // those values slightly.
+ assert.ok( /^100(?:|\.0\d*)px$/.test( widthBeforeSet ), "elem.css('width') works correctly with browser zoom" );
+ assert.ok( /^100(?:|\.0\d*)px$/.test( widthAfterSet ), "elem.css('width', val) works correctly with browser zoom" );
}
);
}
);
+testIframe(
+ "Verify correctness of support tests with CSS zoom on the root element",
+ "support/zoom.html",
+ function( assert, jQuery, window, document, htmlStyle, support ) {
+ assert.expect( 1 );
+ assert.deepEqual( jQuery.extend( {}, support ), computedSupport,
+ "Same support properties" );
+ }
+);
+
( function() {
var expected, browserKey,
userAgent = window.navigator.userAgent,