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