ReactOS  0.4.14-dev-552-g2fad488
htmlstyle.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HTMLStyle
 

Macros

#define ATTR_FIX_PX   0x0001
 
#define ATTR_FIX_URL   0x0002
 
#define ATTR_STR_TO_INT   0x0004
 
#define ATTR_HEX_INT   0x0008
 
#define ATTR_REMOVE_COMMA   0x0010
 
#define ATTR_NO_NULL   0x0020
 

Enumerations

enum  styleid_t {
  STYLEID_BACKGROUND, STYLEID_BACKGROUND_ATTACHMENT, STYLEID_BACKGROUND_COLOR, STYLEID_BACKGROUND_IMAGE,
  STYLEID_BACKGROUND_POSITION, STYLEID_BACKGROUND_POSITION_X, STYLEID_BACKGROUND_POSITION_Y, STYLEID_BACKGROUND_REPEAT,
  STYLEID_BORDER, STYLEID_BORDER_BOTTOM, STYLEID_BORDER_BOTTOM_COLOR, STYLEID_BORDER_BOTTOM_STYLE,
  STYLEID_BORDER_BOTTOM_WIDTH, STYLEID_BORDER_COLOR, STYLEID_BORDER_LEFT, STYLEID_BORDER_LEFT_COLOR,
  STYLEID_BORDER_LEFT_STYLE, STYLEID_BORDER_LEFT_WIDTH, STYLEID_BORDER_RIGHT, STYLEID_BORDER_RIGHT_COLOR,
  STYLEID_BORDER_RIGHT_STYLE, STYLEID_BORDER_RIGHT_WIDTH, STYLEID_BORDER_STYLE, STYLEID_BORDER_TOP,
  STYLEID_BORDER_TOP_COLOR, STYLEID_BORDER_TOP_STYLE, STYLEID_BORDER_TOP_WIDTH, STYLEID_BORDER_WIDTH,
  STYLEID_BOTTOM, STYLEID_BOX_SIZING, STYLEID_CLEAR, STYLEID_CLIP,
  STYLEID_COLOR, STYLEID_CURSOR, STYLEID_DIRECTION, STYLEID_DISPLAY,
  STYLEID_FILTER, STYLEID_FLOAT, STYLEID_FONT_FAMILY, STYLEID_FONT_SIZE,
  STYLEID_FONT_STYLE, STYLEID_FONT_VARIANT, STYLEID_FONT_WEIGHT, STYLEID_HEIGHT,
  STYLEID_LEFT, STYLEID_LETTER_SPACING, STYLEID_LINE_HEIGHT, STYLEID_LIST_STYLE,
  STYLEID_LISTSTYLEPOSITION, STYLEID_LISTSTYLETYPE, STYLEID_MARGIN, STYLEID_MARGIN_BOTTOM,
  STYLEID_MARGIN_LEFT, STYLEID_MARGIN_RIGHT, STYLEID_MARGIN_TOP, STYLEID_MAX_HEIGHT,
  STYLEID_MAX_WIDTH, STYLEID_MIN_HEIGHT, STYLEID_MIN_WIDTH, STYLEID_OUTLINE,
  STYLEID_OVERFLOW, STYLEID_OVERFLOW_X, STYLEID_OVERFLOW_Y, STYLEID_PADDING,
  STYLEID_PADDING_BOTTOM, STYLEID_PADDING_LEFT, STYLEID_PADDING_RIGHT, STYLEID_PADDING_TOP,
  STYLEID_PAGE_BREAK_AFTER, STYLEID_PAGE_BREAK_BEFORE, STYLEID_POSITION, STYLEID_RIGHT,
  STYLEID_TABLE_LAYOUT, STYLEID_TEXT_ALIGN, STYLEID_TEXT_DECORATION, STYLEID_TEXT_INDENT,
  STYLEID_TEXT_TRANSFORM, STYLEID_TOP, STYLEID_VERTICAL_ALIGN, STYLEID_VISIBILITY,
  STYLEID_WHITE_SPACE, STYLEID_WIDTH, STYLEID_WORD_SPACING, STYLEID_WORD_WRAP,
  STYLEID_Z_INDEX, STYLEID_MAX_VALUE
}
 

Functions

HRESULT HTMLStyle_Create (HTMLElement *, HTMLStyle **) DECLSPEC_HIDDEN
 
