690{
691 IHTMLStyle2 *style2;
692 IHTMLStyle3 *style3;
693 IHTMLStyle4 *style4;
694 IHTMLStyle5 *style5;
695 IHTMLStyle6 *style6;
701 BSTR sOverflowDefault;
705
707
711
717
722
728
730 hres = IHTMLStyle_get_marginBottom(
style, &
v);
734
739
741 hres = IHTMLStyle_get_marginBottom(
style, &
v);
745
751
756
762
763 str = (
void*)0xdeadbeef;
767
768 str = (
void*)0xdeadbeef;
772
773 hres = IHTMLStyle_get_fontWeight(
style, &sDefault);
775
780
785
790
795
800
805
810
815
820
825
830
835
840
845
850
853 ok(!
str,
"str != NULL\n");
855
856 hres = IHTMLStyle_put_fontWeight(
style, sDefault);
859
860
863
864 hres = IHTMLStyle_get_fontVariant(
style, &sDefault);
866
871
876
881
882 hres = IHTMLStyle_put_fontVariant(
style, sDefault);
885
886 str = (
void*)0xdeadbeef;
890
891 str = (
void*)0xdeadbeef;
895
901
906
912
918
923
930
935
940
946
952
954 hres = IHTMLStyle_get_textDecorationUnderline(
style, &
b);
955 ok(
hres ==
S_OK,
"get_textDecorationUnderline failed: %08x\n",
hres);
956 ok(
b == VARIANT_FALSE,
"textDecorationUnderline = %x\n",
b);
957
958 hres = IHTMLStyle_put_textDecorationUnderline(
style, VARIANT_TRUE);
959 ok(
hres ==
S_OK,
"put_textDecorationUnderline failed: %08x\n",
hres);
960
961 hres = IHTMLStyle_get_textDecorationUnderline(
style, &
b);
962 ok(
hres ==
S_OK,
"get_textDecorationUnderline failed: %08x\n",
hres);
963 ok(
b == VARIANT_TRUE,
"textDecorationUnderline = %x\n",
b);
964
965 hres = IHTMLStyle_put_textDecorationUnderline(
style, VARIANT_FALSE);
966 ok(
hres ==
S_OK,
"put_textDecorationUnderline failed: %08x\n",
hres);
967
969 hres = IHTMLStyle_get_textDecorationLineThrough(
style, &
b);
970 ok(
hres ==
S_OK,
"get_textDecorationLineThrough failed: %08x\n",
hres);
971 ok(
b == VARIANT_FALSE,
"textDecorationLineThrough = %x\n",
b);
972
973 hres = IHTMLStyle_put_textDecorationLineThrough(
style, VARIANT_TRUE);
974 ok(
hres ==
S_OK,
"put_textDecorationLineThrough failed: %08x\n",
hres);
975
976 hres = IHTMLStyle_get_textDecorationLineThrough(
style, &
b);
977 ok(
hres ==
S_OK,
"get_textDecorationLineThrough failed: %08x\n",
hres);
978 ok(
b == VARIANT_TRUE,
"textDecorationLineThrough = %x\n",
b);
979
980 hres = IHTMLStyle_put_textDecorationLineThrough(
style, VARIANT_FALSE);
981 ok(
hres ==
S_OK,
"put_textDecorationLineThrough failed: %08x\n",
hres);
982
984 hres = IHTMLStyle_get_textDecorationNone(
style, &
b);
986 ok(
b == VARIANT_FALSE,
"textDecorationNone = %x\n",
b);
987
988 hres = IHTMLStyle_put_textDecorationNone(
style, VARIANT_TRUE);
990
991 hres = IHTMLStyle_get_textDecorationNone(
style, &
b);
993 ok(
b == VARIANT_TRUE,
"textDecorationNone = %x\n",
b);
994
995 hres = IHTMLStyle_put_textDecorationNone(
style, VARIANT_FALSE);
997
999 hres = IHTMLStyle_get_textDecorationOverline(
style, &
b);
1000 ok(
hres ==
S_OK,
"get_textDecorationOverline failed: %08x\n",
hres);
1001 ok(
b == VARIANT_FALSE,
"textDecorationOverline = %x\n",
b);
1002
1003 hres = IHTMLStyle_put_textDecorationOverline(
style, VARIANT_TRUE);
1004 ok(
hres ==
S_OK,
"put_textDecorationOverline failed: %08x\n",
hres);
1005
1006 hres = IHTMLStyle_get_textDecorationOverline(
style, &
b);
1007 ok(
hres ==
S_OK,
"get_textDecorationOverline failed: %08x\n",
hres);
1008 ok(
b == VARIANT_TRUE,
"textDecorationOverline = %x\n",
b);
1009
1010 hres = IHTMLStyle_put_textDecorationOverline(
style, VARIANT_FALSE);
1011 ok(
hres ==
S_OK,
"put_textDecorationOverline failed: %08x\n",
hres);
1012
1014 hres = IHTMLStyle_get_textDecorationBlink(
style, &
b);
1015 ok(
hres ==
S_OK,
"get_textDecorationBlink failed: %08x\n",
hres);
1016 ok(
b == VARIANT_FALSE,
"textDecorationBlink = %x\n",
b);
1017
1018 hres = IHTMLStyle_put_textDecorationBlink(
style, VARIANT_TRUE);
1019 ok(
hres ==
S_OK,
"put_textDecorationBlink failed: %08x\n",
hres);
1020
1021 hres = IHTMLStyle_get_textDecorationBlink(
style, &
b);
1022 ok(
hres ==
S_OK,
"get_textDecorationBlink failed: %08x\n",
hres);
1023 ok(
b == VARIANT_TRUE,
"textDecorationBlink = %x\n",
b);
1024
1025 hres = IHTMLStyle_put_textDecorationBlink(
style, VARIANT_FALSE);
1027
1028 hres = IHTMLStyle_get_textDecoration(
style, &sDefault);
1030
1035
1045
1046 hres = IHTMLStyle_put_textDecoration(
style, sDefault);
1049
1052
1055 ok(
f == 0.0f,
"f = %f\n",
f);
1056
1062
1063 hres = IHTMLStyle_put_posWidth(
style, 2.2);
1065
1071
1075 ok(
l == 2,
"pixelWidth = %d\n",
l);
1076
1082
1089
1094
1098 ok(
l == 100,
"pixelWidth = %d\n",
l);
1099
1106
1107 hres = IHTMLStyle_put_pixelWidth(
style, 50);
1109
1113 ok(
l == 50,
"pixelWidth = %d\n",
l);
1114
1117
1124
1125
1126 str = (
void*)0xdeadbeef;
1130
1135
1140
1143
1144 str = (
void*)0xdeadbeef;
1149
1155
1156 str = (
void*)0xdeadbeef;
1162
1167
1168 str = (
void*)0xdeadbeef;
1174
1178 ok(!
str || !*
str,
"str is not empty\n");
1180
1185
1192
1196 ok(!
l,
"pixelLeft = %d\n",
l);
1197
1198
1201
1205 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1206
1207 hres = IHTMLStyle_put_posLeft(
style, 4.9f);
1209
1214 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1215
1216
1225
1226
1232
1235 ok(
f == 3.0,
"expected 3.0 got %f\n",
f);
1236
1240 ok(
l == 3,
"pixelLeft = %d\n",
l);
1241
1248
1254
1258 ok(
l == 4,
"pixelLeft = %d\n",
l);
1259
1263
1270
1277
1281 ok(!
l,
"pixelLeft = %d\n",
l);
1282
1283 hres = IHTMLStyle_put_pixelLeft(
style, 6);
1285
1289 ok(
l == 6,
"pixelLeft = %d\n",
l);
1290
1293
1300
1301
1304
1308 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1309
1310 hres = IHTMLStyle_put_posTop(
style, 4.9f);
1312
1317 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1318
1319 hres = IHTMLStyle_put_pixelTop(
style, 6);
1321
1325 ok(
l == 6,
"pixelTop = %d\n",
l);
1326
1329
1335
1342
1345 ok(
f == 3.0,
"expected 3.0 got %f\n",
f);
1346
1350 ok(
l == 3,
"pixelTop = %d\n",
l);
1351
1355
1362
1366 ok(!
l,
"pixelTop = %d\n",
l);
1367
1368
1371
1378
1382 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1383
1385 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1387 ok(!
l,
"pixelHeight = %d\n",
l);
1388
1389 hres = IHTMLStyle_put_posHeight(
style, 4.9f);
1391
1396 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1397
1399 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1403 "pixelHeight = %d\n",
l);
1404
1410
1417
1419 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1421 ok(
l == 70,
"pixelHeight = %d\n",
l);
1422
1428
1435
1437 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1439 ok(!
l,
"pixelHeight = %d\n",
l);
1440
1441 hres = IHTMLStyle_put_pixelHeight(
style, 50);
1443
1445 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1447 ok(
l == 50,
"pixelHeight = %d\n",
l);
1448
1451
1456
1463
1466 ok(
f == 64.0,
"expected 64.0 got %f\n",
f);
1467
1469 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1471 ok(
l == 64,
"pixelHeight = %d\n",
l);
1472
1473 str = (
void*)0xdeadbeef;
1476 ok(!
str,
"get_cursor != NULL\n");
1478
1483
1489
1491 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1496
1499 hres = IHTMLStyle_put_verticalAlign(
style,
v);
1502
1504 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1509
1512 hres = IHTMLStyle_put_verticalAlign(
style,
v);
1515
1517 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1522
1523 str = (
void*)0xdeadbeef;
1526 ok(!
str,
"textAlign != NULL\n");
1527
1532
1538
1544
1549
1555
1556 str = (
void*)0xdeadbeef;
1559 ok(!
str,
"textTransform != NULL\n");
1560
1565
1571
1572 str = (
void*)0xdeadbeef;
1575 ok(!
str,
"filter != NULL\n");
1576
1581
1586 ok(!
V_I4(&
v),
"V_I4(v) != 0\n");
1588
1594
1601
1602
1603 hres = IHTMLStyle_get_fontStyle(
style, &sDefault);
1605
1610
1615
1620
1625
1626 hres = IHTMLStyle_put_fontStyle(
style, sDefault);
1629
1630
1633
1634 hres = IHTMLStyle_get_overflow(
style, &sOverflowDefault);
1636
1641
1646
1651
1656
1661
1666
1671
1676
1677
1678 hres = IHTMLStyle_put_overflow(
style, sOverflowDefault);
1681
1682
1685
1689
1694
1697
1703
1709
1715
1717
1721
1725
1729
1733
1734 hres = IHTMLStyle_get_borderStyle(
style, &sDefault);
1736
1737 str =
a2bstr(
"none dotted dashed solid");
1741
1742 str =
a2bstr(
"none dotted dashed solid");
1748
1749 str =
a2bstr(
"double groove ridge inset");
1753
1754 str =
a2bstr(
"window-inset outset ridge inset");
1758
1763
1764 str =
a2bstr(
"none none none none none");
1768
1773
1778
1779 hres = IHTMLStyle_put_borderStyle(
style, sDefault);
1782
1783
1784 hres = IHTMLStyle_get_backgroundColor(
style, &
v);
1789
1792 hres = IHTMLStyle_put_backgroundColor(
style,
v);
1795
1796 hres = IHTMLStyle_get_backgroundColor(
style, &
v);
1801
1803 hres = IHTMLStyle_put_backgroundAttachment(
style,
str);
1804 ok(
hres ==
S_OK,
"put_backgroundAttachment failed: %08x\n",
hres);
1806
1807 hres = IHTMLStyle_get_backgroundAttachment(
style, &
str);
1808 ok(
hres ==
S_OK,
"get_backgroundAttachment failed: %08x\n",
hres);
1811
1812
1817
1822
1827
1833
1834 hres = IHTMLStyle_get_paddingRight(
style, &
v);
1838
1841 hres = IHTMLStyle_put_paddingRight(
style,
v);
1843
1844 hres = IHTMLStyle_get_paddingRight(
style, &
v);
1849
1850 hres = IHTMLStyle_get_paddingBottom(
style, &
v);
1854
1857 hres = IHTMLStyle_put_paddingBottom(
style,
v);
1859
1860 hres = IHTMLStyle_get_paddingBottom(
style, &
v);
1865
1870
1875
1876
1877 hres = IHTMLStyle_get_paddingLeft(
style, &vDefault);
1881
1887
1888 hres = IHTMLStyle_get_paddingLeft(
style, &
v);
1892
1893 hres = IHTMLStyle_put_paddingLeft(
style, vDefault);
1895
1896
1897 hres = IHTMLStyle_get_backgroundRepeat(
style, &sDefault);
1899
1904
1909
1914
1919
1924
1929
1930 hres = IHTMLStyle_put_backgroundRepeat(
style, sDefault);
1933
1934
1935 hres = IHTMLStyle_get_borderColor(
style, &sDefault);
1937
1942
1947
1948 hres = IHTMLStyle_put_borderColor(
style, sDefault);
1951
1952
1953 hres = IHTMLStyle_get_borderRight(
style, &sDefault);
1955
1960
1961
1962
1963
1964
1966 hres = IHTMLStyle_get_borderRightColor(
style, &
v);
1970
1972 hres = IHTMLStyle_get_borderRightWidth(
style, &
v);
1976
1981
1982 hres = IHTMLStyle_put_borderRight(
style, sDefault);
1985
1986
1987 hres = IHTMLStyle_get_borderTop(
style, &sDefault);
1989
1994
1995
1996
1997
1998
2000 hres = IHTMLStyle_get_borderTopColor(
style, &
v);
2004
2006 hres = IHTMLStyle_get_borderTopWidth(
style, &
v);
2010
2015
2016 hres = IHTMLStyle_put_borderTop(
style, sDefault);
2019
2020
2021 hres = IHTMLStyle_get_borderBottom(
style, &sDefault);
2023
2028
2029
2030
2031
2032
2034 hres = IHTMLStyle_get_borderBottomColor(
style, &
v);
2038
2040 hres = IHTMLStyle_get_borderBottomWidth(
style, &
v);
2044
2049
2050 hres = IHTMLStyle_put_borderBottom(
style, sDefault);
2053
2054
2055 hres = IHTMLStyle_get_borderLeft(
style, &sDefault);
2057
2062
2063
2064
2065
2066
2068 hres = IHTMLStyle_get_borderLeftColor(
style, &
v);
2072
2074 hres = IHTMLStyle_get_borderLeftWidth(
style, &
v);
2078
2083
2084 hres = IHTMLStyle_put_borderLeft(
style, sDefault);
2087
2088
2089 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2090 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2094
2097 hres = IHTMLStyle_put_backgroundPositionX(
style,
v);
2098 ok(
hres ==
S_OK,
"put_backgroundPositionX failed: %08x\n",
hres);
2100
2101 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2102 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2106
2107
2108 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2109 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2112
2115 hres = IHTMLStyle_put_backgroundPositionY(
style,
v);
2116 ok(
hres ==
S_OK,
"put_backgroundPositionY failed: %08x\n",
hres);
2118
2119 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2120 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2124
2125
2131
2136
2142
2143 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2144 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2148
2149 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2150 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2154
2155
2156 hres = IHTMLStyle_get_borderTopWidth(
style, &vDefault);
2158
2161 hres = IHTMLStyle_put_borderTopWidth(
style,
v);
2164
2165 hres = IHTMLStyle_get_borderTopWidth(
style, &
v);
2169
2170 hres = IHTMLStyle_put_borderTopWidth(
style, vDefault);
2173
2174
2175 hres = IHTMLStyle_get_borderRightWidth(
style, &vDefault);
2177
2180 hres = IHTMLStyle_put_borderRightWidth(
style,
v);
2183
2184 hres = IHTMLStyle_get_borderRightWidth(
style, &
v);
2188
2189 hres = IHTMLStyle_put_borderRightWidth(
style, vDefault);
2192
2193
2194 hres = IHTMLStyle_get_borderBottomWidth(
style, &vDefault);
2196
2199 hres = IHTMLStyle_put_borderBottomWidth(
style,
v);
2202
2203 hres = IHTMLStyle_get_borderBottomWidth(
style, &
v);
2207
2208 hres = IHTMLStyle_put_borderBottomWidth(
style, vDefault);
2211
2212
2213 hres = IHTMLStyle_get_borderLeftWidth(
style, &vDefault);
2215
2218 hres = IHTMLStyle_put_borderLeftWidth(
style,
v);
2221
2222 hres = IHTMLStyle_get_borderLeftWidth(
style, &
v);
2226
2227 hres = IHTMLStyle_put_borderLeftWidth(
style, vDefault);
2230
2231
2232 hres = IHTMLStyle_get_wordSpacing(
style, &vDefault);
2234
2240
2241 hres = IHTMLStyle_get_wordSpacing(
style, &
v);
2246
2247 hres = IHTMLStyle_put_wordSpacing(
style, vDefault);
2250
2251
2252 hres = IHTMLStyle_get_letterSpacing(
style, &vDefault);
2254
2257 hres = IHTMLStyle_put_letterSpacing(
style,
v);
2260
2261 hres = IHTMLStyle_get_letterSpacing(
style, &
v);
2266
2267 hres = IHTMLStyle_put_letterSpacing(
style, vDefault);
2270
2271
2272 hres = IHTMLStyle_get_borderTopColor(
style, &vDefault);
2274
2277 hres = IHTMLStyle_put_borderTopColor(
style,
v);
2280
2281 hres = IHTMLStyle_get_borderTopColor(
style, &
v);
2285
2286 hres = IHTMLStyle_put_borderTopColor(
style, vDefault);
2288
2289
2290 hres = IHTMLStyle_get_borderRightColor(
style, &vDefault);
2292
2295 hres = IHTMLStyle_put_borderRightColor(
style,
v);
2298
2299 hres = IHTMLStyle_get_borderRightColor(
style, &
v);
2303
2304 hres = IHTMLStyle_put_borderRightColor(
style, vDefault);
2306
2307
2308 hres = IHTMLStyle_get_borderBottomColor(
style, &vDefault);
2310
2313 hres = IHTMLStyle_put_borderBottomColor(
style,
v);
2316
2317 hres = IHTMLStyle_get_borderBottomColor(
style, &
v);
2321
2322 hres = IHTMLStyle_put_borderBottomColor(
style, vDefault);
2324
2325
2326 hres = IHTMLStyle_get_borderLeftColor(
style, &vDefault);
2328
2331 hres = IHTMLStyle_put_borderLeftColor(
style,
v);
2334
2335 hres = IHTMLStyle_get_borderLeftColor(
style, &
v);
2339
2340 hres = IHTMLStyle_put_borderLeftColor(
style, vDefault);
2342
2343
2347
2348 str =
a2bstr(
"rect(0px 1px 500px 505px)");
2352
2357
2358
2362
2367
2372
2373
2377
2382
2387
2388
2392
2397
2402
2405
2409
2410 str = (
void*)0xdeadbeef;
2414
2419
2425
2430
2436
2437
2441
2446
2451
2456
2461
2462 str =
a2bstr(
"decimal-leading-zero none inside");
2467
2476 } else {
2477 win_skip(
"IHTMLStyle_put_listStyle already failed\n");
2478 }
2479
2480 str = (
void*)0xdeadbeef;
2484
2489
2494
2495 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle2, (
void**)&style2);
2496 ok(
hres ==
S_OK,
"Could not get IHTMLStyle2 iface: %08x\n",
hres);
2499 IHTMLStyle2_Release(style2);
2500 }
2501
2502 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle3, (
void**)&style3);
2503 ok(
hres ==
S_OK,
"Could not get IHTMLStyle3 iface: %08x\n",
hres);
2506 IHTMLStyle3_Release(style3);
2507 }
2508
2509 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle4, (
void**)&style4);
2510 ok(
hres ==
S_OK,
"Could not get IHTMLStyle4 iface: %08x\n",
hres);
2513 IHTMLStyle4_Release(style4);
2514 }
2515
2516 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle5, (
void**)&style5);
2519 IHTMLStyle5_Release(style5);
2520 }else {
2521 win_skip(
"IHTMLStyle5 not available\n");
2522 }
2523
2524 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle6, (
void**)&style6);
2527 IHTMLStyle6_Release(style6);
2528 }else {
2529 win_skip(
"IHTMLStyle6 not available\n");
2530 }
2531}
static void test_style3(IHTMLStyle3 *style3)
static void test_style4(IHTMLStyle4 *style4)
static void test_style5(IHTMLStyle5 *style5)
#define test_style_remove_attribute(a, b, c)
static void test_style2(IHTMLStyle2 *style2)
#define test_border_styles(p, n)
#define test_style_csstext(s, t)
static const WCHAR * strstr_wa(const WCHAR *str, const char *suba)
static void test_style6(IHTMLStyle6 *style)