4 <script type="text/javascript">
7 var console = document.getElementById("console");
8 console.appendChild(document.createElement("li")).innerHTML = message;
11 function testShorthand(shorthand)
13 var element = document.createElement("div");
14 element.setAttribute("style",
15 "border: thin dotted purple; \
16 background: red url(/background.png) repeat-y scroll right bottom; \
17 list-style: square outside url(/marker.png); \
19 -webkit-margin-collapse: collapse; \
20 -webkit-marquee: ahead small infinite slide slow; \
22 -webkit-text-stroke: orange 1pt; \
23 -webkit-columns: 100px 3; \
24 -webkit-column-rule: thick dashed silver; \
25 border-spacing: 10px 20px; \
26 -webkit-border-radius: 6px 8px; \
28 -webkit-mask: url(/mask.png) repeat-x scroll center top;");
29 var allProperties = element.style.cssText.split("; ");
30 element.style.removeProperty(shorthand);
31 var remainingProperties = element.style.cssText.split("; ");
32 var removedProperties = [];
34 while (p = allProperties.shift()) {
35 if (remainingProperties[0] == p)
36 remainingProperties.shift();
38 removedProperties.push("<tt>" + p.replace(/\:.*/,"") + "</tt>");
40 log("Removing <tt>" + shorthand + "</tt> removes " + removedProperties.join(", ") +".");
45 if (window.layoutTestController)
46 layoutTestController.dumpAsText();
50 "background-position",
52 "border-top", "border-right", "border-bottom", "border-left",
53 "border-color", "border-style", "border-width",
55 "-webkit-border-radius",
58 "-webkit-column-rule",
61 "-webkit-margin-collapse",
64 "-webkit-mask-position",
71 testShorthand(shorthands[i]);
75 <body onload="test()">
77 Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=9284">http://bugs.webkit.org/show_bug.cgi?id=9284</a>
78 Quirksmode (CSS1): Removing inline border styles is impossible</i>.
81 Starting with a declaration containing all properties that are constituents of shortcuts, see what is removed
82 when a shortcut property is removed. The shortcut’s constituents and only them should be removed.
84 <ul id="console"></ul>