void HTMLStyle2_Init (HTMLStyle *) DECLSPEC_HIDDEN
 
void HTMLStyle3_Init (HTMLStyle *) DECLSPEC_HIDDEN
 
HRESULT get_nsstyle_attr (nsIDOMCSSStyleDeclaration *, styleid_t, BSTR *, DWORD) DECLSPEC_HIDDEN
 
HRESULT set_nsstyle_attr (nsIDOMCSSStyleDeclaration *, styleid_t, LPCWSTR, DWORD) DECLSPEC_HIDDEN
 
HRESULT set_nsstyle_attr_var (nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags) DECLSPEC_HIDDEN
 
HRESULT get_nsstyle_attr_var (nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags) DECLSPEC_HIDDEN
 
HRESULT get_elem_style (HTMLElement *, styleid_t, BSTR *) DECLSPEC_HIDDEN
 
HRESULT set_elem_style (HTMLElement *, styleid_t, const WCHAR *) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ ATTR_FIX_PX

#define ATTR_FIX_PX   0x0001

Definition at line 139 of file htmlstyle.h.

◆ ATTR_FIX_URL

#define ATTR_FIX_URL   0x0002

Definition at line 140 of file htmlstyle.h.

◆ ATTR_HEX_INT

#define ATTR_HEX_INT   0x0008

Definition at line 142 of file htmlstyle.h.

◆ ATTR_NO_NULL

#define ATTR_NO_NULL   0x0020

Definition at line 144 of file htmlstyle.h.

◆ ATTR_REMOVE_COMMA

#define ATTR_REMOVE_COMMA   0x0010

Definition at line 143 of file htmlstyle.h.

◆ ATTR_STR_TO_INT

#define ATTR_STR_TO_INT   0x0004

Definition at line 141 of file htmlstyle.h.

Enumeration Type Documentation

◆ styleid_t

Enumerator
STYLEID_BACKGROUND 
STYLEID_BACKGROUND_ATTACHMENT 
STYLEID_BACKGROUND_COLOR 
STYLEID_BACKGROUND_IMAGE 
STYLEID_BACKGROUND_POSITION 
STYLEID_BACKGROUND_POSITION_X 
STYLEID_BACKGROUND_POSITION_Y 
STYLEID_BACKGROUND_REPEAT 
STYLEID_BORDER 
STYLEID_BORDER_BOTTOM 
STYLEID_BORDER_BOTTOM_COLOR 
STYLEID_BORDER_BOTTOM_STYLE 
STYLEID_BORDER_BOTTOM_WIDTH 
STYLEID_BORDER_COLOR 
STYLEID_BORDER_LEFT 
STYLEID_BORDER_LEFT_COLOR 
STYLEID_BORDER_LEFT_STYLE 
STYLEID_BORDER_LEFT_WIDTH 
STYLEID_BORDER_RIGHT 
STYLEID_BORDER_RIGHT_COLOR 
STYLEID_BORDER_RIGHT_STYLE 
STYLEID_BORDER_RIGHT_WIDTH 
STYLEID_BORDER_STYLE 
STYLEID_BORDER_TOP 
STYLEID_BORDER_TOP_COLOR 
STYLEID_BORDER_TOP_STYLE 
STYLEID_BORDER_TOP_WIDTH 
STYLEID_BORDER_WIDTH 
STYLEID_BOTTOM 
STYLEID_BOX_SIZING 
STYLEID_CLEAR 
STYLEID_CLIP 
STYLEID_COLOR 
STYLEID_CURSOR 
STYLEID_DIRECTION 
STYLEID_DISPLAY 
STYLEID_FILTER 
STYLEID_FLOAT 
STYLEID_FONT_FAMILY 
STYLEID_FONT_SIZE 
STYLEID_FONT_STYLE 
STYLEID_FONT_VARIANT 
STYLEID_FONT_WEIGHT 
STYLEID_HEIGHT 
STYLEID_LEFT 
STYLEID_LETTER_SPACING 
STYLEID_LINE_HEIGHT 
STYLEID_LIST_STYLE 
STYLEID_LISTSTYLEPOSITION 
STYLEID_LISTSTYLETYPE 
STYLEID_MARGIN 
STYLEID_MARGIN_BOTTOM 
STYLEID_MARGIN_LEFT 
STYLEID_MARGIN_RIGHT 
STYLEID_MARGIN_TOP 
STYLEID_MAX_HEIGHT 
STYLEID_MAX_WIDTH 
STYLEID_MIN_HEIGHT 
STYLEID_MIN_WIDTH 
STYLEID_OUTLINE 
STYLEID_OVERFLOW 
STYLEID_OVERFLOW_X 
STYLEID_OVERFLOW_Y 
STYLEID_PADDING 
STYLEID_PADDING_BOTTOM 
STYLEID_PADDING_LEFT 
STYLEID_PADDING_RIGHT 
STYLEID_PADDING_TOP 
STYLEID_PAGE_BREAK_AFTER 
STYLEID_PAGE_BREAK_BEFORE 
STYLEID_POSITION 
STYLEID_RIGHT 
STYLEID_TABLE_LAYOUT 
STYLEID_TEXT_ALIGN 
STYLEID_TEXT_DECORATION 
STYLEID_TEXT_INDENT 
STYLEID_TEXT_TRANSFORM 
STYLEID_TOP 
STYLEID_VERTICAL_ALIGN 
STYLEID_VISIBILITY 
STYLEID_WHITE_SPACE 
STYLEID_WIDTH 
STYLEID_WORD_SPACING 
STYLEID_WORD_WRAP 
STYLEID_Z_INDEX 
STYLEID_MAX_VALUE 

