58 while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
59 if (!*p2) {
ret =
str;
break;}
66#define test_var_bstr(a,b) _test_var_bstr(__LINE__,a,b)
76#define get_elem2_iface(u) _get_elem2_iface(__LINE__,u)
82 hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement2, (
void**)&
elem);
87#define get_current_style2_iface(u) _get_current_style2_iface(__LINE__,u)
90 IHTMLCurrentStyle2 *current_style2;
93 hres = IUnknown_QueryInterface(unk, &IID_IHTMLCurrentStyle2, (
void**)¤t_style2);
95 return current_style2;
101 IHTMLDocument3 *doc3;
105 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (
void**)&doc3);
106 ok(
hres ==
S_OK,
"QueryInterface(IID_IHTMLDocument3) failed: %08x\n",
hres);
108 hres = IHTMLDocument3_getElementById(doc3, idW, &
result);
113 IHTMLDocument3_Release(doc3);
117#define get_current_style(e) _get_current_style(__LINE__,e)
120 IHTMLCurrentStyle *cstyle;
121 IHTMLElement2 *elem2;
124 hres = IHTMLElement_QueryInterface(
elem, &IID_IHTMLElement2, (
void**)&elem2);
125 ok(
hres ==
S_OK,
"Could not get IHTMLElement2 iface: %08x\n",
hres);
128 hres = IHTMLElement2_get_currentStyle(elem2, &cstyle);
130 ok(cstyle !=
NULL,
"cstyle = %p\n", cstyle);
132 IHTMLElement2_Release(elem2);
136#define test_border_styles(p, n) _test_border_styles(__LINE__, p, n)
148 DISPID dispidNamed = DISPID_PROPERTYPUT;
159 params.rgdispidNamedArgs = &dispidNamed;
231 params.rgvarg = &vDefault;
239#define test_style_csstext(s,t) _test_style_csstext(__LINE__,s,t)
255#define test_style_set_csstext(s,t) _test_style_set_csstext(__LINE__,s,t)
262 hres = IHTMLStyle_put_cssText(
style, tmp);
267#define test_style_remove_attribute(a,b,c) _test_style_remove_attribute(__LINE__,a,b,c)
277 ok_(__FILE__,
line)(
b == exb,
"removeAttribute returned %x, expected %x\n",
b, exb);
280#define set_text_decoration(a,b) _set_text_decoration(__LINE__,a,b)
292#define test_text_decoration(a,b) _test_text_decoration(__LINE__,a,b)
314 hres = IHTMLStyle_get_backgroundColor(
style, &
v);
327 str = (
void*)0xdeadbeef;
328 hres = IHTMLStyle2_get_position(style2, &
str);
330 ok(!
str,
"str != NULL\n");
333 hres = IHTMLStyle2_put_position(style2,
str);
338 hres = IHTMLStyle2_get_position(style2, &
str);
345 hres = IHTMLStyle2_get_right(style2, &
v);
348 ok(!
V_BSTR(&
v),
"V_BSTR(right) != NULL\n");
353 hres = IHTMLStyle2_put_right(style2,
v);
358 hres = IHTMLStyle2_get_right(style2, &
v);
365 str = (
void*)0xdeadbeef;
366 hres = IHTMLStyle2_get_direction(style2, &
str);
371 hres = IHTMLStyle2_put_direction(style2,
str);
376 hres = IHTMLStyle2_get_direction(style2, &
str);
383 hres = IHTMLStyle2_get_bottom(style2, &
v);
389 hres = IHTMLStyle2_put_bottom(style2,
v);
393 hres = IHTMLStyle2_get_bottom(style2, &
v);
398 str = (
void*)0xdeadbeef;
399 hres = IHTMLStyle2_get_overflowX(style2, &
str);
404 hres = IHTMLStyle2_put_overflowX(style2,
str);
409 hres = IHTMLStyle2_get_overflowX(style2, &
str);
414 str = (
void*)0xdeadbeef;
415 hres = IHTMLStyle2_get_overflowY(style2, &
str);
420 hres = IHTMLStyle2_put_overflowY(style2,
str);
425 hres = IHTMLStyle2_get_overflowY(style2, &
str);
431 hres = IHTMLStyle2_put_tableLayout(style2,
str);
435 str = (
void*)0xdeadbeef;
436 hres = IHTMLStyle2_get_tableLayout(style2, &
str);
448 str = (
void*)0xdeadbeef;
449 hres = IHTMLStyle3_get_wordWrap(style3, &
str);
451 ok(!
str,
"str != NULL\n");
454 hres = IHTMLStyle3_put_wordWrap(style3,
str);
459 hres = IHTMLStyle3_get_wordWrap(style3, &
str);
465 hres = IHTMLStyle3_get_zoom(style3, &
v);
473 hres = IHTMLStyle3_put_zoom(style3,
v);
477 hres = IHTMLStyle3_get_zoom(style3, &
v);
485 hres = IHTMLStyle3_put_zoom(style3,
v);
489 hres = IHTMLStyle3_get_zoom(style3, &
v);
502 hres = IHTMLStyle4_get_minHeight(style4, &vdefault);
507 hres = IHTMLStyle4_put_minHeight(style4,
v);
511 hres = IHTMLStyle4_get_minHeight(style4, &
v);
517 hres = IHTMLStyle4_put_minHeight(style4, vdefault);
529 hres = IHTMLStyle5_get_minWidth(style5, &vdefault);
534 hres = IHTMLStyle5_put_minWidth(style5,
v);
538 hres = IHTMLStyle5_get_minWidth(style5, &
v);
546 hres = IHTMLStyle5_put_minWidth(style5,
v);
550 hres = IHTMLStyle5_get_minWidth(style5, &
v);
558 hres = IHTMLStyle5_put_minWidth(style5,
v);
562 hres = IHTMLStyle5_get_minWidth(style5, &
v);
568 hres = IHTMLStyle5_put_minWidth(style5, vdefault);
573 hres = IHTMLStyle5_get_maxWidth(style5, &vdefault);
578 hres = IHTMLStyle5_put_maxWidth(style5,
v);
582 hres = IHTMLStyle5_get_maxWidth(style5, &
v);
590 hres = IHTMLStyle5_put_maxWidth(style5,
v);
594 hres = IHTMLStyle5_get_maxWidth(style5, &
v);
600 hres = IHTMLStyle5_put_maxWidth(style5,vdefault);
605 hres = IHTMLStyle5_get_maxHeight(style5, &vdefault);
610 hres = IHTMLStyle5_put_maxHeight(style5,
v);
614 hres = IHTMLStyle5_get_maxHeight(style5, &
v);
622 hres = IHTMLStyle5_put_maxHeight(style5,
v);
626 hres = IHTMLStyle5_get_maxHeight(style5, &
v);
634 hres = IHTMLStyle5_put_maxHeight(style5,
v);
638 hres = IHTMLStyle5_get_maxHeight(style5, &
v);
644 hres = IHTMLStyle5_put_maxHeight(style5, vdefault);
654 str = (
void*)0xdeadbeef;
665 str = (
void*)0xdeadbeef;
671 str = (
void*)0xdeadbeef;
701 BSTR sOverflowDefault;
730 hres = IHTMLStyle_get_marginBottom(
style, &
v);
741 hres = IHTMLStyle_get_marginBottom(
style, &
v);
763 str = (
void*)0xdeadbeef;
768 str = (
void*)0xdeadbeef;
773 hres = IHTMLStyle_get_fontWeight(
style, &sDefault);
853 ok(!
str,
"str != NULL\n");
856 hres = IHTMLStyle_put_fontWeight(
style, sDefault);
864 hres = IHTMLStyle_get_fontVariant(
style, &sDefault);
882 hres = IHTMLStyle_put_fontVariant(
style, sDefault);
886 str = (
void*)0xdeadbeef;
891 str = (
void*)0xdeadbeef;
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);
958 hres = IHTMLStyle_put_textDecorationUnderline(
style, VARIANT_TRUE);
959 ok(
hres ==
S_OK,
"put_textDecorationUnderline failed: %08x\n",
hres);
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);
965 hres = IHTMLStyle_put_textDecorationUnderline(
style, VARIANT_FALSE);
966 ok(
hres ==
S_OK,
"put_textDecorationUnderline failed: %08x\n",
hres);
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);
973 hres = IHTMLStyle_put_textDecorationLineThrough(
style, VARIANT_TRUE);
974 ok(
hres ==
S_OK,
"put_textDecorationLineThrough failed: %08x\n",
hres);
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);
980 hres = IHTMLStyle_put_textDecorationLineThrough(
style, VARIANT_FALSE);
981 ok(
hres ==
S_OK,
"put_textDecorationLineThrough failed: %08x\n",
hres);
984 hres = IHTMLStyle_get_textDecorationNone(
style, &
b);
986 ok(
b == VARIANT_FALSE,
"textDecorationNone = %x\n",
b);
988 hres = IHTMLStyle_put_textDecorationNone(
style, VARIANT_TRUE);
991 hres = IHTMLStyle_get_textDecorationNone(
style, &
b);
993 ok(
b == VARIANT_TRUE,
"textDecorationNone = %x\n",
b);
995 hres = IHTMLStyle_put_textDecorationNone(
style, VARIANT_FALSE);
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);
1003 hres = IHTMLStyle_put_textDecorationOverline(
style, VARIANT_TRUE);
1004 ok(
hres ==
S_OK,
"put_textDecorationOverline failed: %08x\n",
hres);
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);
1010 hres = IHTMLStyle_put_textDecorationOverline(
style, VARIANT_FALSE);
1011 ok(
hres ==
S_OK,
"put_textDecorationOverline failed: %08x\n",
hres);
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);
1018 hres = IHTMLStyle_put_textDecorationBlink(
style, VARIANT_TRUE);
1019 ok(
hres ==
S_OK,
"put_textDecorationBlink failed: %08x\n",
hres);
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);
1025 hres = IHTMLStyle_put_textDecorationBlink(
style, VARIANT_FALSE);
1028 hres = IHTMLStyle_get_textDecoration(
style, &sDefault);
1046 hres = IHTMLStyle_put_textDecoration(
style, sDefault);
1055 ok(
f == 0.0f,
"f = %f\n",
f);
1063 hres = IHTMLStyle_put_posWidth(
style, 2.2);
1075 ok(
l == 2,
"pixelWidth = %d\n",
l);
1098 ok(
l == 100,
"pixelWidth = %d\n",
l);
1107 hres = IHTMLStyle_put_pixelWidth(
style, 50);
1113 ok(
l == 50,
"pixelWidth = %d\n",
l);
1126 str = (
void*)0xdeadbeef;
1144 str = (
void*)0xdeadbeef;
1156 str = (
void*)0xdeadbeef;
1168 str = (
void*)0xdeadbeef;
1178 ok(!
str || !*
str,
"str is not empty\n");
1196 ok(!
l,
"pixelLeft = %d\n",
l);
1205 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1207 hres = IHTMLStyle_put_posLeft(
style, 4.9f);
1214 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1235 ok(
f == 3.0,
"expected 3.0 got %f\n",
f);
1240 ok(
l == 3,
"pixelLeft = %d\n",
l);
1258 ok(
l == 4,
"pixelLeft = %d\n",
l);
1281 ok(!
l,
"pixelLeft = %d\n",
l);
1283 hres = IHTMLStyle_put_pixelLeft(
style, 6);
1289 ok(
l == 6,
"pixelLeft = %d\n",
l);
1308 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1310 hres = IHTMLStyle_put_posTop(
style, 4.9f);
1317 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1319 hres = IHTMLStyle_put_pixelTop(
style, 6);
1325 ok(
l == 6,
"pixelTop = %d\n",
l);
1345 ok(
f == 3.0,
"expected 3.0 got %f\n",
f);
1350 ok(
l == 3,
"pixelTop = %d\n",
l);
1366 ok(!
l,
"pixelTop = %d\n",
l);
1382 ok(
f == 0.0,
"expected 0.0 got %f\n",
f);
1385 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1387 ok(!
l,
"pixelHeight = %d\n",
l);
1389 hres = IHTMLStyle_put_posHeight(
style, 4.9f);
1396 "expected 4.0 or 4.9 (IE8) got %f\n",
f);
1399 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1403 "pixelHeight = %d\n",
l);
1419 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1421 ok(
l == 70,
"pixelHeight = %d\n",
l);
1437 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1439 ok(!
l,
"pixelHeight = %d\n",
l);
1441 hres = IHTMLStyle_put_pixelHeight(
style, 50);
1445 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1447 ok(
l == 50,
"pixelHeight = %d\n",
l);
1466 ok(
f == 64.0,
"expected 64.0 got %f\n",
f);
1469 hres = IHTMLStyle_get_pixelHeight(
style, &
l);
1471 ok(
l == 64,
"pixelHeight = %d\n",
l);
1473 str = (
void*)0xdeadbeef;
1476 ok(!
str,
"get_cursor != NULL\n");
1491 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1499 hres = IHTMLStyle_put_verticalAlign(
style,
v);
1504 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1512 hres = IHTMLStyle_put_verticalAlign(
style,
v);
1517 hres = IHTMLStyle_get_verticalAlign(
style, &
v);
1523 str = (
void*)0xdeadbeef;
1526 ok(!
str,
"textAlign != NULL\n");
1556 str = (
void*)0xdeadbeef;
1559 ok(!
str,
"textTransform != NULL\n");
1572 str = (
void*)0xdeadbeef;
1575 ok(!
str,
"filter != NULL\n");
1586 ok(!
V_I4(&
v),
"V_I4(v) != 0\n");
1603 hres = IHTMLStyle_get_fontStyle(
style, &sDefault);
1626 hres = IHTMLStyle_put_fontStyle(
style, sDefault);
1634 hres = IHTMLStyle_get_overflow(
style, &sOverflowDefault);
1678 hres = IHTMLStyle_put_overflow(
style, sOverflowDefault);
1734 hres = IHTMLStyle_get_borderStyle(
style, &sDefault);
1737 str =
a2bstr(
"none dotted dashed solid");
1742 str =
a2bstr(
"none dotted dashed solid");
1749 str =
a2bstr(
"double groove ridge inset");
1754 str =
a2bstr(
"window-inset outset ridge inset");
1764 str =
a2bstr(
"none none none none none");
1779 hres = IHTMLStyle_put_borderStyle(
style, sDefault);
1784 hres = IHTMLStyle_get_backgroundColor(
style, &
v);
1792 hres = IHTMLStyle_put_backgroundColor(
style,
v);
1796 hres = IHTMLStyle_get_backgroundColor(
style, &
v);
1803 hres = IHTMLStyle_put_backgroundAttachment(
style,
str);
1804 ok(
hres ==
S_OK,
"put_backgroundAttachment failed: %08x\n",
hres);
1807 hres = IHTMLStyle_get_backgroundAttachment(
style, &
str);
1808 ok(
hres ==
S_OK,
"get_backgroundAttachment failed: %08x\n",
hres);
1834 hres = IHTMLStyle_get_paddingRight(
style, &
v);
1841 hres = IHTMLStyle_put_paddingRight(
style,
v);
1844 hres = IHTMLStyle_get_paddingRight(
style, &
v);
1850 hres = IHTMLStyle_get_paddingBottom(
style, &
v);
1857 hres = IHTMLStyle_put_paddingBottom(
style,
v);
1860 hres = IHTMLStyle_get_paddingBottom(
style, &
v);
1877 hres = IHTMLStyle_get_paddingLeft(
style, &vDefault);
1888 hres = IHTMLStyle_get_paddingLeft(
style, &
v);
1893 hres = IHTMLStyle_put_paddingLeft(
style, vDefault);
1897 hres = IHTMLStyle_get_backgroundRepeat(
style, &sDefault);
1930 hres = IHTMLStyle_put_backgroundRepeat(
style, sDefault);
1935 hres = IHTMLStyle_get_borderColor(
style, &sDefault);
1948 hres = IHTMLStyle_put_borderColor(
style, sDefault);
1953 hres = IHTMLStyle_get_borderRight(
style, &sDefault);
1966 hres = IHTMLStyle_get_borderRightColor(
style, &
v);
1972 hres = IHTMLStyle_get_borderRightWidth(
style, &
v);
1982 hres = IHTMLStyle_put_borderRight(
style, sDefault);
1987 hres = IHTMLStyle_get_borderTop(
style, &sDefault);
2000 hres = IHTMLStyle_get_borderTopColor(
style, &
v);
2006 hres = IHTMLStyle_get_borderTopWidth(
style, &
v);
2016 hres = IHTMLStyle_put_borderTop(
style, sDefault);
2021 hres = IHTMLStyle_get_borderBottom(
style, &sDefault);
2034 hres = IHTMLStyle_get_borderBottomColor(
style, &
v);
2040 hres = IHTMLStyle_get_borderBottomWidth(
style, &
v);
2050 hres = IHTMLStyle_put_borderBottom(
style, sDefault);
2055 hres = IHTMLStyle_get_borderLeft(
style, &sDefault);
2068 hres = IHTMLStyle_get_borderLeftColor(
style, &
v);
2074 hres = IHTMLStyle_get_borderLeftWidth(
style, &
v);
2084 hres = IHTMLStyle_put_borderLeft(
style, sDefault);
2089 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2090 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2097 hres = IHTMLStyle_put_backgroundPositionX(
style,
v);
2098 ok(
hres ==
S_OK,
"put_backgroundPositionX failed: %08x\n",
hres);
2101 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2102 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2108 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2109 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2115 hres = IHTMLStyle_put_backgroundPositionY(
style,
v);
2116 ok(
hres ==
S_OK,
"put_backgroundPositionY failed: %08x\n",
hres);
2119 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2120 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2143 hres = IHTMLStyle_get_backgroundPositionX(
style, &
v);
2144 ok(
hres ==
S_OK,
"get_backgroundPositionX failed: %08x\n",
hres);
2149 hres = IHTMLStyle_get_backgroundPositionY(
style, &
v);
2150 ok(
hres ==
S_OK,
"get_backgroundPositionY failed: %08x\n",
hres);
2156 hres = IHTMLStyle_get_borderTopWidth(
style, &vDefault);
2161 hres = IHTMLStyle_put_borderTopWidth(
style,
v);
2165 hres = IHTMLStyle_get_borderTopWidth(
style, &
v);
2170 hres = IHTMLStyle_put_borderTopWidth(
style, vDefault);
2175 hres = IHTMLStyle_get_borderRightWidth(
style, &vDefault);
2180 hres = IHTMLStyle_put_borderRightWidth(
style,
v);
2184 hres = IHTMLStyle_get_borderRightWidth(
style, &
v);
2189 hres = IHTMLStyle_put_borderRightWidth(
style, vDefault);
2194 hres = IHTMLStyle_get_borderBottomWidth(
style, &vDefault);
2199 hres = IHTMLStyle_put_borderBottomWidth(
style,
v);
2203 hres = IHTMLStyle_get_borderBottomWidth(
style, &
v);
2208 hres = IHTMLStyle_put_borderBottomWidth(
style, vDefault);
2213 hres = IHTMLStyle_get_borderLeftWidth(
style, &vDefault);
2218 hres = IHTMLStyle_put_borderLeftWidth(
style,
v);
2222 hres = IHTMLStyle_get_borderLeftWidth(
style, &
v);
2227 hres = IHTMLStyle_put_borderLeftWidth(
style, vDefault);
2232 hres = IHTMLStyle_get_wordSpacing(
style, &vDefault);
2241 hres = IHTMLStyle_get_wordSpacing(
style, &
v);
2247 hres = IHTMLStyle_put_wordSpacing(
style, vDefault);
2252 hres = IHTMLStyle_get_letterSpacing(
style, &vDefault);
2257 hres = IHTMLStyle_put_letterSpacing(
style,
v);
2261 hres = IHTMLStyle_get_letterSpacing(
style, &
v);
2267 hres = IHTMLStyle_put_letterSpacing(
style, vDefault);
2272 hres = IHTMLStyle_get_borderTopColor(
style, &vDefault);
2277 hres = IHTMLStyle_put_borderTopColor(
style,
v);
2281 hres = IHTMLStyle_get_borderTopColor(
style, &
v);
2286 hres = IHTMLStyle_put_borderTopColor(
style, vDefault);
2290 hres = IHTMLStyle_get_borderRightColor(
style, &vDefault);
2295 hres = IHTMLStyle_put_borderRightColor(
style,
v);
2299 hres = IHTMLStyle_get_borderRightColor(
style, &
v);
2304 hres = IHTMLStyle_put_borderRightColor(
style, vDefault);
2308 hres = IHTMLStyle_get_borderBottomColor(
style, &vDefault);
2313 hres = IHTMLStyle_put_borderBottomColor(
style,
v);
2317 hres = IHTMLStyle_get_borderBottomColor(
style, &
v);
2322 hres = IHTMLStyle_put_borderBottomColor(
style, vDefault);
2326 hres = IHTMLStyle_get_borderLeftColor(
style, &vDefault);
2331 hres = IHTMLStyle_put_borderLeftColor(
style,
v);
2335 hres = IHTMLStyle_get_borderLeftColor(
style, &
v);
2340 hres = IHTMLStyle_put_borderLeftColor(
style, vDefault);
2348 str =
a2bstr(
"rect(0px 1px 500px 505px)");
2410 str = (
void*)0xdeadbeef;
2462 str =
a2bstr(
"decimal-leading-zero none inside");
2477 win_skip(
"IHTMLStyle_put_listStyle already failed\n");
2480 str = (
void*)0xdeadbeef;
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);
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);
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);
2516 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle5, (
void**)&style5);
2519 IHTMLStyle5_Release(style5);
2521 win_skip(
"IHTMLStyle5 not available\n");
2524 hres = IHTMLStyle_QueryInterface(
style, &IID_IHTMLStyle6, (
void**)&style6);
2527 IHTMLStyle6_Release(style6);
2529 win_skip(
"IHTMLStyle6 not available\n");
2533#define test_style_filter(a,b) _test_style_filter(__LINE__,a,b)
2539 str = (
void*)0xdeadbeef;
2550#define test_current_style_filter(a,b) _test_current_style_filter(__LINE__,a,b)
2556 str = (
void*)0xdeadbeef;
2567#define set_style_filter(a,b) _set_style_filter(__LINE__,a,b)
2583 IHTMLCurrentStyle2 *current_style2;
2584 IHTMLCurrentStyle *current_style;
2591 hres = IHTMLElement2_get_currentStyle(elem2, ¤t_style);
2602 IHTMLStyle_Release(
style);
2616 IHTMLCurrentStyle2_Release(current_style2);
2617 IHTMLStyle_Release(
style);
2618 IHTMLElement2_Release(elem2);
2623 IHTMLCurrentStyle2 *current_style2;
2624 IHTMLCurrentStyle3 *current_style3;
2630 hres = IHTMLCurrentStyle_get_display(current_style, &
str);
2635 hres = IHTMLCurrentStyle_get_position(current_style, &
str);
2640 hres = IHTMLCurrentStyle_get_fontFamily(current_style, &
str);
2644 hres = IHTMLCurrentStyle_get_fontStyle(current_style, &
str);
2649 hres = IHTMLCurrentStyle_get_backgroundImage(current_style, &
str);
2654 hres = IHTMLCurrentStyle_get_fontVariant(current_style, &
str);
2659 hres = IHTMLCurrentStyle_get_borderTopStyle(current_style, &
str);
2664 hres = IHTMLCurrentStyle_get_borderRightStyle(current_style, &
str);
2669 hres = IHTMLCurrentStyle_get_borderBottomStyle(current_style, &
str);
2674 hres = IHTMLCurrentStyle_get_borderLeftStyle(current_style, &
str);
2679 hres = IHTMLCurrentStyle_get_textAlign(current_style, &
str);
2684 hres = IHTMLCurrentStyle_get_textDecoration(current_style, &
str);
2689 hres = IHTMLCurrentStyle_get_cursor(current_style, &
str);
2694 hres = IHTMLCurrentStyle_get_backgroundRepeat(current_style, &
str);
2699 hres = IHTMLCurrentStyle_get_borderColor(current_style, &
str);
2703 hres = IHTMLCurrentStyle_get_borderStyle(current_style, &
str);
2707 hres = IHTMLCurrentStyle_get_visibility(current_style, &
str);
2711 hres = IHTMLCurrentStyle_get_overflow(current_style, &
str);
2715 hres = IHTMLCurrentStyle_get_borderWidth(current_style, &
str);
2719 hres = IHTMLCurrentStyle_get_margin(current_style, &
str);
2723 hres = IHTMLCurrentStyle_get_padding(current_style, &
str);
2727 hres = IHTMLCurrentStyle_get_fontWeight(current_style, &
v);
2730 ok(
V_I4(&
v) == 400,
"expect 400 got (%d)\n",
V_I4(&
v));
2733 hres = IHTMLCurrentStyle_get_fontSize(current_style, &
v);
2738 hres = IHTMLCurrentStyle_get_left(current_style, &
v);
2743 hres = IHTMLCurrentStyle_get_top(current_style, &
v);
2748 hres = IHTMLCurrentStyle_get_width(current_style, &
v);
2753 hres = IHTMLCurrentStyle_get_height(current_style, &
v);
2758 hres = IHTMLCurrentStyle_get_paddingLeft(current_style, &
v);
2763 hres = IHTMLCurrentStyle_get_zIndex(current_style, &
v);
2769 hres = IHTMLCurrentStyle_get_verticalAlign(current_style, &
v);
2775 hres = IHTMLCurrentStyle_get_marginRight(current_style, &
v);
2780 hres = IHTMLCurrentStyle_get_marginLeft(current_style, &
v);
2785 hres = IHTMLCurrentStyle_get_borderLeftWidth(current_style, &
v);
2791 hres = IHTMLCurrentStyle_get_borderRightWidth(current_style, &
v);
2796 hres = IHTMLCurrentStyle_get_borderBottomWidth(current_style, &
v);
2801 hres = IHTMLCurrentStyle_get_borderTopWidth(current_style, &
v);
2806 hres = IHTMLCurrentStyle_get_color(current_style, &
v);
2811 hres = IHTMLCurrentStyle_get_backgroundColor(current_style, &
v);
2816 hres = IHTMLCurrentStyle_get_borderLeftColor(current_style, &
v);
2821 hres = IHTMLCurrentStyle_get_borderTopColor(current_style, &
v);
2826 hres = IHTMLCurrentStyle_get_borderRightColor(current_style, &
v);
2831 hres = IHTMLCurrentStyle_get_borderBottomColor(current_style, &
v);
2836 hres = IHTMLCurrentStyle_get_paddingTop(current_style, &
v);
2841 hres = IHTMLCurrentStyle_get_paddingRight(current_style, &
v);
2846 hres = IHTMLCurrentStyle_get_paddingBottom(current_style, &
v);
2851 hres = IHTMLCurrentStyle_get_letterSpacing(current_style, &
v);
2856 hres = IHTMLCurrentStyle_get_marginTop(current_style, &
v);
2861 hres = IHTMLCurrentStyle_get_marginBottom(current_style, &
v);
2866 hres = IHTMLCurrentStyle_get_right(current_style, &
v);
2871 hres = IHTMLCurrentStyle_get_bottom(current_style, &
v);
2876 hres = IHTMLCurrentStyle_get_lineHeight(current_style, &
v);
2881 hres = IHTMLCurrentStyle_get_textIndent(current_style, &
v);
2886 hres = IHTMLCurrentStyle_get_textTransform(current_style, &
str);
2893 hres = IHTMLCurrentStyle2_get_hasLayout(current_style2, &
b);
2895 ok(
b == VARIANT_TRUE,
"hasLayout = %x\n",
b);
2897 IHTMLCurrentStyle2_Release(current_style2);
2899 hres = IHTMLCurrentStyle_QueryInterface(current_style, &IID_IHTMLCurrentStyle3, (
void**)¤t_style3);
2900 ok(
hres ==
S_OK,
"Could not get IHTMLCurrentStyle3 iface: %08x\n",
hres);
2902 hres = IHTMLCurrentStyle3_get_whiteSpace(current_style3, &
str);
2907 IHTMLCurrentStyle3_Release(current_style3);
2910static const char basic_test_str[] =
"<html><body><div id=\"divid\"></div/</body></html>";
2914 IHTMLCurrentStyle *cstyle;
2919 hres = IHTMLDocument2_get_body(doc, &
elem);
2929 IHTMLCurrentStyle_Release(cstyle);
2930 IHTMLElement_Release(
elem);
2936 IHTMLStyle_Release(
style);
2937 IHTMLElement_Release(
elem);
2941 "<html><head><style>body {text-decoration: auto}</style></head><body></body></html>";
2945 IHTMLStyle *
style, *runtime_style;
2946 IHTMLElement2 *elem2;
2951 hres = IHTMLDocument2_get_body(doc, &
elem);
2956 hres = IHTMLElement2_get_runtimeStyle(elem2, &runtime_style);
2981 IHTMLStyle_Release(runtime_style);
2982 IHTMLStyle_Release(
style);
2983 IHTMLElement2_Release(elem2);
2984 IHTMLElement_Release(
elem);
2992 IHTMLDocument2 *doc;
2993 IHTMLDocument5 *doc5;
2997 &IID_IHTMLDocument2, (
void**)&doc);
3002 hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (
void**)&doc5);
3004 win_skip(
"Could not get IHTMLDocument5, probably too old IE\n");
3005 IHTMLDocument2_Release(doc);
3009 IHTMLDocument5_Release(doc5);
3021 ok(0,
"unexpected call\n");
3055 ok(0,
"unexpected call\n");
3073 IHTMLDocument2 *doc;
3090 IPersistStreamInit_Release(
init);
3104 ok(
hres ==
S_OK,
"QueryInterface(IID_IConnectionPointContainer) failed: %08x\n",
hres);
3107 IConnectionPointContainer_Release(
container);
3110 hres = IConnectionPoint_Advise(
cp, unk_advise, &
cookie);
3111 IConnectionPoint_Release(
cp);
3119 IHTMLDocument2 *doc;
3136 ref = IHTMLDocument2_Release(doc);
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
#define WideCharToMultiByte
#define MultiByteToWideChar
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define DISPID_READYSTATE
#define memcpy(s1, s2, n)
static const char * strw(LPCWSTR x)
#define test_current_style_filter(a, b)
#define get_current_style(e)
static void _test_border_styles(unsigned line, IHTMLStyle *pStyle, BSTR Name)
static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
#define set_text_decoration(a, b)
static void test_style3(IHTMLStyle3 *style3)
static void basic_style_test(IHTMLDocument2 *doc)
static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID)
static void test_style4(IHTMLStyle4 *style4)
static void test_style5(IHTMLStyle5 *style5)
static IHTMLCurrentStyle * _get_current_style(unsigned line, IHTMLElement *elem)
static void _test_text_decoration(unsigned line, IHTMLStyle *style, const char *exdec)
static void test_style_filters(IHTMLElement *elem)
#define test_style_remove_attribute(a, b, c)
#define test_style_set_csstext(s, t)
static void _test_style_set_csstext(unsigned line, IHTMLStyle *style, const char *text)
static BOOL wstr_contains(const WCHAR *strw, const char *stra)
static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface)
static void test_style2(IHTMLStyle2 *style2)
static void _set_style_filter(unsigned line, IHTMLStyle *style, const char *val)
static IHTMLCurrentStyle2 * _get_current_style2_iface(unsigned line, IUnknown *unk)
static void _test_var_bstr(unsigned line, const VARIANT *v, const char *expect)
#define test_border_styles(p, n)
static BSTR a2bstr(const char *str)
void(* style_test_t)(IHTMLDocument2 *)
static int strcmp_wa(LPCWSTR strw, const char *stra)
static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID)
static IHTMLDocument2 * create_document(void)
static void _test_current_style_filter(unsigned line, IHTMLCurrentStyle2 *style, const char *exval)
#define test_style_csstext(s, t)
static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
#define get_current_style2_iface(u)
#define test_style_filter(a, b)
#define test_var_bstr(a, b)
static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface)
static void test_current_style(IHTMLCurrentStyle *current_style)
#define set_style_filter(a, b)
static IHTMLElement * get_element_by_id(IHTMLDocument2 *doc, const char *id)
static void _set_text_decoration(unsigned line, IHTMLStyle *style, const char *v)
static const WCHAR * strstr_wa(const WCHAR *str, const char *suba)
static IHTMLDocument2 * create_doc_with_string(const char *str)
#define get_elem2_iface(u)
static void test_set_csstext(IHTMLStyle *style)
static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, REFIID riid, void **ppv)
static void _test_style_remove_attribute(unsigned line, IHTMLStyle *style, const char *attr, VARIANT_BOOL exb)
static void test_body_style(IHTMLStyle *style)
static const char basic_test_str[]
static void runtimestyle_test(IHTMLDocument2 *doc)
static void test_style6(IHTMLStyle6 *style)
static const char runtimestyle_test_str[]
static IHTMLDocument2 * notif_doc
static IHTMLElement2 * _get_elem2_iface(unsigned line, IUnknown *unk)
static void _test_style_csstext(unsigned line, IHTMLStyle *style, const char *extext)
static IPropertyNotifySink PropertyNotifySink
#define test_text_decoration(a, b)
static void _test_style_filter(unsigned line, IHTMLStyle *style, const char *exval)
static VARIANTARG static DISPID
#define LOCALE_USER_DEFAULT
#define LOCALE_SYSTEM_DEFAULT
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
const GUID IID_IConnectionPointContainer
const GUID IID_IPropertyNotifySink
const GUID IID_IPersistStreamInit
#define IsEqualGUID(rguid1, rguid2)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)