]> source.dussan.org Git - jquery.git/commitdiff
Css: Use only positive integers as values for widows/orphans
authorMichał Gołębiowski <m.goleb@gmail.com>
Fri, 18 Apr 2014 00:07:17 +0000 (02:07 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Fri, 18 Apr 2014 14:24:18 +0000 (16:24 +0200)
According to http://www.w3.org/TR/CSS2/page.html#propdef-orphans, widows
and orphans can take only positive integer values. Together with a Chrome 34
regression this caused the test to fail.

(cherry-picked from def4841cfaf68e2ec156c554f8efa4aa64203f36)

Fixes #15016
Closes gh-1563

test/unit/css.js

index c949ae062eae98130957457307973f8c40fe1672..28bc684ef80ee3e492bfc17928b9fe28c44d909b 100644 (file)
@@ -754,14 +754,7 @@ test("widows & orphans #8936", function () {
        var $p = jQuery("<p>").appendTo("#qunit-fixture");
 
        if ( "widows" in $p[0].style ) {
-               expect(4);
-               $p.css({
-                       "widows": 0,
-                       "orphans": 0
-               });
-
-               equal( $p.css("widows") || jQuery.style( $p[0], "widows" ), 0, "widows correctly start with value 0");
-               equal( $p.css("orphans") || jQuery.style( $p[0], "orphans" ), 0, "orphans correctly start with value 0");
+               expect(2);
 
                $p.css({
                        "widows": 3,