2008-10-06 14:47:58 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2008 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
|
|
|
|
*/
|
|
|
|
|
2019-03-25 14:14:50 +00:00
|
|
|
typedef struct CSSStyle CSSStyle;
|
|
|
|
typedef void *(*style_qi_t)(CSSStyle*,REFIID);
|
|
|
|
|
|
|
|
struct CSSStyle {
|
2019-03-25 14:12:28 +00:00
|
|
|
DispatchEx dispex;
|
2019-03-25 14:14:50 +00:00
|
|
|
IHTMLCSSStyleDeclaration IHTMLCSSStyleDeclaration_iface;
|
2019-03-25 14:15:10 +00:00
|
|
|
IHTMLCSSStyleDeclaration2 IHTMLCSSStyleDeclaration2_iface;
|
2019-03-25 14:14:50 +00:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
style_qi_t qi;
|
|
|
|
|
2019-03-25 14:12:04 +00:00
|
|
|
nsIDOMCSSStyleDeclaration *nsstyle;
|
2019-03-25 14:14:50 +00:00
|
|
|
};
|
2019-03-25 14:12:04 +00:00
|
|
|
|
2008-12-30 20:23:56 +00:00
|
|
|
struct HTMLStyle {
|
2019-03-25 14:12:04 +00:00
|
|
|
CSSStyle css_style;
|
2011-01-04 01:00:53 +00:00
|
|
|
IHTMLStyle IHTMLStyle_iface;
|
2011-01-04 01:02:40 +00:00
|
|
|
IHTMLStyle2 IHTMLStyle2_iface;
|
2011-01-04 01:03:57 +00:00
|
|
|
IHTMLStyle3 IHTMLStyle3_iface;
|
2011-01-04 01:05:27 +00:00
|
|
|
IHTMLStyle4 IHTMLStyle4_iface;
|
2011-07-28 14:28:59 +00:00
|
|
|
IHTMLStyle5 IHTMLStyle5_iface;
|
2011-07-28 14:29:33 +00:00
|
|
|
IHTMLStyle6 IHTMLStyle6_iface;
|
2008-10-06 14:47:58 +00:00
|
|
|
|
2012-03-16 11:17:50 +00:00
|
|
|
HTMLElement *elem;
|
2008-12-30 20:23:56 +00:00
|
|
|
};
|
2008-10-06 14:47:58 +00:00
|
|
|
|
2008-10-07 19:45:21 +00:00
|
|
|
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
|
2008-10-06 14:48:25 +00:00
|
|
|
typedef enum {
|
2021-01-27 18:36:38 +00:00
|
|
|
STYLEID_ANIMATION,
|
2020-06-05 16:29:02 +00:00
|
|
|
STYLEID_ANIMATION_NAME,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_BACKGROUND,
|
2014-08-18 15:31:01 +00:00
|
|
|
STYLEID_BACKGROUND_ATTACHMENT,
|
2018-09-06 14:15:04 +00:00
|
|
|
STYLEID_BACKGROUND_CLIP,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_BACKGROUND_COLOR,
|
|
|
|
STYLEID_BACKGROUND_IMAGE,
|
2011-02-25 13:11:16 +00:00
|
|
|
STYLEID_BACKGROUND_POSITION,
|
2009-03-05 09:24:24 +00:00
|
|
|
STYLEID_BACKGROUND_POSITION_X,
|
2009-03-05 09:26:36 +00:00
|
|
|
STYLEID_BACKGROUND_POSITION_Y,
|
2009-02-25 04:50:33 +00:00
|
|
|
STYLEID_BACKGROUND_REPEAT,
|
2022-04-29 12:53:35 +00:00
|
|
|
STYLEID_BACKGROUND_SIZE,
|
2008-10-06 14:50:03 +00:00
|
|
|
STYLEID_BORDER,
|
2009-12-01 20:04:38 +00:00
|
|
|
STYLEID_BORDER_BOTTOM,
|
2009-09-14 10:57:18 +00:00
|
|
|
STYLEID_BORDER_BOTTOM_COLOR,
|
2009-01-13 07:38:32 +00:00
|
|
|
STYLEID_BORDER_BOTTOM_STYLE,
|
2009-03-05 09:41:39 +00:00
|
|
|
STYLEID_BORDER_BOTTOM_WIDTH,
|
2019-02-07 17:32:22 +00:00
|
|
|
STYLEID_BORDER_COLLAPSE,
|
2009-03-03 10:04:49 +00:00
|
|
|
STYLEID_BORDER_COLOR,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_BORDER_LEFT,
|
2009-09-14 10:41:22 +00:00
|
|
|
STYLEID_BORDER_LEFT_COLOR,
|
2009-01-13 07:30:17 +00:00
|
|
|
STYLEID_BORDER_LEFT_STYLE,
|
2009-03-05 09:44:38 +00:00
|
|
|
STYLEID_BORDER_LEFT_WIDTH,
|
2009-12-01 20:04:38 +00:00
|
|
|
STYLEID_BORDER_RIGHT,
|
2009-09-14 10:46:39 +00:00
|
|
|
STYLEID_BORDER_RIGHT_COLOR,
|
2009-01-13 07:39:23 +00:00
|
|
|
STYLEID_BORDER_RIGHT_STYLE,
|
2009-03-05 09:35:50 +00:00
|
|
|
STYLEID_BORDER_RIGHT_WIDTH,
|
2019-02-08 15:38:28 +00:00
|
|
|
STYLEID_BORDER_SPACING,
|
2009-03-02 10:58:55 +00:00
|
|
|
STYLEID_BORDER_STYLE,
|
2009-12-01 20:04:38 +00:00
|
|
|
STYLEID_BORDER_TOP,
|
2009-09-14 10:44:29 +00:00
|
|
|
STYLEID_BORDER_TOP_COLOR,
|
2009-01-13 07:40:01 +00:00
|
|
|
STYLEID_BORDER_TOP_STYLE,
|
2009-03-05 09:32:41 +00:00
|
|
|
STYLEID_BORDER_TOP_WIDTH,
|
2008-10-10 10:00:53 +00:00
|
|
|
STYLEID_BORDER_WIDTH,
|
2009-09-16 05:56:16 +00:00
|
|
|
STYLEID_BOTTOM,
|
2013-11-07 16:01:31 +00:00
|
|
|
STYLEID_BOX_SIZING,
|
2012-10-23 11:41:13 +00:00
|
|
|
STYLEID_CLEAR,
|
2011-07-15 13:38:08 +00:00
|
|
|
STYLEID_CLIP,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_COLOR,
|
2020-06-09 14:15:44 +00:00
|
|
|
STYLEID_COLUMN_COUNT,
|
2020-06-09 14:16:07 +00:00
|
|
|
STYLEID_COLUMN_FILL,
|
2020-06-09 14:16:00 +00:00
|
|
|
STYLEID_COLUMN_GAP,
|
2020-06-09 14:16:43 +00:00
|
|
|
STYLEID_COLUMN_RULE,
|
2020-06-09 14:16:19 +00:00
|
|
|
STYLEID_COLUMN_RULE_COLOR,
|
2020-06-09 14:16:28 +00:00
|
|
|
STYLEID_COLUMN_RULE_STYLE,
|
2020-06-09 14:16:36 +00:00
|
|
|
STYLEID_COLUMN_RULE_WIDTH,
|
2020-06-09 14:16:13 +00:00
|
|
|
STYLEID_COLUMN_SPAN,
|
2020-06-09 14:15:51 +00:00
|
|
|
STYLEID_COLUMN_WIDTH,
|
2008-10-06 14:50:46 +00:00
|
|
|
STYLEID_CURSOR,
|
2011-07-22 09:40:17 +00:00
|
|
|
STYLEID_DIRECTION,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_DISPLAY,
|
2008-10-07 19:45:46 +00:00
|
|
|
STYLEID_FILTER,
|
2014-12-15 18:13:13 +00:00
|
|
|
STYLEID_FLOAT,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_FONT_FAMILY,
|
|
|
|
STYLEID_FONT_SIZE,
|
|
|
|
STYLEID_FONT_STYLE,
|
2008-12-11 11:37:18 +00:00
|
|
|
STYLEID_FONT_VARIANT,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_FONT_WEIGHT,
|
2008-10-06 14:51:34 +00:00
|
|
|
STYLEID_HEIGHT,
|
2008-10-06 14:50:28 +00:00
|
|
|
STYLEID_LEFT,
|
2009-08-25 06:17:56 +00:00
|
|
|
STYLEID_LETTER_SPACING,
|
2009-09-18 10:18:45 +00:00
|
|
|
STYLEID_LINE_HEIGHT,
|
2014-08-20 13:35:43 +00:00
|
|
|
STYLEID_LIST_STYLE,
|
2014-08-10 13:14:37 +00:00
|
|
|
STYLEID_LISTSTYLEPOSITION,
|
2014-03-24 12:47:56 +00:00
|
|
|
STYLEID_LISTSTYLETYPE,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_MARGIN,
|
2009-09-16 05:48:43 +00:00
|
|
|
STYLEID_MARGIN_BOTTOM,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_MARGIN_LEFT,
|
|
|
|
STYLEID_MARGIN_RIGHT,
|
2009-09-16 05:46:16 +00:00
|
|
|
STYLEID_MARGIN_TOP,
|
2014-11-04 17:36:10 +00:00
|
|
|
STYLEID_MAX_HEIGHT,
|
2014-11-04 17:32:42 +00:00
|
|
|
STYLEID_MAX_WIDTH,
|
2009-02-17 09:29:58 +00:00
|
|
|
STYLEID_MIN_HEIGHT,
|
2014-09-02 02:20:01 +00:00
|
|
|
STYLEID_MIN_WIDTH,
|
2018-09-06 14:15:11 +00:00
|
|
|
STYLEID_OPACITY,
|
2013-09-30 14:05:34 +00:00
|
|
|
STYLEID_OUTLINE,
|
2008-11-25 10:04:11 +00:00
|
|
|
STYLEID_OVERFLOW,
|
2012-04-17 10:41:27 +00:00
|
|
|
STYLEID_OVERFLOW_X,
|
2012-04-17 10:41:40 +00:00
|
|
|
STYLEID_OVERFLOW_Y,
|
2010-11-28 23:18:48 +00:00
|
|
|
STYLEID_PADDING,
|
2009-09-14 11:15:31 +00:00
|
|
|
STYLEID_PADDING_BOTTOM,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_PADDING_LEFT,
|
2009-09-14 11:13:12 +00:00
|
|
|
STYLEID_PADDING_RIGHT,
|
2009-09-14 11:05:54 +00:00
|
|
|
STYLEID_PADDING_TOP,
|
2011-07-18 11:39:37 +00:00
|
|
|
STYLEID_PAGE_BREAK_AFTER,
|
2011-07-21 10:26:37 +00:00
|
|
|
STYLEID_PAGE_BREAK_BEFORE,
|
2020-06-10 16:21:59 +00:00
|
|
|
STYLEID_PERSPECTIVE,
|
2008-10-06 14:52:06 +00:00
|
|
|
STYLEID_POSITION,
|
2009-09-16 05:52:36 +00:00
|
|
|
STYLEID_RIGHT,
|
2014-08-18 15:30:46 +00:00
|
|
|
STYLEID_TABLE_LAYOUT,
|
2008-10-07 19:45:31 +00:00
|
|
|
STYLEID_TEXT_ALIGN,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_TEXT_DECORATION,
|
2009-09-18 10:21:56 +00:00
|
|
|
STYLEID_TEXT_INDENT,
|
2014-07-31 04:22:25 +00:00
|
|
|
STYLEID_TEXT_TRANSFORM,
|
2008-10-06 14:51:04 +00:00
|
|
|
STYLEID_TOP,
|
2020-06-05 16:28:48 +00:00
|
|
|
STYLEID_TRANSFORM,
|
2020-06-05 16:29:11 +00:00
|
|
|
STYLEID_TRANSITION,
|
2008-10-06 14:51:21 +00:00
|
|
|
STYLEID_VERTICAL_ALIGN,
|
2008-10-06 14:48:25 +00:00
|
|
|
STYLEID_VISIBILITY,
|
2013-08-28 15:51:08 +00:00
|
|
|
STYLEID_WHITE_SPACE,
|
2008-10-07 19:45:05 +00:00
|
|
|
STYLEID_WIDTH,
|
2009-08-21 10:55:29 +00:00
|
|
|
STYLEID_WORD_SPACING,
|
2009-08-01 22:09:49 +00:00
|
|
|
STYLEID_WORD_WRAP,
|
2014-12-15 18:13:13 +00:00
|
|
|
STYLEID_Z_INDEX,
|
|
|
|
STYLEID_MAX_VALUE
|
2008-10-06 14:48:25 +00:00
|
|
|
} styleid_t;
|
|
|
|
|
2012-07-25 12:46:54 +00:00
|
|
|
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
|
2020-06-09 14:17:13 +00:00
|
|
|
HRESULT create_computed_style(nsIDOMCSSStyleDeclaration*,compat_mode_t,IHTMLCSSStyleDeclaration**) DECLSPEC_HIDDEN;
|
2019-03-26 16:26:53 +00:00
|
|
|
void init_css_style(CSSStyle*,nsIDOMCSSStyleDeclaration*,style_qi_t,
|
|
|
|
dispex_static_data_t*,compat_mode_t) DECLSPEC_HIDDEN;
|
2008-10-06 14:49:24 +00:00
|
|
|
|
2019-03-26 16:27:16 +00:00
|
|
|
void CSSStyle_init_dispex_info(dispex_data_t *info, compat_mode_t mode) DECLSPEC_HIDDEN;
|
2020-01-23 23:05:22 +00:00
|
|
|
extern const dispex_static_data_vtbl_t CSSStyle_dispex_vtbl DECLSPEC_HIDDEN;
|
2019-03-26 16:27:16 +00:00
|
|
|
|
2019-03-26 16:27:00 +00:00
|
|
|
HRESULT get_style_property(CSSStyle*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT get_style_property_var(CSSStyle*,styleid_t,VARIANT*) DECLSPEC_HIDDEN;
|
2009-02-21 10:08:17 +00:00
|
|
|
|
2013-11-11 13:36:43 +00:00
|
|
|
HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
|