2006-11-17 13:04:06 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2006 Jacek Caban for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2008-11-05 12:06:45 +01:00
|
|
|
#include <math.h>
|
2006-11-17 13:04:06 +01:00
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
2008-10-07 21:45:21 +02:00
|
|
|
#include "mshtmdid.h"
|
2006-11-17 13:04:06 +01:00
|
|
|
|
2008-10-06 16:47:58 +02:00
|
|
|
#include "mshtml_private.h"
|
|
|
|
#include "htmlstyle.h"
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
#include "wine/debug.h"
|
|
|
|
#include "wine/unicode.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|
|
|
|
2008-06-18 00:12:26 +02:00
|
|
|
static const WCHAR attrBackground[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d',0};
|
2006-11-17 13:06:30 +01:00
|
|
|
static const WCHAR attrBackgroundColor[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
|
2008-04-28 11:57:06 +02:00
|
|
|
static const WCHAR attrBackgroundImage[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
|
2009-03-05 10:24:24 +01:00
|
|
|
static const WCHAR attrBackgroundPositionX[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x',0};
|
2009-03-05 10:26:36 +01:00
|
|
|
static const WCHAR attrBackgroundPositionY[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y',0};
|
2009-02-25 05:50:33 +01:00
|
|
|
static const WCHAR attrBackgroundRepeat[] =
|
|
|
|
{'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
|
2008-10-06 16:50:03 +02:00
|
|
|
static const WCHAR attrBorder[] =
|
|
|
|
{'b','o','r','d','e','r',0};
|
2009-01-13 08:38:32 +01:00
|
|
|
static const WCHAR attrBorderBottomStyle[] =
|
|
|
|
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
|
2009-03-05 10:41:39 +01:00
|
|
|
static const WCHAR attrBorderBottomWidth[] =
|
|
|
|
{'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
|
2009-03-03 11:04:49 +01:00
|
|
|
static const WCHAR attrBorderColor[] =
|
|
|
|
{'b','o','r','d','e','r','-','c','o','l','o','r',0};
|
2007-12-10 20:11:58 +01:00
|
|
|
static const WCHAR attrBorderLeft[] =
|
|
|
|
{'b','o','r','d','e','r','-','l','e','f','t',0};
|
2009-01-13 08:30:17 +01:00
|
|
|
static const WCHAR attrBorderLeftStyle[] =
|
|
|
|
{'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
|
2009-03-05 10:44:38 +01:00
|
|
|
static const WCHAR attrBorderLeftWidth[] =
|
|
|
|
{'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
|
2009-01-13 08:39:23 +01:00
|
|
|
static const WCHAR attrBorderRightStyle[] =
|
|
|
|
{'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
|
2009-03-05 10:35:50 +01:00
|
|
|
static const WCHAR attrBorderRightWidth[] =
|
|
|
|
{'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
|
2009-03-02 11:58:55 +01:00
|
|
|
static const WCHAR attrBorderStyle[] =
|
|
|
|
{'b','o','r','d','e','r','-','s','t','y','l','e',0};
|
2009-01-13 08:40:01 +01:00
|
|
|
static const WCHAR attrBorderTopStyle[] =
|
|
|
|
{'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
|
2009-03-05 10:32:41 +01:00
|
|
|
static const WCHAR attrBorderTopWidth[] =
|
|
|
|
{'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
|
2008-10-10 12:00:53 +02:00
|
|
|
static const WCHAR attrBorderWidth[] =
|
|
|
|
{'b','o','r','d','e','r','-','w','i','d','t','h',0};
|
2007-09-19 12:41:46 +02:00
|
|
|
static const WCHAR attrColor[] =
|
|
|
|
{'c','o','l','o','r',0};
|
2008-10-06 16:50:46 +02:00
|
|
|
static const WCHAR attrCursor[] =
|
|
|
|
{'c','u','r','s','o','r',0};
|
2007-10-13 04:00:02 +02:00
|
|
|
static const WCHAR attrDisplay[] =
|
|
|
|
{'d','i','s','p','l','a','y',0};
|
2008-10-07 21:45:46 +02:00
|
|
|
static const WCHAR attrFilter[] =
|
|
|
|
{'f','i','l','e','t','e','r',0};
|
2006-11-17 13:05:48 +01:00
|
|
|
static const WCHAR attrFontFamily[] =
|
|
|
|
{'f','o','n','t','-','f','a','m','i','l','y',0};
|
2006-11-17 13:07:12 +01:00
|
|
|
static const WCHAR attrFontSize[] =
|
|
|
|
{'f','o','n','t','-','s','i','z','e',0};
|
2007-09-19 12:41:46 +02:00
|
|
|
static const WCHAR attrFontStyle[] =
|
|
|
|
{'f','o','n','t','-','s','t','y','l','e',0};
|
2008-12-11 12:37:18 +01:00
|
|
|
static const WCHAR attrFontVariant[] =
|
|
|
|
{'f','o','n','t','-','v','a','r','i','a','n','t',0};
|
2007-09-19 12:41:46 +02:00
|
|
|
static const WCHAR attrFontWeight[] =
|
|
|
|
{'f','o','n','t','-','w','e','i','g','h','t',0};
|
2008-10-06 16:51:34 +02:00
|
|
|
static const WCHAR attrHeight[] =
|
|
|
|
{'h','e','i','g','h','t',0};
|
2008-10-06 16:50:28 +02:00
|
|
|
static const WCHAR attrLeft[] =
|
|
|
|
{'l','e','f','t',0};
|
2009-08-25 08:17:56 +02:00
|
|
|
static const WCHAR attrLetterSpacing[] =
|
|
|
|
{'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
|
2008-09-11 01:46:32 +02:00
|
|
|
static const WCHAR attrMargin[] =
|
|
|
|
{'m','a','r','g','i','n',0};
|
2007-12-10 20:11:58 +01:00
|
|
|
static const WCHAR attrMarginLeft[] =
|
|
|
|
{'m','a','r','g','i','n','-','l','e','f','t',0};
|
|
|
|
static const WCHAR attrMarginRight[] =
|
|
|
|
{'m','a','r','g','i','n','-','r','i','g','h','t',0};
|
2009-02-17 10:29:58 +01:00
|
|
|
static const WCHAR attrMinHeight[] =
|
|
|
|
{'m','i','n','-','h','e','i','g','h','t',0};
|
2008-11-25 11:04:11 +01:00
|
|
|
static const WCHAR attrOverflow[] =
|
|
|
|
{'o','v','e','r','f','l','o','w',0};
|
2007-12-10 20:11:58 +01:00
|
|
|
static const WCHAR attrPaddingLeft[] =
|
|
|
|
{'p','a','d','d','i','n','g','-','l','e','f','t',0};
|
2008-10-06 16:52:06 +02:00
|
|
|
static const WCHAR attrPosition[] =
|
|
|
|
{'p','o','s','i','t','i','o','n',0};
|
2008-10-07 21:45:31 +02:00
|
|
|
static const WCHAR attrTextAlign[] =
|
|
|
|
{'t','e','x','t','-','a','l','i','g','n',0};
|
2007-09-19 12:42:10 +02:00
|
|
|
static const WCHAR attrTextDecoration[] =
|
|
|
|
{'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
|
2008-10-06 16:51:04 +02:00
|
|
|
static const WCHAR attrTop[] =
|
|
|
|
{'t','o','p',0};
|
2008-10-06 16:51:21 +02:00
|
|
|
static const WCHAR attrVerticalAlign[] =
|
|
|
|
{'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
|
2007-10-13 04:00:02 +02:00
|
|
|
static const WCHAR attrVisibility[] =
|
|
|
|
{'v','i','s','i','b','i','l','i','t','y',0};
|
2008-06-30 21:39:52 +02:00
|
|
|
static const WCHAR attrWidth[] =
|
|
|
|
{'w','i','d','t','h',0};
|
2009-08-21 12:55:29 +02:00
|
|
|
static const WCHAR attrWordSpacing[] =
|
|
|
|
{'w','o','r','d','-','s','p','a','c','i','n','g',0};
|
2009-08-02 00:09:49 +02:00
|
|
|
static const WCHAR attrWordWrap[] =
|
|
|
|
{'w','o','r','d','-','w','r','a','p',0};
|
2008-10-07 21:45:05 +02:00
|
|
|
static const WCHAR attrZIndex[] =
|
|
|
|
{'z','-','i','n','d','e','x',0};
|
2007-09-19 12:42:10 +02:00
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
static const struct{
|
|
|
|
const WCHAR *name;
|
|
|
|
DISPID dispid;
|
|
|
|
} style_tbl[] = {
|
|
|
|
{attrBackground, DISPID_IHTMLSTYLE_BACKGROUND},
|
|
|
|
{attrBackgroundColor, DISPID_IHTMLSTYLE_BACKGROUNDCOLOR},
|
|
|
|
{attrBackgroundImage, DISPID_IHTMLSTYLE_BACKGROUNDIMAGE},
|
2009-03-05 10:24:24 +01:00
|
|
|
{attrBackgroundPositionX, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONX},
|
2009-03-05 10:26:36 +01:00
|
|
|
{attrBackgroundPositionY, DISPID_IHTMLSTYLE_BACKGROUNDPOSITIONY},
|
2009-02-25 05:50:33 +01:00
|
|
|
{attrBackgroundRepeat, DISPID_IHTMLSTYLE_BACKGROUNDREPEAT},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrBorder, DISPID_IHTMLSTYLE_BORDER},
|
2009-01-13 08:38:32 +01:00
|
|
|
{attrBorderBottomStyle, DISPID_IHTMLSTYLE_BORDERBOTTOMSTYLE},
|
2009-03-05 10:41:39 +01:00
|
|
|
{attrBorderBottomWidth, DISPID_IHTMLSTYLE_BORDERBOTTOMWIDTH},
|
2009-03-03 11:04:49 +01:00
|
|
|
{attrBorderColor, DISPID_IHTMLSTYLE_BORDERCOLOR},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrBorderLeft, DISPID_IHTMLSTYLE_BORDERLEFT},
|
2009-01-13 08:30:17 +01:00
|
|
|
{attrBorderLeftStyle, DISPID_IHTMLSTYLE_BORDERLEFTSTYLE},
|
2009-03-05 10:44:38 +01:00
|
|
|
{attrBorderLeftWidth, DISPID_IHTMLSTYLE_BORDERLEFTWIDTH},
|
2009-01-13 08:39:23 +01:00
|
|
|
{attrBorderRightStyle, DISPID_IHTMLSTYLE_BORDERRIGHTSTYLE},
|
2009-03-05 10:35:50 +01:00
|
|
|
{attrBorderRightWidth, DISPID_IHTMLSTYLE_BORDERRIGHTWIDTH},
|
2009-03-02 11:58:55 +01:00
|
|
|
{attrBorderStyle, DISPID_IHTMLSTYLE_BORDERSTYLE},
|
2009-01-13 08:40:01 +01:00
|
|
|
{attrBorderTopStyle, DISPID_IHTMLSTYLE_BORDERTOPSTYLE},
|
2009-03-05 10:32:41 +01:00
|
|
|
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
|
2008-10-10 12:00:53 +02:00
|
|
|
{attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrColor, DISPID_IHTMLSTYLE_COLOR},
|
|
|
|
{attrCursor, DISPID_IHTMLSTYLE_CURSOR},
|
|
|
|
{attrDisplay, DISPID_IHTMLSTYLE_DISPLAY},
|
2008-10-07 21:45:46 +02:00
|
|
|
{attrFilter, DISPID_IHTMLSTYLE_FILTER},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrFontFamily, DISPID_IHTMLSTYLE_FONTFAMILY},
|
|
|
|
{attrFontSize, DISPID_IHTMLSTYLE_FONTSIZE},
|
|
|
|
{attrFontStyle, DISPID_IHTMLSTYLE_FONTSTYLE},
|
2008-12-11 12:37:18 +01:00
|
|
|
{attrFontVariant, DISPID_IHTMLSTYLE_FONTVARIANT},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrFontWeight, DISPID_IHTMLSTYLE_FONTWEIGHT},
|
|
|
|
{attrHeight, DISPID_IHTMLSTYLE_HEIGHT},
|
|
|
|
{attrLeft, DISPID_IHTMLSTYLE_LEFT},
|
2009-08-25 08:17:56 +02:00
|
|
|
{attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrMargin, DISPID_IHTMLSTYLE_MARGIN},
|
|
|
|
{attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
|
|
|
|
{attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
|
2009-02-17 10:29:58 +01:00
|
|
|
{attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
|
2008-11-25 11:04:11 +01:00
|
|
|
{attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrPaddingLeft, DISPID_IHTMLSTYLE_PADDINGLEFT},
|
|
|
|
{attrPosition, DISPID_IHTMLSTYLE2_POSITION},
|
2008-10-07 21:45:31 +02:00
|
|
|
{attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
|
|
|
|
{attrTop, DISPID_IHTMLSTYLE_TOP},
|
|
|
|
{attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
|
|
|
|
{attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
|
|
|
|
{attrWidth, DISPID_IHTMLSTYLE_WIDTH},
|
2009-08-21 12:55:29 +02:00
|
|
|
{attrWordSpacing, DISPID_IHTMLSTYLE_WORDSPACING},
|
2009-08-02 00:09:49 +02:00
|
|
|
{attrWordWrap, DISPID_IHTMLSTYLE3_WORDWRAP},
|
2008-10-07 21:45:21 +02:00
|
|
|
{attrZIndex, DISPID_IHTMLSTYLE_ZINDEX}
|
2008-10-06 16:48:25 +02:00
|
|
|
};
|
|
|
|
|
2007-09-19 12:42:10 +02:00
|
|
|
static const WCHAR valLineThrough[] =
|
|
|
|
{'l','i','n','e','-','t','h','r','o','u','g','h',0};
|
|
|
|
static const WCHAR valUnderline[] =
|
|
|
|
{'u','n','d','e','r','l','i','n','e',0};
|
2008-12-11 12:16:28 +01:00
|
|
|
static const WCHAR szNormal[] =
|
|
|
|
{'n','o','r','m','a','l',0};
|
2009-03-01 06:53:52 +01:00
|
|
|
static const WCHAR styleNone[] =
|
|
|
|
{'n','o','n','e',0};
|
2009-03-01 09:57:37 +01:00
|
|
|
static const WCHAR valOverline[] =
|
|
|
|
{'o','v','e','r','l','i','n','e',0};
|
2009-03-01 10:06:29 +01:00
|
|
|
static const WCHAR valBlink[] =
|
|
|
|
{'b','l','i','n','k',0};
|
2006-11-17 13:05:48 +01:00
|
|
|
|
2007-12-10 20:11:58 +01:00
|
|
|
static const WCHAR px_formatW[] = {'%','d','p','x',0};
|
|
|
|
static const WCHAR emptyW[] = {0};
|
|
|
|
|
2007-12-10 20:12:40 +01:00
|
|
|
static LPWSTR fix_px_value(LPCWSTR val)
|
|
|
|
{
|
|
|
|
LPCWSTR ptr = val;
|
|
|
|
|
|
|
|
while(*ptr) {
|
|
|
|
while(*ptr && isspaceW(*ptr))
|
|
|
|
ptr++;
|
|
|
|
if(!*ptr)
|
|
|
|
break;
|
|
|
|
|
|
|
|
while(*ptr && isdigitW(*ptr))
|
|
|
|
ptr++;
|
|
|
|
|
|
|
|
if(!*ptr || isspaceW(*ptr)) {
|
|
|
|
LPWSTR ret, p;
|
|
|
|
int len = strlenW(val)+1;
|
|
|
|
|
|
|
|
ret = heap_alloc((len+2)*sizeof(WCHAR));
|
|
|
|
memcpy(ret, val, (ptr-val)*sizeof(WCHAR));
|
|
|
|
p = ret + (ptr-val);
|
|
|
|
*p++ = 'p';
|
|
|
|
*p++ = 'x';
|
|
|
|
strcpyW(p, ptr);
|
|
|
|
|
|
|
|
TRACE("fixed %s -> %s\n", debugstr_w(val), debugstr_w(ret));
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
while(*ptr && !isspaceW(*ptr))
|
|
|
|
ptr++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-06-18 00:11:52 +02:00
|
|
|
static LPWSTR fix_url_value(LPCWSTR val)
|
|
|
|
{
|
|
|
|
WCHAR *ret, *ptr;
|
|
|
|
|
|
|
|
static const WCHAR urlW[] = {'u','r','l','('};
|
|
|
|
|
|
|
|
if(strncmpW(val, urlW, sizeof(urlW)/sizeof(WCHAR)) || !strchrW(val, '\\'))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
ret = heap_strdupW(val);
|
|
|
|
|
|
|
|
for(ptr = ret; *ptr; ptr++) {
|
|
|
|
if(*ptr == '\\')
|
|
|
|
*ptr = '/';
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:52:06 +02:00
|
|
|
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCWSTR value, DWORD flags)
|
2006-11-17 13:05:48 +01:00
|
|
|
{
|
|
|
|
nsAString str_name, str_value, str_empty;
|
2007-12-10 20:12:40 +01:00
|
|
|
LPWSTR val = NULL;
|
2006-11-17 13:05:48 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
static const PRUnichar wszEmpty[] = {0};
|
|
|
|
|
2007-12-10 20:12:40 +01:00
|
|
|
if(flags & ATTR_FIX_PX)
|
|
|
|
val = fix_px_value(value);
|
2008-06-18 00:11:52 +02:00
|
|
|
if(flags & ATTR_FIX_URL)
|
|
|
|
val = fix_url_value(value);
|
2007-12-10 20:12:40 +01:00
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
nsAString_Init(&str_name, style_tbl[sid].name);
|
2007-12-10 20:12:40 +01:00
|
|
|
nsAString_Init(&str_value, val ? val : value);
|
2006-11-17 13:05:48 +01:00
|
|
|
nsAString_Init(&str_empty, wszEmpty);
|
2007-12-10 20:12:40 +01:00
|
|
|
heap_free(val);
|
2006-11-17 13:05:48 +01:00
|
|
|
|
2008-10-06 16:52:06 +02:00
|
|
|
nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
|
2006-11-17 13:05:48 +01:00
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("SetProperty failed: %08x\n", nsres);
|
|
|
|
|
|
|
|
nsAString_Finish(&str_name);
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
nsAString_Finish(&str_empty);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2009-02-17 10:29:58 +01:00
|
|
|
HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags)
|
2008-10-13 21:51:18 +02:00
|
|
|
{
|
|
|
|
switch(V_VT(value)) {
|
|
|
|
case VT_NULL:
|
|
|
|
return set_nsstyle_attr(nsstyle, sid, emptyW, flags);
|
|
|
|
|
|
|
|
case VT_BSTR:
|
|
|
|
return set_nsstyle_attr(nsstyle, sid, V_BSTR(value), flags);
|
|
|
|
|
2009-02-17 10:36:28 +01:00
|
|
|
case VT_I4: {
|
|
|
|
WCHAR str[14];
|
|
|
|
static const WCHAR format[] = {'%','d',0};
|
|
|
|
|
|
|
|
wsprintfW(str, format, V_I4(value));
|
|
|
|
return set_nsstyle_attr(nsstyle, sid, str, flags);
|
|
|
|
}
|
2008-10-13 21:51:18 +02:00
|
|
|
default:
|
|
|
|
FIXME("not implemented vt %d\n", V_VT(value));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:52:06 +02:00
|
|
|
static inline HRESULT set_style_attr(HTMLStyle *This, styleid_t sid, LPCWSTR value, DWORD flags)
|
|
|
|
{
|
|
|
|
return set_nsstyle_attr(This->nsstyle, sid, value, flags);
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
|
2007-06-10 11:55:25 +02:00
|
|
|
{
|
2007-09-19 12:42:10 +02:00
|
|
|
nsAString str_name;
|
2007-06-10 11:55:25 +02:00
|
|
|
nsresult nsres;
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
nsAString_Init(&str_name, style_tbl[sid].name);
|
2007-06-10 11:55:25 +02:00
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
|
2007-09-19 12:42:10 +02:00
|
|
|
if(NS_FAILED(nsres)) {
|
2007-06-10 11:55:25 +02:00
|
|
|
ERR("SetProperty failed: %08x\n", nsres);
|
2007-09-19 12:42:10 +02:00
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_Finish(&str_name);
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
|
2007-09-19 12:42:10 +02:00
|
|
|
{
|
|
|
|
nsAString str_value;
|
|
|
|
const PRUnichar *value;
|
|
|
|
|
|
|
|
nsAString_Init(&str_value, NULL);
|
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
|
2007-06-10 11:55:25 +02:00
|
|
|
|
2007-12-17 01:38:30 +01:00
|
|
|
nsAString_GetData(&str_value, &value);
|
2007-09-19 12:41:27 +02:00
|
|
|
*p = *value ? SysAllocString(value) : NULL;
|
2007-06-10 11:55:25 +02:00
|
|
|
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
|
2007-09-19 12:42:10 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2009-02-17 10:29:58 +01:00
|
|
|
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
|
2008-10-07 21:45:05 +02:00
|
|
|
{
|
|
|
|
nsAString str_value;
|
|
|
|
const PRUnichar *value;
|
|
|
|
BOOL set = FALSE;
|
|
|
|
|
|
|
|
nsAString_Init(&str_value, NULL);
|
|
|
|
|
|
|
|
get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
|
|
|
|
|
|
|
|
nsAString_GetData(&str_value, &value);
|
|
|
|
|
|
|
|
if(flags & ATTR_STR_TO_INT) {
|
|
|
|
const PRUnichar *ptr = value;
|
|
|
|
BOOL neg = FALSE;
|
|
|
|
INT i = 0;
|
|
|
|
|
|
|
|
if(*ptr == '-') {
|
|
|
|
neg = TRUE;
|
|
|
|
ptr++;
|
|
|
|
}
|
|
|
|
|
|
|
|
while(isdigitW(*ptr))
|
|
|
|
i = i*10 + (*ptr++ - '0');
|
|
|
|
|
|
|
|
if(!*ptr) {
|
|
|
|
V_VT(p) = VT_I4;
|
|
|
|
V_I4(p) = neg ? -i : i;
|
|
|
|
set = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!set) {
|
|
|
|
BSTR str = NULL;
|
|
|
|
|
|
|
|
if(*value) {
|
|
|
|
str = SysAllocString(value);
|
|
|
|
if(!str)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = str;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
|
2008-10-07 21:45:05 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
static inline HRESULT get_style_attr(HTMLStyle *This, styleid_t sid, BSTR *p)
|
|
|
|
{
|
|
|
|
return get_nsstyle_attr(This->nsstyle, sid, p);
|
|
|
|
}
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
|
2007-09-19 12:42:10 +02:00
|
|
|
{
|
|
|
|
nsAString str_value;
|
|
|
|
const PRUnichar *value;
|
|
|
|
|
|
|
|
nsAString_Init(&str_value, NULL);
|
2007-06-10 11:55:25 +02:00
|
|
|
|
2008-10-06 16:49:24 +02:00
|
|
|
get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
|
2007-09-19 12:42:10 +02:00
|
|
|
|
2007-12-17 01:38:30 +01:00
|
|
|
nsAString_GetData(&str_value, &value);
|
2007-09-19 12:42:10 +02:00
|
|
|
*p = strcmpW(value, exval) ? VARIANT_FALSE : VARIANT_TRUE;
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
TRACE("%s -> %x\n", debugstr_w(style_tbl[sid].name), *p);
|
2007-06-10 11:55:25 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2008-11-05 12:06:45 +01:00
|
|
|
static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value)
|
|
|
|
{
|
|
|
|
WCHAR szValue[25];
|
|
|
|
WCHAR szFormat[] = {'%','.','0','f','p','x',0};
|
|
|
|
|
|
|
|
value = floor(value);
|
|
|
|
|
|
|
|
sprintfW(szValue, szFormat, value);
|
|
|
|
|
|
|
|
return set_style_attr(This, sid, szValue, 0);
|
|
|
|
}
|
|
|
|
|
2008-12-02 15:28:04 +01:00
|
|
|
static HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p)
|
2008-11-05 12:06:45 +01:00
|
|
|
{
|
|
|
|
nsAString str_value;
|
|
|
|
HRESULT hres;
|
|
|
|
WCHAR pxW[] = {'p','x',0};
|
|
|
|
|
|
|
|
TRACE("%p %d %p\n", This, sid, p);
|
|
|
|
|
|
|
|
*p = 0.0f;
|
|
|
|
|
|
|
|
nsAString_Init(&str_value, NULL);
|
|
|
|
|
|
|
|
hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value);
|
|
|
|
if(hres == S_OK)
|
|
|
|
{
|
|
|
|
WCHAR *ptr;
|
|
|
|
const PRUnichar *value;
|
|
|
|
|
|
|
|
nsAString_GetData(&str_value, &value);
|
|
|
|
if(value)
|
|
|
|
{
|
|
|
|
*p = strtolW(value, &ptr, 10);
|
|
|
|
|
|
|
|
if(*ptr && strcmpW(ptr, pxW))
|
|
|
|
{
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
FIXME("only px values are currently supported\n");
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("ret %f\n", *p);
|
|
|
|
|
|
|
|
nsAString_Finish(&str_value);
|
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
2009-01-13 08:30:17 +01:00
|
|
|
static BOOL is_valid_border_style(BSTR v)
|
|
|
|
{
|
|
|
|
static const WCHAR styleDotted[] = {'d','o','t','t','e','d',0};
|
|
|
|
static const WCHAR styleDashed[] = {'d','a','s','h','e','d',0};
|
|
|
|
static const WCHAR styleSolid[] = {'s','o','l','i','d',0};
|
|
|
|
static const WCHAR styleDouble[] = {'d','o','u','b','l','e',0};
|
|
|
|
static const WCHAR styleGroove[] = {'g','r','o','o','v','e',0};
|
|
|
|
static const WCHAR styleRidge[] = {'r','i','d','g','e',0};
|
|
|
|
static const WCHAR styleInset[] = {'i','n','s','e','t',0};
|
|
|
|
static const WCHAR styleOutset[] = {'o','u','t','s','e','t',0};
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(v));
|
|
|
|
|
|
|
|
if(!v || strcmpiW(v, styleNone) == 0 || strcmpiW(v, styleDotted) == 0 ||
|
|
|
|
strcmpiW(v, styleDashed) == 0 || strcmpiW(v, styleSolid) == 0 ||
|
|
|
|
strcmpiW(v, styleDouble) == 0 || strcmpiW(v, styleGroove) == 0 ||
|
|
|
|
strcmpiW(v, styleRidge) == 0 || strcmpiW(v, styleInset) == 0 ||
|
|
|
|
strcmpiW(v, styleOutset) == 0 )
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
#define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface)
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLSTYLE(This);
|
|
|
|
}else if(IsEqualGUID(&IID_IHTMLStyle, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLStyle %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLSTYLE(This);
|
2008-10-02 12:37:35 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLStyle2, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLStyle2 %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLSTYLE2(This);
|
2009-02-03 09:21:32 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLStyle3, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLStyle3 %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLSTYLE3(This);
|
2009-02-03 09:42:25 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLStyle4, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLStyle4 %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLSTYLE4(This);
|
2008-06-30 21:38:23 +02:00
|
|
|
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
|
|
|
return *ppv ? S_OK : E_NOINTERFACE;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppv) {
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
WARN("unsupported %s\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLStyle_AddRef(IHTMLStyle *iface)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
LONG ref = InterlockedIncrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
LONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
2008-10-06 16:49:46 +02:00
|
|
|
if(!ref) {
|
|
|
|
if(This->nsstyle)
|
|
|
|
nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
|
2007-12-05 21:52:31 +01:00
|
|
|
heap_free(This);
|
2008-10-06 16:49:46 +02:00
|
|
|
}
|
2006-11-17 13:04:06 +01:00
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_GetTypeInfoCount(IHTMLStyle *iface, UINT *pctinfo)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-08-16 13:01:25 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_GetTypeInfo(IHTMLStyle *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-08-16 13:01:25 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_GetIDsOfNames(IHTMLStyle *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-08-16 13:01:25 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_Invoke(IHTMLStyle *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-08-16 13:01:25 +02:00
|
|
|
return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
|
|
|
|
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_fontFamily(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2006-11-17 13:05:48 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_FONT_FAMILY, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_fontFamily(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-06-10 11:55:25 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_FONT_FAMILY, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_fontStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-11 12:16:28 +01:00
|
|
|
static const WCHAR szItalic[] = {'i','t','a','l','i','c',0};
|
|
|
|
static const WCHAR szOblique[] = {'o','b','l','i','q','u','e',0};
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* fontStyle can only be one of the follow values. */
|
|
|
|
if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szItalic, v) == 0 ||
|
|
|
|
strcmpiW(szOblique, v) == 0)
|
|
|
|
{
|
|
|
|
return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_fontStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:41:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_FONT_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_fontVariant(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-11 12:37:18 +01:00
|
|
|
static const WCHAR szCaps[] = {'s','m','a','l','l','-','c','a','p','s',0};
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* fontVariant can only be one of the follow values. */
|
|
|
|
if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(szCaps, v) == 0)
|
|
|
|
{
|
|
|
|
return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_fontVariant(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-11 12:37:18 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_FONT_VARIANT, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_fontWeight(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-04 06:32:31 +01:00
|
|
|
static const WCHAR styleBold[] = {'b','o','l','d',0};
|
|
|
|
static const WCHAR styleBolder[] = {'b','o','l','d','e','r',0};
|
|
|
|
static const WCHAR styleLighter[] = {'l','i','g','h','t','e','r',0};
|
|
|
|
static const WCHAR style100[] = {'1','0','0',0};
|
|
|
|
static const WCHAR style200[] = {'2','0','0',0};
|
|
|
|
static const WCHAR style300[] = {'3','0','0',0};
|
|
|
|
static const WCHAR style400[] = {'4','0','0',0};
|
|
|
|
static const WCHAR style500[] = {'5','0','0',0};
|
|
|
|
static const WCHAR style600[] = {'6','0','0',0};
|
|
|
|
static const WCHAR style700[] = {'7','0','0',0};
|
|
|
|
static const WCHAR style800[] = {'8','0','0',0};
|
|
|
|
static const WCHAR style900[] = {'9','0','0',0};
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* fontWeight can only be one of the following */
|
|
|
|
if(!v || strcmpiW(szNormal, v) == 0 || strcmpiW(styleBold, v) == 0 ||
|
|
|
|
strcmpiW(styleBolder, v) == 0 || strcmpiW(styleLighter, v) == 0 ||
|
|
|
|
strcmpiW(style100, v) == 0 || strcmpiW(style200, v) == 0 ||
|
|
|
|
strcmpiW(style300, v) == 0 || strcmpiW(style400, v) == 0 ||
|
|
|
|
strcmpiW(style500, v) == 0 || strcmpiW(style600, v) == 0 ||
|
|
|
|
strcmpiW(style700, v) == 0 || strcmpiW(style800, v) == 0 ||
|
|
|
|
strcmpiW(style900, v) == 0
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_fontWeight(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:41:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_FONT_WEIGHT, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_fontSize(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2006-11-17 13:07:12 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_FONT_SIZE, V_BSTR(&v), 0);
|
2006-11-17 13:07:12 +01:00
|
|
|
default:
|
|
|
|
FIXME("not supported vt %d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_fontSize(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:41:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_FONT_SIZE, &V_BSTR(p));
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_font(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_font(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_color(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-06-18 00:12:43 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
|
|
|
TRACE("%s\n", debugstr_w(V_BSTR(&v)));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_COLOR, V_BSTR(&v), 0);
|
2008-06-18 00:12:43 +02:00
|
|
|
|
|
|
|
default:
|
|
|
|
FIXME("unsupported vt=%d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_color(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:41:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_COLOR, &V_BSTR(p));
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_background(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-06-18 00:12:26 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_BACKGROUND, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_background(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-08-13 01:29:57 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_BACKGROUND, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundColor(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2006-11-17 13:06:30 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_BACKGROUND_COLOR, V_BSTR(&v), 0);
|
2006-11-17 13:06:30 +01:00
|
|
|
case VT_I4: {
|
|
|
|
WCHAR value[10];
|
|
|
|
static const WCHAR format[] = {'#','%','0','6','x',0};
|
|
|
|
|
|
|
|
wsprintfW(value, format, V_I4(&v));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_BACKGROUND_COLOR, value, 0);
|
2006-11-17 13:06:30 +01:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
FIXME("unsupported vt %d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundColor(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-04 06:01:05 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
return get_style_attr(This, STYLEID_BACKGROUND_COLOR, &V_BSTR(p));
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-04-28 11:57:06 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_BACKGROUND_IMAGE, v, ATTR_FIX_URL);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundImage(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-11 12:45:24 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_BACKGROUND_IMAGE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundRepeat(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-25 05:50:33 +01:00
|
|
|
static const WCHAR styleRepeat[] = {'r','e','p','e','a','t',0};
|
|
|
|
static const WCHAR styleNoRepeat[] = {'n','o','-','r','e','p','e','a','t',0};
|
|
|
|
static const WCHAR styleRepeatX[] = {'r','e','p','e','a','t','-','x',0};
|
|
|
|
static const WCHAR styleRepeatY[] = {'r','e','p','e','a','t','-','y',0};
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* fontWeight can only be one of the following */
|
|
|
|
if(!v || strcmpiW(styleRepeat, v) == 0 || strcmpiW(styleNoRepeat, v) == 0 ||
|
|
|
|
strcmpiW(styleRepeatX, v) == 0 || strcmpiW(styleRepeatY, v) == 0 )
|
|
|
|
{
|
|
|
|
return set_style_attr(This, STYLEID_BACKGROUND_REPEAT , v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundRepeat(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-25 05:50:33 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_BACKGROUND_REPEAT, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundAttachment(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundAttachment(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundPosition(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundPosition(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:24:24 +01:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundPositionX(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:24:24 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_X, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:26:36 +01:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_backgroundPositionY(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:26:36 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_POSITION_Y, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_wordSpacing(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-08-21 12:55:29 +02:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_wordSpacing(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-08-21 12:55:29 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_WORD_SPACING, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_letterSpacing(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-08-25 08:17:56 +02:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_letterSpacing(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-08-25 08:17:56 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecoration(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 10:26:59 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* textDecoration can only be one of the following */
|
|
|
|
if(!v || strcmpiW(styleNone, v) == 0 || strcmpiW(valUnderline, v) == 0 ||
|
|
|
|
strcmpiW(valOverline, v) == 0 || strcmpiW(valLineThrough, v) == 0 ||
|
|
|
|
strcmpiW(valBlink, v) == 0)
|
|
|
|
{
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION , v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecoration(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:42:10 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_TEXT_DECORATION, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 06:53:52 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? styleNone : emptyW, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecorationNone(IHTMLStyle *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 06:53:52 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return check_style_attr_value(This, STYLEID_TEXT_DECORATION, styleNone, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-08 10:06:57 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valUnderline : emptyW, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecorationUnderline(IHTMLStyle *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:42:10 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valUnderline, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 09:57:37 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valOverline : emptyW, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecorationOverline(IHTMLStyle *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 09:57:37 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valOverline, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-08 10:12:59 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valLineThrough : emptyW, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecorationLineThrough(IHTMLStyle *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-09-19 12:42:10 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valLineThrough, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 10:06:29 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_DECORATION, v ? valBlink : emptyW, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textDecorationBlink(IHTMLStyle *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-01 10:06:29 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return check_style_attr_value(This, STYLEID_TEXT_DECORATION, valBlink, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_verticalAlign(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:21 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
|
|
|
return set_style_attr(This, STYLEID_VERTICAL_ALIGN, V_BSTR(&v), 0);
|
|
|
|
default:
|
|
|
|
FIXME("not implemented vt %d\n", V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_verticalAlign(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:21 +02:00
|
|
|
BSTR ret;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
hres = get_style_attr(This, STYLEID_VERTICAL_ALIGN, &ret);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = ret;
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:31 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_TEXT_ALIGN, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textAlign(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:31 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_TEXT_ALIGN, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_textIndent(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_textIndent(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_lineHeight(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_lineHeight(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_marginTop(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_marginTop(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-12-10 20:11:58 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(v(%d))\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_NULL:
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_RIGHT, emptyW, 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
case VT_I4: {
|
|
|
|
WCHAR buf[14];
|
|
|
|
|
|
|
|
wsprintfW(buf, px_formatW, V_I4(&v));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_RIGHT, buf, 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
}
|
|
|
|
case VT_BSTR:
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_RIGHT, V_BSTR(&v), 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
default:
|
|
|
|
FIXME("Unsupported vt=%d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-18 10:24:54 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_marginBottom(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_marginLeft(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-12-10 20:11:58 +01:00
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_NULL:
|
|
|
|
TRACE("(%p)->(NULL)\n", This);
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_LEFT, emptyW, 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
case VT_I4: {
|
|
|
|
WCHAR buf[14];
|
|
|
|
|
|
|
|
TRACE("(%p)->(%d)\n", This, V_I4(&v));
|
|
|
|
|
|
|
|
wsprintfW(buf, px_formatW, V_I4(&v));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_LEFT, buf, 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
}
|
|
|
|
case VT_BSTR:
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(V_BSTR(&v)));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN_LEFT, V_BSTR(&v), 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
default:
|
|
|
|
FIXME("Unsupported vt=%d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_margin(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-09-11 01:46:32 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_MARGIN, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-09-11 01:46:32 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_MARGIN, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-18 10:30:08 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_paddingTop(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_paddingRight(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_paddingRight(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_paddingBottom(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_paddingBottom(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_paddingLeft(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-12-10 20:11:58 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(vt=%d)\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_I4: {
|
|
|
|
WCHAR buf[14];
|
|
|
|
|
|
|
|
wsprintfW(buf, px_formatW, V_I4(&v));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_PADDING_LEFT, buf, 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
}
|
|
|
|
case VT_BSTR:
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_PADDING_LEFT, V_BSTR(&v), 0);
|
2007-12-10 20:11:58 +01:00
|
|
|
default:
|
|
|
|
FIXME("unsupported vt=%d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_paddingLeft(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-02-08 10:20:38 +01:00
|
|
|
BSTR ret;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
hres = get_style_attr(This, STYLEID_PADDING_LEFT, &ret);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = ret;
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_padding(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_padding(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_border(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:03 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_border(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:03 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_BORDER, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderTop(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderTop(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderRight(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderRight(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderBottom(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderBottom(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderLeft(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-12-10 20:11:58 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_BORDER_LEFT, v, ATTR_FIX_PX);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderLeft(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-03 12:01:16 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_LEFT, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderColor(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-03 11:04:49 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_COLOR, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderColor(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-03 11:04:49 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_COLOR, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderTopColor(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderTopColor(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderRightColor(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderRightColor(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderBottomColor(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderBottomColor(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderLeftColor(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderLeftColor(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderWidth(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-10 12:00:53 +02:00
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_WIDTH, v, ATTR_FIX_PX);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderWidth(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-10 12:00:53 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_WIDTH, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderTopWidth(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:32:41 +01:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderTopWidth(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:32:41 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderRightWidth(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:35:50 +01:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderRightWidth(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:35:50 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderBottomWidth(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:41:39 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderBottomWidth(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:41:39 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderLeftWidth(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:44:38 +01:00
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderLeftWidth(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-05 10:44:38 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-02 11:58:55 +01:00
|
|
|
static const WCHAR styleWindowInset[] = {'w','i','n','d','o','w','-','i','n','s','e','t',0};
|
|
|
|
HRESULT hres = S_OK;
|
|
|
|
BSTR pstyle;
|
|
|
|
int i=0;
|
|
|
|
int last = 0;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
while(v[i] && hres == S_OK)
|
|
|
|
{
|
|
|
|
if(v[i] == (WCHAR)' ')
|
|
|
|
{
|
|
|
|
pstyle = SysAllocStringLen(&v[last], (i-last));
|
|
|
|
if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
|
|
|
|
{
|
|
|
|
TRACE("1. Invalid style (%s)\n", debugstr_w(pstyle));
|
|
|
|
hres = E_INVALIDARG;
|
|
|
|
}
|
|
|
|
SysFreeString(pstyle);
|
|
|
|
last = i+1;
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(hres == S_OK)
|
|
|
|
{
|
|
|
|
pstyle = SysAllocStringLen(&v[last], i-last);
|
|
|
|
if( !(is_valid_border_style(pstyle) || strcmpiW(styleWindowInset, pstyle) == 0))
|
|
|
|
{
|
|
|
|
TRACE("2. Invalid style (%s)\n", debugstr_w(pstyle));
|
|
|
|
hres = E_INVALIDARG;
|
|
|
|
}
|
|
|
|
SysFreeString(pstyle);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(hres == S_OK)
|
|
|
|
hres = set_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, v, 0);
|
|
|
|
|
|
|
|
return hres;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-02 11:58:55 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderTopStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:40:01 +01:00
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
if(!is_valid_border_style(v))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_TOP_STYLE, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderTopStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:40:01 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_TOP_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderRightStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:39:23 +01:00
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
if(!is_valid_border_style(v))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderRightStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:39:23 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_RIGHT_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderBottomStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:38:32 +01:00
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
if(!is_valid_border_style(v))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderBottomStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:38:32 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_BOTTOM_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_borderLeftStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:30:17 +01:00
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
if(!is_valid_border_style(v))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_BORDER_LEFT_STYLE, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_borderLeftStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-13 08:30:17 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return get_style_attr(This, STYLEID_BORDER_LEFT_STYLE, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_width(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-06-30 21:39:52 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(v%d)\n", This, V_VT(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
|
|
|
TRACE("%s\n", debugstr_w(V_BSTR(&v)));
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_WIDTH, V_BSTR(&v), 0);
|
2008-06-30 21:39:52 +02:00
|
|
|
default:
|
|
|
|
FIXME("unsupported vt %d\n", V_VT(&v));
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_width(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-06-30 21:39:52 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_WIDTH, &V_BSTR(p));
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_height(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:34 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
|
|
|
return set_style_attr(This, STYLEID_HEIGHT, V_BSTR(&v), 0);
|
|
|
|
default:
|
|
|
|
FIXME("unimplemented vt %d\n", V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_height(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:34 +02:00
|
|
|
BSTR ret;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
hres = get_style_attr(This, STYLEID_HEIGHT, &ret);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = ret;
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_styleFloat(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_styleFloat(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_clear(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_clear(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_display(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-10-13 04:00:02 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_DISPLAY, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_display(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-10-13 04:00:02 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_DISPLAY, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_visibility(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-10-13 04:00:02 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return set_style_attr(This, STYLEID_VISIBILITY, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2007-10-13 04:00:02 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
2008-10-06 16:48:25 +02:00
|
|
|
return get_style_attr(This, STYLEID_VISIBILITY, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_listStylePosition(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_listStyleImage(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_listStyleImage(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_listStyle(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_listStyle(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_whiteSpace(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_whiteSpace(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_top(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:04 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
|
2008-10-13 21:51:18 +02:00
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_top(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:51:04 +02:00
|
|
|
BSTR ret;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
hres = get_style_attr(This, STYLEID_TOP, &ret);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = ret;
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_left(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:28 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
|
2008-10-13 21:51:27 +02:00
|
|
|
return set_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, &v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_left(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:28 +02:00
|
|
|
BSTR ret;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
hres = get_style_attr(This, STYLEID_LEFT, &ret);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
|
|
|
V_VT(p) = VT_BSTR;
|
|
|
|
V_BSTR(p) = ret;
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_position(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-19 07:46:58 +01:00
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
return IHTMLStyle2_get_position(HTMLSTYLE2(This), p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_zIndex(IHTMLStyle *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
|
|
|
|
switch(V_VT(&v)) {
|
|
|
|
case VT_BSTR:
|
|
|
|
return set_style_attr(This, STYLEID_Z_INDEX, V_BSTR(&v), 0);
|
2008-12-10 01:42:08 +01:00
|
|
|
case VT_I4: {
|
|
|
|
WCHAR value[14];
|
|
|
|
static const WCHAR format[] = {'%','d',0};
|
|
|
|
|
|
|
|
wsprintfW(value, format, V_I4(&v));
|
|
|
|
return set_style_attr(This, STYLEID_Z_INDEX, value, 0);
|
|
|
|
}
|
2008-10-07 21:45:05 +02:00
|
|
|
default:
|
|
|
|
FIXME("unimplemented vt %d\n", V_VT(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_zIndex(IHTMLStyle *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:05 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_overflow(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-25 11:04:11 +01:00
|
|
|
static const WCHAR szVisible[] = {'v','i','s','i','b','l','e',0};
|
|
|
|
static const WCHAR szScroll[] = {'s','c','r','o','l','l',0};
|
|
|
|
static const WCHAR szHidden[] = {'h','i','d','d','e','n',0};
|
|
|
|
static const WCHAR szAuto[] = {'a','u','t','o',0};
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* overflow can only be one of the follow values. */
|
|
|
|
if(!v || strcmpiW(szVisible, v) == 0 || strcmpiW(szScroll, v) == 0 ||
|
|
|
|
strcmpiW(szHidden, v) == 0 || strcmpiW(szAuto, v) == 0)
|
|
|
|
{
|
|
|
|
return set_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, v, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return E_INVALIDARG;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
2008-11-25 11:04:11 +01:00
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_get_overflow(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-25 11:04:11 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_OVERFLOW, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_pageBreakBefore(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_pageBreakBefore(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_pageBreakAfter(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_pageBreakAfter(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_cssText(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-09 20:46:01 +01:00
|
|
|
nsAString text_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_Init(&text_str, v);
|
|
|
|
nsres = nsIDOMCSSStyleDeclaration_SetCssText(This->nsstyle, &text_str);
|
|
|
|
nsAString_Finish(&text_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
FIXME("SetCssStyle failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_cssText(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-03-09 20:45:48 +01:00
|
|
|
nsAString text_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
/* FIXME: Gecko style formatting is different than IE (uppercase). */
|
|
|
|
nsAString_Init(&text_str, NULL);
|
|
|
|
nsres = nsIDOMCSSStyleDeclaration_GetCssText(This->nsstyle, &text_str);
|
|
|
|
if(NS_SUCCEEDED(nsres)) {
|
|
|
|
const PRUnichar *text;
|
|
|
|
|
|
|
|
nsAString_GetData(&text_str, &text);
|
|
|
|
*p = *text ? SysAllocString(text) : NULL;
|
|
|
|
}else {
|
|
|
|
FIXME("GetCssStyle failed: %08x\n", nsres);
|
|
|
|
*p = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_Finish(&text_str);
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_put_pixelTop(IHTMLStyle *iface, LONG v)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_get_pixelTop(IHTMLStyle *iface, LONG *p)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_put_pixelLeft(IHTMLStyle *iface, LONG v)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_put_pixelWidth(IHTMLStyle *iface, LONG v)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_get_pixelWidth(IHTMLStyle *iface, LONG *p)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_put_pixelHeight(IHTMLStyle *iface, LONG v)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:31 +01:00
|
|
|
static HRESULT WINAPI HTMLStyle_get_pixelHeight(IHTMLStyle *iface, LONG *p)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_posTop(IHTMLStyle *iface, float v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-11 12:36:39 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%f)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_pos(This, STYLEID_TOP, v);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-11 12:36:39 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_POINTER;
|
|
|
|
|
|
|
|
return get_nsstyle_pos(This, STYLEID_TOP, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-05 12:06:45 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%f)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_pos(This, STYLEID_LEFT, v);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-11-05 12:06:45 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_POINTER;
|
|
|
|
|
|
|
|
return get_nsstyle_pos(This, STYLEID_LEFT, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-08 11:08:17 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%f)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_pos(This, STYLEID_WIDTH, v);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_posWidth(IHTMLStyle *iface, float *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-08 11:08:17 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_POINTER;
|
|
|
|
|
|
|
|
if(get_nsstyle_pos(This, STYLEID_WIDTH, p) != S_OK)
|
|
|
|
*p = 0.0f;
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_posHeight(IHTMLStyle *iface, float v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-10 00:40:28 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%f)\n", This, v);
|
|
|
|
|
|
|
|
return set_style_pos(This, STYLEID_HEIGHT, v);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_posHeight(IHTMLStyle *iface, float *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-12-10 00:40:28 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
if(!p)
|
|
|
|
return E_POINTER;
|
|
|
|
|
|
|
|
if(get_nsstyle_pos(This, STYLEID_HEIGHT, p) != S_OK)
|
|
|
|
*p = 0.0f;
|
|
|
|
|
|
|
|
return S_OK;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_cursor(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
return set_style_attr(This, STYLEID_CURSOR, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_cursor(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-06 16:50:46 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
return get_style_attr(This, STYLEID_CURSOR, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_clip(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_clip(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_put_filter(IHTMLStyle *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:46 +02:00
|
|
|
|
|
|
|
WARN("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
/* FIXME: Handle MS-style filters */
|
|
|
|
return set_style_attr(This, STYLEID_FILTER, v, 0);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_get_filter(IHTMLStyle *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2008-10-07 21:45:46 +02:00
|
|
|
|
|
|
|
WARN("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
/* FIXME: Handle MS-style filters */
|
|
|
|
return get_style_attr(This, STYLEID_FILTER, p);
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_setAttribute(IHTMLStyle *iface, BSTR strAttributeName,
|
|
|
|
VARIANT AttributeValue, LONG lFlags)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-05 11:22:35 +01:00
|
|
|
HRESULT hres;
|
|
|
|
DISPID dispid;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s v%d %08x)\n", This, debugstr_w(strAttributeName),
|
|
|
|
V_VT(&AttributeValue), lFlags);
|
|
|
|
|
|
|
|
if(!strAttributeName)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if(lFlags == 1)
|
|
|
|
FIXME("Parameter lFlags ignored\n");
|
|
|
|
|
2009-02-16 09:53:46 +01:00
|
|
|
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
|
2009-01-05 11:22:35 +01:00
|
|
|
LOCALE_USER_DEFAULT, &dispid);
|
|
|
|
if(hres == S_OK)
|
|
|
|
{
|
|
|
|
VARIANT ret;
|
|
|
|
DISPID dispidNamed = DISPID_PROPERTYPUT;
|
|
|
|
DISPPARAMS params;
|
|
|
|
|
|
|
|
params.cArgs = 1;
|
|
|
|
params.rgvarg = &AttributeValue;
|
|
|
|
params.cNamedArgs = 1;
|
|
|
|
params.rgdispidNamedArgs = &dispidNamed;
|
|
|
|
|
|
|
|
hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
|
|
|
DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, NULL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("Custom attributes not supported.\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
TRACE("ret: %08x\n", hres);
|
|
|
|
|
|
|
|
return hres;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_getAttribute(IHTMLStyle *iface, BSTR strAttributeName,
|
|
|
|
LONG lFlags, VARIANT *AttributeValue)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
2009-01-05 11:22:35 +01:00
|
|
|
HRESULT hres;
|
|
|
|
DISPID dispid;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s v%p %08x)\n", This, debugstr_w(strAttributeName),
|
|
|
|
AttributeValue, lFlags);
|
|
|
|
|
|
|
|
if(!AttributeValue || !strAttributeName)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if(lFlags == 1)
|
|
|
|
FIXME("Parameter lFlags ignored\n");
|
|
|
|
|
2009-02-16 09:53:46 +01:00
|
|
|
hres = HTMLStyle_GetIDsOfNames(iface, &IID_NULL, &strAttributeName, 1,
|
2009-01-05 11:22:35 +01:00
|
|
|
LOCALE_USER_DEFAULT, &dispid);
|
|
|
|
if(hres == S_OK)
|
|
|
|
{
|
|
|
|
DISPPARAMS params = {NULL, NULL, 0, 0 };
|
|
|
|
|
|
|
|
hres = HTMLStyle_Invoke(iface, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
|
|
|
DISPATCH_PROPERTYGET, ¶ms, AttributeValue, NULL, NULL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("Custom attributes not supported.\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
return hres;
|
2006-11-17 13:04:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttributeName,
|
|
|
|
LONG lFlags, VARIANT_BOOL *pfSuccess)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(strAttributeName),
|
|
|
|
lFlags, pfSuccess);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLStyle_toString(IHTMLStyle *iface, BSTR *String)
|
|
|
|
{
|
|
|
|
HTMLStyle *This = HTMLSTYLE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, String);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
static HRESULT HTMLStyle_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID *dispid)
|
|
|
|
{
|
|
|
|
int c, i, min=0, max = sizeof(style_tbl)/sizeof(*style_tbl)-1;
|
|
|
|
|
|
|
|
while(min <= max) {
|
|
|
|
i = (min+max)/2;
|
|
|
|
|
|
|
|
c = strcmpW(style_tbl[i].name, name);
|
|
|
|
if(!c) {
|
|
|
|
*dispid = style_tbl[i].dispid;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(c > 0)
|
|
|
|
max = i-1;
|
|
|
|
else
|
|
|
|
min = i+1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return DISP_E_UNKNOWNNAME;
|
|
|
|
}
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
static const IHTMLStyleVtbl HTMLStyleVtbl = {
|
|
|
|
HTMLStyle_QueryInterface,
|
|
|
|
HTMLStyle_AddRef,
|
|
|
|
HTMLStyle_Release,
|
|
|
|
HTMLStyle_GetTypeInfoCount,
|
|
|
|
HTMLStyle_GetTypeInfo,
|
|
|
|
HTMLStyle_GetIDsOfNames,
|
|
|
|
HTMLStyle_Invoke,
|
|
|
|
HTMLStyle_put_fontFamily,
|
|
|
|
HTMLStyle_get_fontFamily,
|
|
|
|
HTMLStyle_put_fontStyle,
|
|
|
|
HTMLStyle_get_fontStyle,
|
|
|
|
HTMLStyle_put_fontVariant,
|
|
|
|
HTMLStyle_get_fontVariant,
|
|
|
|
HTMLStyle_put_fontWeight,
|
|
|
|
HTMLStyle_get_fontWeight,
|
|
|
|
HTMLStyle_put_fontSize,
|
|
|
|
HTMLStyle_get_fontSize,
|
|
|
|
HTMLStyle_put_font,
|
|
|
|
HTMLStyle_get_font,
|
|
|
|
HTMLStyle_put_color,
|
|
|
|
HTMLStyle_get_color,
|
|
|
|
HTMLStyle_put_background,
|
|
|
|
HTMLStyle_get_background,
|
|
|
|
HTMLStyle_put_backgroundColor,
|
|
|
|
HTMLStyle_get_backgroundColor,
|
|
|
|
HTMLStyle_put_backgroundImage,
|
|
|
|
HTMLStyle_get_backgroundImage,
|
|
|
|
HTMLStyle_put_backgroundRepeat,
|
|
|
|
HTMLStyle_get_backgroundRepeat,
|
|
|
|
HTMLStyle_put_backgroundAttachment,
|
|
|
|
HTMLStyle_get_backgroundAttachment,
|
|
|
|
HTMLStyle_put_backgroundPosition,
|
|
|
|
HTMLStyle_get_backgroundPosition,
|
|
|
|
HTMLStyle_put_backgroundPositionX,
|
|
|
|
HTMLStyle_get_backgroundPositionX,
|
|
|
|
HTMLStyle_put_backgroundPositionY,
|
|
|
|
HTMLStyle_get_backgroundPositionY,
|
|
|
|
HTMLStyle_put_wordSpacing,
|
|
|
|
HTMLStyle_get_wordSpacing,
|
|
|
|
HTMLStyle_put_letterSpacing,
|
|
|
|
HTMLStyle_get_letterSpacing,
|
|
|
|
HTMLStyle_put_textDecoration,
|
|
|
|
HTMLStyle_get_textDecoration,
|
|
|
|
HTMLStyle_put_textDecorationNone,
|
|
|
|
HTMLStyle_get_textDecorationNone,
|
|
|
|
HTMLStyle_put_textDecorationUnderline,
|
|
|
|
HTMLStyle_get_textDecorationUnderline,
|
|
|
|
HTMLStyle_put_textDecorationOverline,
|
|
|
|
HTMLStyle_get_textDecorationOverline,
|
|
|
|
HTMLStyle_put_textDecorationLineThrough,
|
|
|
|
HTMLStyle_get_textDecorationLineThrough,
|
|
|
|
HTMLStyle_put_textDecorationBlink,
|
|
|
|
HTMLStyle_get_textDecorationBlink,
|
|
|
|
HTMLStyle_put_verticalAlign,
|
|
|
|
HTMLStyle_get_verticalAlign,
|
|
|
|
HTMLStyle_put_textTransform,
|
|
|
|
HTMLStyle_get_textTransform,
|
|
|
|
HTMLStyle_put_textAlign,
|
|
|
|
HTMLStyle_get_textAlign,
|
|
|
|
HTMLStyle_put_textIndent,
|
|
|
|
HTMLStyle_get_textIndent,
|
|
|
|
HTMLStyle_put_lineHeight,
|
|
|
|
HTMLStyle_get_lineHeight,
|
|
|
|
HTMLStyle_put_marginTop,
|
|
|
|
HTMLStyle_get_marginTop,
|
|
|
|
HTMLStyle_put_marginRight,
|
|
|
|
HTMLStyle_get_marginRight,
|
|
|
|
HTMLStyle_put_marginBottom,
|
|
|
|
HTMLStyle_get_marginBottom,
|
|
|
|
HTMLStyle_put_marginLeft,
|
|
|
|
HTMLStyle_get_marginLeft,
|
|
|
|
HTMLStyle_put_margin,
|
|
|
|
HTMLStyle_get_margin,
|
|
|
|
HTMLStyle_put_paddingTop,
|
|
|
|
HTMLStyle_get_paddingTop,
|
|
|
|
HTMLStyle_put_paddingRight,
|
|
|
|
HTMLStyle_get_paddingRight,
|
|
|
|
HTMLStyle_put_paddingBottom,
|
|
|
|
HTMLStyle_get_paddingBottom,
|
|
|
|
HTMLStyle_put_paddingLeft,
|
|
|
|
HTMLStyle_get_paddingLeft,
|
|
|
|
HTMLStyle_put_padding,
|
|
|
|
HTMLStyle_get_padding,
|
|
|
|
HTMLStyle_put_border,
|
|
|
|
HTMLStyle_get_border,
|
|
|
|
HTMLStyle_put_borderTop,
|
|
|
|
HTMLStyle_get_borderTop,
|
|
|
|
HTMLStyle_put_borderRight,
|
|
|
|
HTMLStyle_get_borderRight,
|
|
|
|
HTMLStyle_put_borderBottom,
|
|
|
|
HTMLStyle_get_borderBottom,
|
|
|
|
HTMLStyle_put_borderLeft,
|
|
|
|
HTMLStyle_get_borderLeft,
|
|
|
|
HTMLStyle_put_borderColor,
|
|
|
|
HTMLStyle_get_borderColor,
|
|
|
|
HTMLStyle_put_borderTopColor,
|
|
|
|
HTMLStyle_get_borderTopColor,
|
|
|
|
HTMLStyle_put_borderRightColor,
|
|
|
|
HTMLStyle_get_borderRightColor,
|
|
|
|
HTMLStyle_put_borderBottomColor,
|
|
|
|
HTMLStyle_get_borderBottomColor,
|
|
|
|
HTMLStyle_put_borderLeftColor,
|
|
|
|
HTMLStyle_get_borderLeftColor,
|
|
|
|
HTMLStyle_put_borderWidth,
|
|
|
|
HTMLStyle_get_borderWidth,
|
|
|
|
HTMLStyle_put_borderTopWidth,
|
|
|
|
HTMLStyle_get_borderTopWidth,
|
|
|
|
HTMLStyle_put_borderRightWidth,
|
|
|
|
HTMLStyle_get_borderRightWidth,
|
|
|
|
HTMLStyle_put_borderBottomWidth,
|
|
|
|
HTMLStyle_get_borderBottomWidth,
|
|
|
|
HTMLStyle_put_borderLeftWidth,
|
|
|
|
HTMLStyle_get_borderLeftWidth,
|
|
|
|
HTMLStyle_put_borderStyle,
|
|
|
|
HTMLStyle_get_borderStyle,
|
|
|
|
HTMLStyle_put_borderTopStyle,
|
|
|
|
HTMLStyle_get_borderTopStyle,
|
|
|
|
HTMLStyle_put_borderRightStyle,
|
|
|
|
HTMLStyle_get_borderRightStyle,
|
|
|
|
HTMLStyle_put_borderBottomStyle,
|
|
|
|
HTMLStyle_get_borderBottomStyle,
|
|
|
|
HTMLStyle_put_borderLeftStyle,
|
|
|
|
HTMLStyle_get_borderLeftStyle,
|
|
|
|
HTMLStyle_put_width,
|
|
|
|
HTMLStyle_get_width,
|
|
|
|
HTMLStyle_put_height,
|
|
|
|
HTMLStyle_get_height,
|
|
|
|
HTMLStyle_put_styleFloat,
|
|
|
|
HTMLStyle_get_styleFloat,
|
|
|
|
HTMLStyle_put_clear,
|
|
|
|
HTMLStyle_get_clear,
|
|
|
|
HTMLStyle_put_display,
|
|
|
|
HTMLStyle_get_display,
|
|
|
|
HTMLStyle_put_visibility,
|
|
|
|
HTMLStyle_get_visibility,
|
|
|
|
HTMLStyle_put_listStyleType,
|
|
|
|
HTMLStyle_get_listStyleType,
|
|
|
|
HTMLStyle_put_listStylePosition,
|
|
|
|
HTMLStyle_get_listStylePosition,
|
|
|
|
HTMLStyle_put_listStyleImage,
|
|
|
|
HTMLStyle_get_listStyleImage,
|
|
|
|
HTMLStyle_put_listStyle,
|
|
|
|
HTMLStyle_get_listStyle,
|
|
|
|
HTMLStyle_put_whiteSpace,
|
|
|
|
HTMLStyle_get_whiteSpace,
|
|
|
|
HTMLStyle_put_top,
|
|
|
|
HTMLStyle_get_top,
|
|
|
|
HTMLStyle_put_left,
|
|
|
|
HTMLStyle_get_left,
|
|
|
|
HTMLStyle_get_position,
|
|
|
|
HTMLStyle_put_zIndex,
|
|
|
|
HTMLStyle_get_zIndex,
|
|
|
|
HTMLStyle_put_overflow,
|
|
|
|
HTMLStyle_get_overflow,
|
|
|
|
HTMLStyle_put_pageBreakBefore,
|
|
|
|
HTMLStyle_get_pageBreakBefore,
|
|
|
|
HTMLStyle_put_pageBreakAfter,
|
|
|
|
HTMLStyle_get_pageBreakAfter,
|
|
|
|
HTMLStyle_put_cssText,
|
|
|
|
HTMLStyle_get_cssText,
|
|
|
|
HTMLStyle_put_pixelTop,
|
|
|
|
HTMLStyle_get_pixelTop,
|
|
|
|
HTMLStyle_put_pixelLeft,
|
|
|
|
HTMLStyle_get_pixelLeft,
|
|
|
|
HTMLStyle_put_pixelWidth,
|
|
|
|
HTMLStyle_get_pixelWidth,
|
|
|
|
HTMLStyle_put_pixelHeight,
|
|
|
|
HTMLStyle_get_pixelHeight,
|
|
|
|
HTMLStyle_put_posTop,
|
|
|
|
HTMLStyle_get_posTop,
|
|
|
|
HTMLStyle_put_posLeft,
|
|
|
|
HTMLStyle_get_posLeft,
|
|
|
|
HTMLStyle_put_posWidth,
|
|
|
|
HTMLStyle_get_posWidth,
|
|
|
|
HTMLStyle_put_posHeight,
|
|
|
|
HTMLStyle_get_posHeight,
|
|
|
|
HTMLStyle_put_cursor,
|
|
|
|
HTMLStyle_get_cursor,
|
|
|
|
HTMLStyle_put_clip,
|
|
|
|
HTMLStyle_get_clip,
|
|
|
|
HTMLStyle_put_filter,
|
|
|
|
HTMLStyle_get_filter,
|
|
|
|
HTMLStyle_setAttribute,
|
|
|
|
HTMLStyle_getAttribute,
|
|
|
|
HTMLStyle_removeAttribute,
|
|
|
|
HTMLStyle_toString
|
|
|
|
};
|
|
|
|
|
2008-10-07 21:45:21 +02:00
|
|
|
static const dispex_static_data_vtbl_t HTMLStyle_dispex_vtbl = {
|
|
|
|
HTMLStyle_get_dispid,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2008-05-06 16:04:58 +02:00
|
|
|
static const tid_t HTMLStyle_iface_tids[] = {
|
|
|
|
IHTMLStyle_tid,
|
2008-10-02 12:37:44 +02:00
|
|
|
IHTMLStyle2_tid,
|
2009-03-05 10:03:56 +01:00
|
|
|
IHTMLStyle3_tid,
|
|
|
|
IHTMLStyle4_tid,
|
2008-05-06 16:04:58 +02:00
|
|
|
0
|
|
|
|
};
|
2008-04-30 18:20:58 +02:00
|
|
|
static dispex_static_data_t HTMLStyle_dispex = {
|
2008-10-07 21:45:21 +02:00
|
|
|
&HTMLStyle_dispex_vtbl,
|
2008-04-30 18:20:58 +02:00
|
|
|
DispHTMLStyle_tid,
|
|
|
|
NULL,
|
2008-05-06 16:04:58 +02:00
|
|
|
HTMLStyle_iface_tids
|
2008-04-30 18:20:58 +02:00
|
|
|
};
|
|
|
|
|
2006-11-17 13:05:01 +01:00
|
|
|
IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration *nsstyle)
|
2006-11-17 13:04:06 +01:00
|
|
|
{
|
2008-10-02 12:37:35 +02:00
|
|
|
HTMLStyle *ret = heap_alloc_zero(sizeof(HTMLStyle));
|
2006-11-17 13:04:06 +01:00
|
|
|
|
|
|
|
ret->lpHTMLStyleVtbl = &HTMLStyleVtbl;
|
|
|
|
ret->ref = 1;
|
2006-11-17 13:05:01 +01:00
|
|
|
ret->nsstyle = nsstyle;
|
2008-10-02 12:37:35 +02:00
|
|
|
HTMLStyle2_Init(ret);
|
2009-02-03 09:21:32 +01:00
|
|
|
HTMLStyle3_Init(ret);
|
2006-11-17 13:05:01 +01:00
|
|
|
|
|
|
|
nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
|
2006-11-17 13:04:06 +01:00
|
|
|
|
2008-04-30 18:20:58 +02:00
|
|
|
init_dispex(&ret->dispex, (IUnknown*)HTMLSTYLE(ret), &HTMLStyle_dispex);
|
|
|
|
|
2006-11-17 13:04:06 +01:00
|
|
|
return HTMLSTYLE(ret);
|
|
|
|
}
|