Definition at line 37 of file htmlstyle.h.

37  {
115  STYLEID_TOP,
124 } styleid_t;
styleid_t
Definition: htmlstyle.h:37

Function Documentation

◆ get_elem_style()

HRESULT get_elem_style ( HTMLElement ,
styleid_t  ,
BSTR  
)

Definition at line 3219 of file htmlstyle.c.

3220 {
3222  HRESULT hres;
3223 
3225  if(FAILED(hres))
3226  return hres;
3227 
3228  hres = get_nsstyle_attr(style, styleid, ret, 0);
3229  nsIDOMCSSStyleDeclaration_Release(style);
3230  return hres;
3231 }
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p, DWORD flags)
Definition: htmlstyle.c:529
static size_t elem
Definition: string.c:68
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret)
Definition: htmlstyle.c:3164
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
int ret
Arabic default style
Definition: afstyles.h:93

Referenced by HTMLBodyElement_get_scroll().

◆ get_nsstyle_attr()

HRESULT get_nsstyle_attr ( nsIDOMCSSStyleDeclaration ,
styleid_t  ,
BSTR ,
DWORD   
)

Definition at line 529 of file htmlstyle.c.

530 {
531  nsAString str_value;
532  const PRUnichar *value;
533  HRESULT hres;
534 
535  nsAString_Init(&str_value, NULL);
536 
537  get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
538 
539  nsAString_GetData(&str_value, &value);
541  nsAString_Finish(&str_value);
542 
543  TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
544  return hres;
545 }
FT_UInt sid
Definition: cffcmap.c:139
static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
Definition: htmlstyle.c:465
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
GLsizei const GLfloat * value
Definition: glext.h:6069
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
Definition: name.c:38
WCHAR PRUnichar
Definition: nsiface.idl:48
static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
Definition: htmlstyle.c:483
static const style_tbl_entry_t style_tbl[]
Definition: htmlstyle.c:201
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by get_elem_style(), get_style_attr(), HTMLCurrentStyle3_get_whiteSpace(), HTMLCurrentStyle_get_backgroundImage(), HTMLCurrentStyle_get_backgroundRepeat(), HTMLCurrentStyle_get_borderBottomStyle(), HTMLCurrentStyle_get_borderColor(), HTMLCurrentStyle_get_borderLeftStyle(), HTMLCurrentStyle_get_borderRightStyle(), HTMLCurrentStyle_get_borderStyle(), HTMLCurrentStyle_get_borderTopStyle(), HTMLCurrentStyle_get_borderWidth(), HTMLCurrentStyle_get_cursor(), HTMLCurrentStyle_get_display(), HTMLCurrentStyle_get_fontFamily(), HTMLCurrentStyle_get_fontStyle(), HTMLCurrentStyle_get_fontVariant(), HTMLCurrentStyle_get_margin(), HTMLCurrentStyle_get_overflow(), HTMLCurrentStyle_get_padding(), HTMLCurrentStyle_get_position(), HTMLCurrentStyle_get_textAlign(), HTMLCurrentStyle_get_textDecoration(), HTMLCurrentStyle_get_textTransform(), HTMLCurrentStyle_get_visibility(), HTMLStyle2_get_direction(), HTMLStyle2_get_overflowX(), HTMLStyle2_get_overflowY(), HTMLStyle2_get_position(), HTMLStyle2_get_tableLayout(), HTMLStyle3_get_wordWrap(), HTMLStyle6_get_boxSizing(), HTMLStyle6_get_outline(), HTMLStyle_get_clip(), HTMLStyle_get_pageBreakAfter(), HTMLStyle_get_pageBreakBefore(), and HTMLStyle_get_whiteSpace().

