mshtml: Get rid of no longer needed argument in get_nsstyle_* implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-08-27 13:47:19 +02:00 committed by Alexandre Julliard
parent 45e2ae4b74
commit 9f75fb0cef
3 changed files with 74 additions and 75 deletions

View File

@ -158,7 +158,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BS
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_POSITION, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
@ -167,21 +167,21 @@ static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface,
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FLOAT, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_FLOAT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
@ -190,42 +190,42 @@ static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface,
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_FONT_FAMILY, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_FONT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_FONT_VARIANT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
return get_nsstyle_property_var(This->nsstyle, STYLEID_FONT_WEIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_FONT_SIZE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
@ -246,161 +246,161 @@ static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *i
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_LEFT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_TOP, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_HEIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_PADDING_LEFT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_PADDING_TOP, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_PADDING_RIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_TEXT_ALIGN, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_TEXT_DECORATION, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
@ -409,7 +409,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BST
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_DISPLAY, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
@ -418,42 +418,42 @@ static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface,
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_VISIBILITY, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
return get_nsstyle_property_var(This->nsstyle, STYLEID_Z_INDEX, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_LETTER_SPACING, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_LINE_HEIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_TEXT_INDENT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
@ -467,28 +467,28 @@ static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, V
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_MARGIN_TOP, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_MARGIN_LEFT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
@ -551,7 +551,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BS
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_OVERFLOW, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
@ -572,7 +572,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_CURSOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
@ -593,7 +593,7 @@ static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, B
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_DIRECTION, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_DIRECTION, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
@ -622,14 +622,14 @@ static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIA
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_RIGHT, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_BOTTOM, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
@ -741,35 +741,35 @@ static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface,
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_STYLE, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_COLOR, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_BORDER_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_PADDING, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_PADDING, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_MARGIN, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
@ -783,21 +783,21 @@ static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, B
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_X, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_OVERFLOW_X, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW_Y, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_OVERFLOW_Y, p);
}
static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_TRANSFORM, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_TEXT_TRANSFORM, p);
}
static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
@ -1197,7 +1197,7 @@ static HRESULT WINAPI HTMLCurrentStyle3_get_whiteSpace(IHTMLCurrentStyle3 *iface
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_WHITE_SPACE, p, 0);
return get_nsstyle_property(This->nsstyle, STYLEID_WHITE_SPACE, p);
}
static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl = {
@ -1283,7 +1283,7 @@ static HRESULT WINAPI HTMLCurrentStyle4_get_minWidth(IHTMLCurrentStyle4 *iface,
{
HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle4(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_WIDTH, p, 0);
return get_nsstyle_property_var(This->nsstyle, STYLEID_MIN_WIDTH, p);
}
static HRESULT WINAPI HTMLCurrentStyle4_get_maxWidth(IHTMLCurrentStyle4 *iface, VARIANT *p)

View File

@ -207,6 +207,12 @@ static const WCHAR word_wrapW[] =
static const WCHAR z_indexW[] =
{'z','-','i','n','d','e','x',0};
#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
static const WCHAR pxW[] = {'p','x',0};
@ -549,7 +555,7 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
return S_OK;
}
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p, DWORD flags)
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
{
nsAString str_value;
const PRUnichar *value;
@ -560,18 +566,19 @@ HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR
get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
nsAString_GetData(&str_value, &value);
hres = nsstyle_to_bstr(value, flags, p);
hres = nsstyle_to_bstr(value, style_tbl[sid].flags, p);
nsAString_Finish(&str_value);
TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
return hres;
}
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags)
HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p)
{
nsAString str_value;
const PRUnichar *value;
BOOL set = FALSE;
unsigned flags;
HRESULT hres = S_OK;
flags = style_tbl[sid].flags;
@ -619,12 +626,12 @@ HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
static inline HRESULT get_style_property(HTMLStyle *This, styleid_t sid, BSTR *p)
{
return get_nsstyle_attr(This->nsstyle, sid, p, style_tbl[sid].flags);
return get_nsstyle_property(This->nsstyle, sid, p);
}
static inline HRESULT get_style_property_var(HTMLStyle *This, styleid_t sid, VARIANT *v)
{
return get_nsstyle_attr_var(This->nsstyle, sid, v, style_tbl[sid].flags);
return get_nsstyle_property_var(This->nsstyle, sid, v);
}
static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
@ -4773,7 +4780,7 @@ HRESULT get_elem_style(HTMLElement *elem, styleid_t styleid, BSTR *ret)
if(FAILED(hres))
return hres;
hres = get_nsstyle_attr(style, styleid, ret, 0);
hres = get_nsstyle_property(style, styleid, ret);
nsIDOMCSSStyleDeclaration_Release(style);
return hres;
}

View File

@ -123,16 +123,8 @@ typedef enum {
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*,DWORD) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration*,styleid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
#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