| OLD | NEW |
| (Empty) |
| 1 description('This layout test used to test that correct shorthand name ' + | |
| 2 'is returned for background-repeat-x, ' + | |
| 3 'background-repeat-y, background-position-x, background-position-y,
' + | |
| 4 '-webkit-mask-repeat-x,-webkit-mask-repeat-y, -webkit-mask-position-
x, ' + | |
| 5 '-webkit-mask-position-y when corresponding shorthand is used in the
style ' + | |
| 6 'declaration. It tests regression described in ' + | |
| 7 '<a href="https://bugs.webkit.org/show_bug.cgi?id=28972">this bug</a
>.' + | |
| 8 ' Now that access to non author stylesheet is blocked, we should ins
tead' + | |
| 9 ' get null when accessing the css rules on that object.'); | |
| 10 | |
| 11 function getShorthand(longhand, iconId) | |
| 12 { | |
| 13 var iconDiv = document.getElementById(iconId); | |
| 14 var rules = window.getMatchedCSSRules(iconDiv,'',false); | |
| 15 return rules[1] ? rules[1].style.getPropertyShorthand(longhand) : 'null'; | |
| 16 } | |
| 17 | |
| 18 shouldBe('getShorthand("background-repeat-x", "icon1")', '"null"'); | |
| 19 shouldBe('getShorthand("background-repeat-y", "icon1")', '"null"'); | |
| 20 shouldBe('getShorthand("background-repeat", "icon1")', '"null"'); | |
| 21 | |
| 22 shouldBe('getShorthand("background-position-x", "icon1")', '"null"'); | |
| 23 shouldBe('getShorthand("background-position-y", "icon1")', '"null"'); | |
| 24 shouldBe('getShorthand("background-position", "icon1")', '"null"'); | |
| 25 | |
| 26 shouldBe('getShorthand("-webkit-mask-repeat-x", "icon1")', '"null"'); | |
| 27 shouldBe('getShorthand("-webkit-mask-repeat-y", "icon1")', '"null"'); | |
| 28 shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"'); | |
| 29 | |
| 30 shouldBe('getShorthand("-webkit-mask-position-x", "icon1")', '"null"'); | |
| 31 shouldBe('getShorthand("-webkit-mask-position-y", "icon1")', '"null"'); | |
| 32 shouldBe('getShorthand("-webkit-mask-repeat", "icon1")', '"null"'); | |
| 33 | |
| 34 | |
| 35 shouldBe('getShorthand("background-repeat-x", "icon2")', '"null"'); | |
| 36 shouldBe('getShorthand("background-repeat-y", "icon2")', '"null"'); | |
| 37 shouldBe('getShorthand("background-repeat", "icon2")', '"null"'); | |
| 38 | |
| 39 shouldBe('getShorthand("background-position-x", "icon2")', '"null"'); | |
| 40 shouldBe('getShorthand("background-position-y", "icon2")', '"null"'); | |
| 41 shouldBe('getShorthand("background-position", "icon2")', '"null"'); | |
| 42 | |
| 43 shouldBe('getShorthand("-webkit-mask-repeat-x", "icon2")', '"null"'); | |
| 44 shouldBe('getShorthand("-webkit-mask-repeat-y", "icon2")', '"null"'); | |
| 45 shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"'); | |
| 46 | |
| 47 shouldBe('getShorthand("-webkit-mask-position-x", "icon2")', '"null"'); | |
| 48 shouldBe('getShorthand("-webkit-mask-position-y", "icon2")', '"null"'); | |
| 49 shouldBe('getShorthand("-webkit-mask-repeat", "icon2")', '"null"'); | |
| OLD | NEW |