◆ get_nsstyle_attr_var()

HRESULT get_nsstyle_attr_var ( nsIDOMCSSStyleDeclaration nsstyle,
styleid_t  sid,
VARIANT p,
DWORD  flags 
)

Definition at line 547 of file htmlstyle.c.

548 {
549  nsAString str_value;
550  const PRUnichar *value;
551  BOOL set = FALSE;
552  HRESULT hres = S_OK;
553 
554  nsAString_Init(&str_value, NULL);
555 
556  get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
557 
558  nsAString_GetData(&str_value, &value);
559 
560  if(flags & ATTR_STR_TO_INT) {
561  const PRUnichar *ptr = value;
562  BOOL neg = FALSE;
563  INT i = 0;
564 
565  if(*ptr == '-') {
566  neg = TRUE;
567  ptr++;
568  }
569 
570  while(isdigitW(*ptr))
571  i = i*10 + (*ptr++ - '0');
572 
573  if(!*ptr) {
574  V_VT(p) = VT_I4;
575  V_I4(p) = neg ? -i : i;
576  set = TRUE;
577  }
578  }
579 
580  if(!set) {
581  BSTR str;
582 
584  if(SUCCEEDED(hres)) {
585  V_VT(p) = VT_BSTR;
586  V_BSTR(p) = str;
587  }
588  }
589 
590  nsAString_Finish(&str_value);
591 
592  TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_variant(p));
593  return S_OK;
594 }
#define TRUE
Definition: types.h:120
Definition: compat.h:1947
#define ATTR_STR_TO_INT
Definition: htmlstyle.h:141
FT_UInt sid
Definition: cffcmap.c:139
OLECHAR * BSTR
Definition: compat.h:1942
static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, nsAString *value)
Definition: htmlstyle.c:465
int32_t INT
Definition: typedefs.h:56
#define V_I4(A)
Definition: oleauto.h:247
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
#define V_VT(A)
Definition: oleauto.h:211
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
GLsizei const GLfloat * value
Definition: glext.h:6069
#define V_BSTR(A)
Definition: oleauto.h:226
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE int isdigitW(WCHAR wc)
Definition: unicode.h:170
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
Definition: name.c:38
WCHAR PRUnichar
Definition: nsiface.idl:48
static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
Definition: htmlstyle.c:483
static const style_tbl_entry_t style_tbl[]
Definition: htmlstyle.c:201
GLfloat GLfloat p
Definition: glext.h:8902
Definition: _set.h:46
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by HTMLCurrentStyle_get_backgroundColor(), HTMLCurrentStyle_get_borderBottomColor(), HTMLCurrentStyle_get_borderBottomWidth(), HTMLCurrentStyle_get_borderLeftColor(), HTMLCurrentStyle_get_borderLeftWidth(), HTMLCurrentStyle_get_borderRightColor(), HTMLCurrentStyle_get_borderRightWidth(), HTMLCurrentStyle_get_borderTopColor(), HTMLCurrentStyle_get_borderTopWidth(), HTMLCurrentStyle_get_bottom(), HTMLCurrentStyle_get_color(), HTMLCurrentStyle_get_fontSize(), HTMLCurrentStyle_get_fontWeight(), HTMLCurrentStyle_get_height(), HTMLCurrentStyle_get_left(), HTMLCurrentStyle_get_letterSpacing(), HTMLCurrentStyle_get_lineHeight(), HTMLCurrentStyle_get_marginBottom(), HTMLCurrentStyle_get_marginLeft(), HTMLCurrentStyle_get_marginRight(), HTMLCurrentStyle_get_marginTop(), HTMLCurrentStyle_get_paddingBottom(), HTMLCurrentStyle_get_paddingLeft(), HTMLCurrentStyle_get_paddingRight(), HTMLCurrentStyle_get_paddingTop(), HTMLCurrentStyle_get_right(), HTMLCurrentStyle_get_textIndent(), HTMLCurrentStyle_get_top(), HTMLCurrentStyle_get_verticalAlign(), HTMLCurrentStyle_get_width(), HTMLCurrentStyle_get_zIndex(), HTMLStyle2_get_bottom(), HTMLStyle2_get_right(), HTMLStyle4_get_minHeight(), HTMLStyle5_get_maxHeight(), HTMLStyle5_get_maxWidth(), HTMLStyle5_get_minWidth(), HTMLStyle_get_backgroundColor(), HTMLStyle_get_borderBottomColor(), HTMLStyle_get_borderBottomWidth(), HTMLStyle_get_borderLeftColor(), HTMLStyle_get_borderLeftWidth(), HTMLStyle_get_borderRightColor(), HTMLStyle_get_borderRightWidth(), HTMLStyle_get_borderTopColor(), HTMLStyle_get_borderTopWidth(), HTMLStyle_get_color(), HTMLStyle_get_fontSize(), HTMLStyle_get_height(), HTMLStyle_get_left(), HTMLStyle_get_letterSpacing(), HTMLStyle_get_lineHeight(), HTMLStyle_get_marginBottom(), HTMLStyle_get_marginLeft(), HTMLStyle_get_marginRight(), HTMLStyle_get_marginTop(), HTMLStyle_get_paddingBottom(), HTMLStyle_get_paddingLeft(), HTMLStyle_get_paddingRight(), HTMLStyle_get_paddingTop(), HTMLStyle_get_textIndent(), HTMLStyle_get_top(), HTMLStyle_get_verticalAlign(), HTMLStyle_get_width(), HTMLStyle_get_wordSpacing(), and HTMLStyle_get_zIndex().

◆ HTMLStyle2_Init()

void HTMLStyle2_Init ( HTMLStyle )

Definition at line 620 of file htmlstyle2.c.

621 {
622  This->IHTMLStyle2_iface.lpVtbl = &HTMLStyle2Vtbl;
623 }
static const IHTMLStyle2Vtbl HTMLStyle2Vtbl
Definition: htmlstyle2.c:547

Referenced by HTMLStyle_Create().

◆ HTMLStyle3_Init()

void HTMLStyle3_Init ( HTMLStyle )

Definition at line 938 of file htmlstyle3.c.

939 {
940  This->IHTMLStyle3_iface.lpVtbl = &HTMLStyle3Vtbl;
941  This->IHTMLStyle4_iface.lpVtbl = &HTMLStyle4Vtbl;
942  This->IHTMLStyle5_iface.lpVtbl = &HTMLStyle5Vtbl;
943  This->IHTMLStyle6_iface.lpVtbl = &HTMLStyle6Vtbl;
944 }
static const IHTMLStyle3Vtbl HTMLStyle3Vtbl
Definition: htmlstyle3.c:320
static const IHTMLStyle6Vtbl HTMLStyle6Vtbl
Definition: htmlstyle3.c:896
static const IHTMLStyle4Vtbl HTMLStyle4Vtbl
Definition: htmlstyle3.c:452
static const IHTMLStyle5Vtbl HTMLStyle5Vtbl
Definition: htmlstyle3.c:590

Referenced by HTMLStyle_Create().

◆ HTMLStyle_Create()

HRESULT HTMLStyle_Create ( HTMLElement ,
HTMLStyle **   
)

Definition at line 3188 of file htmlstyle.c.

3189 {
3190  nsIDOMCSSStyleDeclaration *nsstyle;
3191  HTMLStyle *style;
3192  HRESULT hres;
3193 
3194  hres = get_style_from_elem(elem, &nsstyle);
3195  if(FAILED(hres))
3196  return hres;
3197 
3198  style = heap_alloc_zero(sizeof(HTMLStyle));
3199  if(!style) {
3200  nsIDOMCSSStyleDeclaration_Release(nsstyle);
3201  return E_OUTOFMEMORY;
3202  }
3203 
3204  style->IHTMLStyle_iface.lpVtbl = &HTMLStyleVtbl;
3205  style->ref = 1;
3206  style->nsstyle = nsstyle;
3207  style->elem = elem;
3210 
3211  nsIDOMCSSStyleDeclaration_AddRef(nsstyle);
3212 
3213  init_dispex(&style->dispex, (IUnknown*)&style->IHTMLStyle_iface, &HTMLStyle_dispex);
3214 
3215  *ret = style;
3216  return S_OK;
3217 }
static dispex_static_data_t HTMLStyle_dispex
Definition: htmlstyle.c:3157
void HTMLStyle3_Init(HTMLStyle *) DECLSPEC_HIDDEN
Definition: htmlstyle3.c:938
void HTMLStyle2_Init(HTMLStyle *) DECLSPEC_HIDDEN
Definition: htmlstyle2.c:620
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static size_t elem
Definition: string.c:68
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret)
Definition: htmlstyle.c:3164
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
int ret
#define S_OK
Definition: intsafe.h:59
static const IHTMLStyleVtbl HTMLStyleVtbl
Definition: htmlstyle.c:2939
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
Arabic default style
Definition: afstyles.h:93

Referenced by HTMLElement2_get_runtimeStyle(), and HTMLElement_get_style().

◆ set_elem_style()

HRESULT set_elem_style ( HTMLElement ,
styleid_t  ,
const WCHAR  
)

Definition at line 3233 of file htmlstyle.c.

3234 {
3236  HRESULT hres;
3237 
3239  if(FAILED(hres))
3240  return hres;
3241 
3242  hres = set_nsstyle_attr(style, styleid, val, 0);
3243  nsIDOMCSSStyleDeclaration_Release(style);
3244  return hres;
3245 }
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, const WCHAR *value, DWORD flags)
Definition: htmlstyle.c:382
static size_t elem
Definition: string.c:68
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret)
Definition: htmlstyle.c:3164
GLuint GLfloat * val
Definition: glext.h:7180
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
Arabic default style
Definition: afstyles.h:93

Referenced by HTMLBodyElement_put_scroll().

◆ set_nsstyle_attr()

HRESULT set_nsstyle_attr ( nsIDOMCSSStyleDeclaration ,
styleid_t  ,
LPCWSTR  ,
DWORD   
)

◆ set_nsstyle_attr_var()

HRESULT set_nsstyle_attr_var ( nsIDOMCSSStyleDeclaration nsstyle,
styleid_t  sid,
VARIANT value,
DWORD  flags 
)

Definition at line 447 of file htmlstyle.c.

448 {
449  const WCHAR *val;
450  WCHAR buf[14];
451  HRESULT hres;
452 
454  if(FAILED(hres))
455  return hres;
456 
457  return set_nsstyle_attr(nsstyle, sid, val, flags);
458 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static HRESULT var_to_styleval(const VARIANT *v, WCHAR *buf, DWORD flags, const WCHAR **ret)
Definition: htmlstyle.c:411
FT_UInt sid
Definition: cffcmap.c:139
HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, const WCHAR *value, DWORD flags)
Definition: htmlstyle.c:382
GLuint GLfloat * val
Definition: glext.h:7180
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161

Referenced by HTMLStyle2_put_bottom(), HTMLStyle2_put_right(), HTMLStyle4_put_minHeight(), HTMLStyle5_put_maxHeight(), HTMLStyle5_put_maxWidth(), HTMLStyle5_put_minWidth(), HTMLStyle_put_backgroundColor(), HTMLStyle_put_borderBottomColor(), HTMLStyle_put_borderBottomWidth(), HTMLStyle_put_borderLeftColor(), HTMLStyle_put_borderLeftWidth(), HTMLStyle_put_borderRightColor(), HTMLStyle_put_borderRightWidth(), HTMLStyle_put_borderTopColor(), HTMLStyle_put_borderTopWidth(), HTMLStyle_put_color(), HTMLStyle_put_fontSize(), HTMLStyle_put_height(), HTMLStyle_put_left(), HTMLStyle_put_letterSpacing(), HTMLStyle_put_lineHeight(), HTMLStyle_put_marginBottom(), HTMLStyle_put_marginLeft(), HTMLStyle_put_marginRight(), HTMLStyle_put_marginTop(), HTMLStyle_put_paddingBottom(), HTMLStyle_put_paddingLeft(), HTMLStyle_put_paddingRight(), HTMLStyle_put_paddingTop(), HTMLStyle_put_textIndent(), HTMLStyle_put_top(), HTMLStyle_put_verticalAlign(), HTMLStyle_put_width(), HTMLStyle_put_wordSpacing(), and HTMLStyle_put_zIndex().