ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

htmlcurstyle.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 Jacek Caban for CodeWeavers
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #include <stdarg.h>
00020 
00021 #define COBJMACROS
00022 
00023 #include "windef.h"
00024 #include "winbase.h"
00025 #include "winuser.h"
00026 #include "ole2.h"
00027 
00028 #include "mshtml_private.h"
00029 #include "htmlstyle.h"
00030 
00031 #include "wine/debug.h"
00032 
00033 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
00034 
00035 struct HTMLCurrentStyle {
00036     DispatchEx dispex;
00037     const IHTMLCurrentStyleVtbl *lpIHTMLCurrentStyleVtbl;
00038 
00039     LONG ref;
00040 
00041     nsIDOMCSSStyleDeclaration *nsstyle;
00042 };
00043 
00044 #define HTMLCURSTYLE(x)  ((IHTMLCurrentStyle*)  &(x)->lpIHTMLCurrentStyleVtbl)
00045 
00046 #define HTMLCURSTYLE_THIS(iface) DEFINE_THIS(HTMLCurrentStyle, IHTMLCurrentStyle, iface)
00047 
00048 static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, REFIID riid, void **ppv)
00049 {
00050     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00051 
00052     *ppv = NULL;
00053 
00054     if(IsEqualGUID(&IID_IUnknown, riid)) {
00055         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
00056         *ppv = HTMLCURSTYLE(This);
00057     }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) {
00058         TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv);
00059         *ppv = HTMLCURSTYLE(This);
00060     }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
00061         return *ppv ? S_OK : E_NOINTERFACE;
00062     }
00063 
00064     if(*ppv) {
00065         IUnknown_AddRef((IUnknown*)*ppv);
00066         return S_OK;
00067     }
00068 
00069     WARN("unsupported %s\n", debugstr_guid(riid));
00070     return E_NOINTERFACE;
00071 }
00072 
00073 static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface)
00074 {
00075     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00076     LONG ref = InterlockedIncrement(&This->ref);
00077 
00078     TRACE("(%p) ref=%d\n", This, ref);
00079 
00080     return ref;
00081 }
00082 
00083 static ULONG WINAPI HTMLCurrentStyle_Release(IHTMLCurrentStyle *iface)
00084 {
00085     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00086     LONG ref = InterlockedDecrement(&This->ref);
00087 
00088     TRACE("(%p) ref=%d\n", This, ref);
00089 
00090     if(!ref) {
00091         if(This->nsstyle)
00092             nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
00093         release_dispex(&This->dispex);
00094         heap_free(This);
00095     }
00096 
00097     return ref;
00098 }
00099 
00100 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfoCount(IHTMLCurrentStyle *iface, UINT *pctinfo)
00101 {
00102     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00103     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
00104 }
00105 
00106 static HRESULT WINAPI HTMLCurrentStyle_GetTypeInfo(IHTMLCurrentStyle *iface, UINT iTInfo,
00107         LCID lcid, ITypeInfo **ppTInfo)
00108 {
00109     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00110     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
00111 }
00112 
00113 static HRESULT WINAPI HTMLCurrentStyle_GetIDsOfNames(IHTMLCurrentStyle *iface, REFIID riid,
00114         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
00115 {
00116     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00117     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
00118 }
00119 
00120 static HRESULT WINAPI HTMLCurrentStyle_Invoke(IHTMLCurrentStyle *iface, DISPID dispIdMember,
00121         REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00122         VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00123 {
00124     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00125     return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
00126             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
00127 }
00128 
00129 static HRESULT WINAPI HTMLCurrentStyle_get_position(IHTMLCurrentStyle *iface, BSTR *p)
00130 {
00131     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00132 
00133     TRACE("(%p)->(%p)\n", This, p);
00134 
00135     return get_nsstyle_attr(This->nsstyle, STYLEID_POSITION, p);
00136 }
00137 
00138 static HRESULT WINAPI HTMLCurrentStyle_get_styleFloat(IHTMLCurrentStyle *iface, BSTR *p)
00139 {
00140     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00141     FIXME("(%p)->(%p)\n", This, p);
00142     return E_NOTIMPL;
00143 }
00144 
00145 static HRESULT WINAPI HTMLCurrentStyle_get_color(IHTMLCurrentStyle *iface, VARIANT *p)
00146 {
00147     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00148     TRACE("(%p)->(%p)\n", This, p);
00149     return get_nsstyle_attr_var(This->nsstyle, STYLEID_COLOR, p, 0);
00150 }
00151 
00152 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundColor(IHTMLCurrentStyle *iface, VARIANT *p)
00153 {
00154     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00155     TRACE("(%p)->(%p)\n", This, p);
00156     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BACKGROUND_COLOR, p, 0);
00157 }
00158 
00159 static HRESULT WINAPI HTMLCurrentStyle_get_fontFamily(IHTMLCurrentStyle *iface, BSTR *p)
00160 {
00161     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00162 
00163     TRACE("(%p)->(%p)\n", This, p);
00164 
00165     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_FAMILY, p);
00166 }
00167 
00168 static HRESULT WINAPI HTMLCurrentStyle_get_fontStyle(IHTMLCurrentStyle *iface, BSTR *p)
00169 {
00170     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00171     TRACE("(%p)->(%p)\n", This, p);
00172     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_STYLE, p);
00173 }
00174 
00175 static HRESULT WINAPI HTMLCurrentStyle_get_fontVariant(IHTMLCurrentStyle *iface, BSTR *p)
00176 {
00177     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00178     TRACE("(%p)->(%p)\n", This, p);
00179     return get_nsstyle_attr(This->nsstyle, STYLEID_FONT_VARIANT, p);
00180 }
00181 
00182 static HRESULT WINAPI HTMLCurrentStyle_get_fontWeight(IHTMLCurrentStyle *iface, VARIANT *p)
00183 {
00184     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00185     TRACE("(%p)->(%p)\n", This, p);
00186     return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_WEIGHT, p, ATTR_STR_TO_INT);
00187 }
00188 
00189 static HRESULT WINAPI HTMLCurrentStyle_get_fontSize(IHTMLCurrentStyle *iface, VARIANT *p)
00190 {
00191     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00192     TRACE("(%p)->(%p)\n", This, p);
00193     return get_nsstyle_attr_var(This->nsstyle, STYLEID_FONT_SIZE, p, 0);
00194 }
00195 
00196 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundImage(IHTMLCurrentStyle *iface, BSTR *p)
00197 {
00198     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00199     TRACE("(%p)->(%p)\n", This, p);
00200     return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_IMAGE, p);
00201 }
00202 
00203 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionX(IHTMLCurrentStyle *iface, VARIANT *p)
00204 {
00205     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00206     FIXME("(%p)->(%p)\n", This, p);
00207     return E_NOTIMPL;
00208 }
00209 
00210 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundPositionY(IHTMLCurrentStyle *iface, VARIANT *p)
00211 {
00212     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00213     FIXME("(%p)->(%p)\n", This, p);
00214     return E_NOTIMPL;
00215 }
00216 
00217 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundRepeat(IHTMLCurrentStyle *iface, BSTR *p)
00218 {
00219     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00220     TRACE("(%p)->(%p)\n", This, p);
00221     return get_nsstyle_attr(This->nsstyle, STYLEID_BACKGROUND_REPEAT, p);
00222 }
00223 
00224 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftColor(IHTMLCurrentStyle *iface, VARIANT *p)
00225 {
00226     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00227     TRACE("(%p)->(%p)\n", This, p);
00228     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_COLOR, p, 0);
00229 }
00230 
00231 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopColor(IHTMLCurrentStyle *iface, VARIANT *p)
00232 {
00233     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00234     TRACE("(%p)->(%p)\n", This, p);
00235     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_COLOR, p, 0);
00236 }
00237 
00238 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightColor(IHTMLCurrentStyle *iface, VARIANT *p)
00239 {
00240     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00241     TRACE("(%p)->(%p)\n", This, p);
00242     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_COLOR, p, 0);
00243 }
00244 
00245 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomColor(IHTMLCurrentStyle *iface, VARIANT *p)
00246 {
00247     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00248     TRACE("(%p)->(%p)\n", This, p);
00249     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_COLOR, p, 0);
00250 }
00251 
00252 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopStyle(IHTMLCurrentStyle *iface, BSTR *p)
00253 {
00254     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00255     TRACE("(%p)->(%p)\n", This, p);
00256     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_TOP_STYLE, p);
00257 }
00258 
00259 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightStyle(IHTMLCurrentStyle *iface, BSTR *p)
00260 {
00261     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00262     TRACE("(%p)->(%p)\n", This, p);
00263     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_RIGHT_STYLE, p);
00264 }
00265 
00266 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomStyle(IHTMLCurrentStyle *iface, BSTR *p)
00267 {
00268     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00269     TRACE("(%p)->(%p)\n", This, p);
00270     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_BOTTOM_STYLE, p);
00271 }
00272 
00273 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftStyle(IHTMLCurrentStyle *iface, BSTR *p)
00274 {
00275     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00276     TRACE("(%p)->(%p)\n", This, p);
00277     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_LEFT_STYLE, p);
00278 }
00279 
00280 static HRESULT WINAPI HTMLCurrentStyle_get_borderTopWidth(IHTMLCurrentStyle *iface, VARIANT *p)
00281 {
00282     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00283     TRACE("(%p)->(%p)\n", This, p);
00284     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_TOP_WIDTH, p, 0);
00285 }
00286 
00287 static HRESULT WINAPI HTMLCurrentStyle_get_borderRightWidth(IHTMLCurrentStyle *iface, VARIANT *p)
00288 {
00289     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00290     TRACE("(%p)->(%p)\n", This, p);
00291     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_RIGHT_WIDTH, p, 0);
00292 }
00293 
00294 static HRESULT WINAPI HTMLCurrentStyle_get_borderBottomWidth(IHTMLCurrentStyle *iface, VARIANT *p)
00295 {
00296     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00297     TRACE("(%p)->(%p)\n", This, p);
00298     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_BOTTOM_WIDTH, p, 0);
00299 }
00300 
00301 static HRESULT WINAPI HTMLCurrentStyle_get_borderLeftWidth(IHTMLCurrentStyle *iface, VARIANT *p)
00302 {
00303     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00304     TRACE("(%p)->(%p)\n", This, p);
00305     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BORDER_LEFT_WIDTH, p, 0);
00306 }
00307 
00308 static HRESULT WINAPI HTMLCurrentStyle_get_left(IHTMLCurrentStyle *iface, VARIANT *p)
00309 {
00310     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00311     TRACE("(%p)->(%p)\n", This, p);
00312     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LEFT, p, 0);
00313 }
00314 
00315 static HRESULT WINAPI HTMLCurrentStyle_get_top(IHTMLCurrentStyle *iface, VARIANT *p)
00316 {
00317     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00318     TRACE("(%p)->(%p)\n", This, p);
00319     return get_nsstyle_attr_var(This->nsstyle, STYLEID_TOP, p, 0);
00320 }
00321 
00322 static HRESULT WINAPI HTMLCurrentStyle_get_width(IHTMLCurrentStyle *iface, VARIANT *p)
00323 {
00324     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00325     TRACE("(%p)->(%p)\n", This, p);
00326     return get_nsstyle_attr_var(This->nsstyle, STYLEID_WIDTH, p, 0);
00327 }
00328 
00329 static HRESULT WINAPI HTMLCurrentStyle_get_height(IHTMLCurrentStyle *iface, VARIANT *p)
00330 {
00331     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00332     TRACE("(%p)->(%p)\n", This, p);
00333     return get_nsstyle_attr_var(This->nsstyle, STYLEID_HEIGHT, p, 0);
00334 }
00335 
00336 static HRESULT WINAPI HTMLCurrentStyle_get_paddingLeft(IHTMLCurrentStyle *iface, VARIANT *p)
00337 {
00338     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00339     TRACE("(%p)->(%p)\n", This, p);
00340     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_LEFT, p, 0);
00341 }
00342 
00343 static HRESULT WINAPI HTMLCurrentStyle_get_paddingTop(IHTMLCurrentStyle *iface, VARIANT *p)
00344 {
00345     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00346     TRACE("(%p)->(%p)\n", This, p);
00347     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_TOP, p, 0);
00348 }
00349 
00350 static HRESULT WINAPI HTMLCurrentStyle_get_paddingRight(IHTMLCurrentStyle *iface, VARIANT *p)
00351 {
00352     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00353     TRACE("(%p)->(%p)\n", This, p);
00354     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_RIGHT, p, 0);
00355 }
00356 
00357 static HRESULT WINAPI HTMLCurrentStyle_get_paddingBottom(IHTMLCurrentStyle *iface, VARIANT *p)
00358 {
00359     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00360     TRACE("(%p)->(%p)\n", This, p);
00361     return get_nsstyle_attr_var(This->nsstyle, STYLEID_PADDING_BOTTOM, p, 0);
00362 }
00363 
00364 static HRESULT WINAPI HTMLCurrentStyle_get_textAlign(IHTMLCurrentStyle *iface, BSTR *p)
00365 {
00366     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00367     TRACE("(%p)->(%p)\n", This, p);
00368     return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_ALIGN, p);
00369 }
00370 
00371 static HRESULT WINAPI HTMLCurrentStyle_get_textDecoration(IHTMLCurrentStyle *iface, BSTR *p)
00372 {
00373     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00374     TRACE("(%p)->(%p)\n", This, p);
00375     return get_nsstyle_attr(This->nsstyle, STYLEID_TEXT_DECORATION, p);
00376 }
00377 
00378 static HRESULT WINAPI HTMLCurrentStyle_get_display(IHTMLCurrentStyle *iface, BSTR *p)
00379 {
00380     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00381 
00382     TRACE("(%p)->(%p)\n", This, p);
00383 
00384     return get_nsstyle_attr(This->nsstyle, STYLEID_DISPLAY, p);
00385 }
00386 
00387 static HRESULT WINAPI HTMLCurrentStyle_get_visibility(IHTMLCurrentStyle *iface, BSTR *p)
00388 {
00389     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00390 
00391     TRACE("(%p)->(%p)\n", This, p);
00392 
00393     return get_nsstyle_attr(This->nsstyle, STYLEID_VISIBILITY, p);
00394 }
00395 
00396 static HRESULT WINAPI HTMLCurrentStyle_get_zIndex(IHTMLCurrentStyle *iface, VARIANT *p)
00397 {
00398     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00399     TRACE("(%p)->(%p)\n", This, p);
00400     return get_nsstyle_attr_var(This->nsstyle, STYLEID_Z_INDEX, p, ATTR_STR_TO_INT);
00401 }
00402 
00403 static HRESULT WINAPI HTMLCurrentStyle_get_letterSpacing(IHTMLCurrentStyle *iface, VARIANT *p)
00404 {
00405     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00406     TRACE("(%p)->(%p)\n", This, p);
00407     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LETTER_SPACING, p, 0);
00408 }
00409 
00410 static HRESULT WINAPI HTMLCurrentStyle_get_lineHeight(IHTMLCurrentStyle *iface, VARIANT *p)
00411 {
00412     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00413     TRACE("(%p)->(%p)\n", This, p);
00414     return get_nsstyle_attr_var(This->nsstyle, STYLEID_LINE_HEIGHT, p, 0);
00415 }
00416 
00417 static HRESULT WINAPI HTMLCurrentStyle_get_textIndent(IHTMLCurrentStyle *iface, VARIANT *p)
00418 {
00419     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00420     TRACE("(%p)->(%p)\n", This, p);
00421     return get_nsstyle_attr_var(This->nsstyle, STYLEID_TEXT_INDENT, p, 0);
00422 }
00423 
00424 static HRESULT WINAPI HTMLCurrentStyle_get_verticalAlign(IHTMLCurrentStyle *iface, VARIANT *p)
00425 {
00426     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00427     TRACE("(%p)->(%p)\n", This, p);
00428     return get_nsstyle_attr_var(This->nsstyle, STYLEID_VERTICAL_ALIGN, p, 0);
00429 }
00430 
00431 static HRESULT WINAPI HTMLCurrentStyle_get_backgroundAttachment(IHTMLCurrentStyle *iface, BSTR *p)
00432 {
00433     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00434     FIXME("(%p)->(%p)\n", This, p);
00435     return E_NOTIMPL;
00436 }
00437 
00438 static HRESULT WINAPI HTMLCurrentStyle_get_marginTop(IHTMLCurrentStyle *iface, VARIANT *p)
00439 {
00440     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00441     TRACE("(%p)->(%p)\n", This, p);
00442     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_TOP, p, 0);
00443 }
00444 
00445 static HRESULT WINAPI HTMLCurrentStyle_get_marginRight(IHTMLCurrentStyle *iface, VARIANT *p)
00446 {
00447     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00448     TRACE("(%p)->(%p)\n", This, p);
00449     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0);
00450 }
00451 
00452 static HRESULT WINAPI HTMLCurrentStyle_get_marginBottom(IHTMLCurrentStyle *iface, VARIANT *p)
00453 {
00454     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00455     TRACE("(%p)->(%p)\n", This, p);
00456     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_BOTTOM, p, 0);
00457 }
00458 
00459 static HRESULT WINAPI HTMLCurrentStyle_get_marginLeft(IHTMLCurrentStyle *iface, VARIANT *p)
00460 {
00461     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00462     TRACE("(%p)->(%p)\n", This, p);
00463     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0);
00464 }
00465 
00466 static HRESULT WINAPI HTMLCurrentStyle_get_clear(IHTMLCurrentStyle *iface, BSTR *p)
00467 {
00468     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00469     FIXME("(%p)->(%p)\n", This, p);
00470     return E_NOTIMPL;
00471 }
00472 
00473 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleType(IHTMLCurrentStyle *iface, BSTR *p)
00474 {
00475     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00476     FIXME("(%p)->(%p)\n", This, p);
00477     return E_NOTIMPL;
00478 }
00479 
00480 static HRESULT WINAPI HTMLCurrentStyle_get_listStylePosition(IHTMLCurrentStyle *iface, BSTR *p)
00481 {
00482     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00483     FIXME("(%p)->(%p)\n", This, p);
00484     return E_NOTIMPL;
00485 }
00486 
00487 static HRESULT WINAPI HTMLCurrentStyle_get_listStyleImage(IHTMLCurrentStyle *iface, BSTR *p)
00488 {
00489     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00490     FIXME("(%p)->(%p)\n", This, p);
00491     return E_NOTIMPL;
00492 }
00493 
00494 static HRESULT WINAPI HTMLCurrentStyle_get_clipTop(IHTMLCurrentStyle *iface, VARIANT *p)
00495 {
00496     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00497     FIXME("(%p)->(%p)\n", This, p);
00498     return E_NOTIMPL;
00499 }
00500 
00501 static HRESULT WINAPI HTMLCurrentStyle_get_clipRight(IHTMLCurrentStyle *iface, VARIANT *p)
00502 {
00503     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00504     FIXME("(%p)->(%p)\n", This, p);
00505     return E_NOTIMPL;
00506 }
00507 
00508 static HRESULT WINAPI HTMLCurrentStyle_get_clipBottom(IHTMLCurrentStyle *iface, VARIANT *p)
00509 {
00510     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00511     FIXME("(%p)->(%p)\n", This, p);
00512     return E_NOTIMPL;
00513 }
00514 
00515 static HRESULT WINAPI HTMLCurrentStyle_get_clipLeft(IHTMLCurrentStyle *iface, VARIANT *p)
00516 {
00517     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00518     FIXME("(%p)->(%p)\n", This, p);
00519     return E_NOTIMPL;
00520 }
00521 
00522 static HRESULT WINAPI HTMLCurrentStyle_get_overflow(IHTMLCurrentStyle *iface, BSTR *p)
00523 {
00524     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00525     TRACE("(%p)->(%p)\n", This, p);
00526     return get_nsstyle_attr(This->nsstyle, STYLEID_OVERFLOW, p);
00527 }
00528 
00529 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakBefore(IHTMLCurrentStyle *iface, BSTR *p)
00530 {
00531     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00532     FIXME("(%p)->(%p)\n", This, p);
00533     return E_NOTIMPL;
00534 }
00535 
00536 static HRESULT WINAPI HTMLCurrentStyle_get_pageBreakAfter(IHTMLCurrentStyle *iface, BSTR *p)
00537 {
00538     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00539     FIXME("(%p)->(%p)\n", This, p);
00540     return E_NOTIMPL;
00541 }
00542 
00543 static HRESULT WINAPI HTMLCurrentStyle_get_cursor(IHTMLCurrentStyle *iface, BSTR *p)
00544 {
00545     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00546     TRACE("(%p)->(%p)\n", This, p);
00547     return get_nsstyle_attr(This->nsstyle, STYLEID_CURSOR, p);
00548 }
00549 
00550 static HRESULT WINAPI HTMLCurrentStyle_get_tableLayout(IHTMLCurrentStyle *iface, BSTR *p)
00551 {
00552     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00553     FIXME("(%p)->(%p)\n", This, p);
00554     return E_NOTIMPL;
00555 }
00556 
00557 static HRESULT WINAPI HTMLCurrentStyle_get_borderCollapse(IHTMLCurrentStyle *iface, BSTR *p)
00558 {
00559     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00560     FIXME("(%p)->(%p)\n", This, p);
00561     return E_NOTIMPL;
00562 }
00563 
00564 static HRESULT WINAPI HTMLCurrentStyle_get_direction(IHTMLCurrentStyle *iface, BSTR *p)
00565 {
00566     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00567     FIXME("(%p)->(%p)\n", This, p);
00568     return E_NOTIMPL;
00569 }
00570 
00571 static HRESULT WINAPI HTMLCurrentStyle_get_behavior(IHTMLCurrentStyle *iface, BSTR *p)
00572 {
00573     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00574     FIXME("(%p)->(%p)\n", This, p);
00575     return E_NOTIMPL;
00576 }
00577 
00578 static HRESULT WINAPI HTMLCurrentStyle_getAttribute(IHTMLCurrentStyle *iface, BSTR strAttributeName,
00579         LONG lFlags, VARIANT *AttributeValue)
00580 {
00581     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00582     FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(strAttributeName), lFlags, AttributeValue);
00583     return E_NOTIMPL;
00584 }
00585 
00586 static HRESULT WINAPI HTMLCurrentStyle_get_unicodeBidi(IHTMLCurrentStyle *iface, BSTR *p)
00587 {
00588     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00589     FIXME("(%p)->(%p)\n", This, p);
00590     return E_NOTIMPL;
00591 }
00592 
00593 static HRESULT WINAPI HTMLCurrentStyle_get_right(IHTMLCurrentStyle *iface, VARIANT *p)
00594 {
00595     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00596     TRACE("(%p)->(%p)\n", This, p);
00597     return get_nsstyle_attr_var(This->nsstyle, STYLEID_RIGHT, p, 0);
00598 }
00599 
00600 static HRESULT WINAPI HTMLCurrentStyle_get_bottom(IHTMLCurrentStyle *iface, VARIANT *p)
00601 {
00602     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00603     TRACE("(%p)->(%p)\n", This, p);
00604     return get_nsstyle_attr_var(This->nsstyle, STYLEID_BOTTOM, p, 0);
00605 }
00606 
00607 static HRESULT WINAPI HTMLCurrentStyle_get_imeMode(IHTMLCurrentStyle *iface, BSTR *p)
00608 {
00609     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00610     FIXME("(%p)->(%p)\n", This, p);
00611     return E_NOTIMPL;
00612 }
00613 
00614 static HRESULT WINAPI HTMLCurrentStyle_get_rubyAlign(IHTMLCurrentStyle *iface, BSTR *p)
00615 {
00616     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00617     FIXME("(%p)->(%p)\n", This, p);
00618     return E_NOTIMPL;
00619 }
00620 
00621 static HRESULT WINAPI HTMLCurrentStyle_get_rubyPosition(IHTMLCurrentStyle *iface, BSTR *p)
00622 {
00623     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00624     FIXME("(%p)->(%p)\n", This, p);
00625     return E_NOTIMPL;
00626 }
00627 
00628 static HRESULT WINAPI HTMLCurrentStyle_get_rubyOverhang(IHTMLCurrentStyle *iface, BSTR *p)
00629 {
00630     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00631     FIXME("(%p)->(%p)\n", This, p);
00632     return E_NOTIMPL;
00633 }
00634 
00635 static HRESULT WINAPI HTMLCurrentStyle_get_textAutospace(IHTMLCurrentStyle *iface, BSTR *p)
00636 {
00637     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00638     FIXME("(%p)->(%p)\n", This, p);
00639     return E_NOTIMPL;
00640 }
00641 
00642 static HRESULT WINAPI HTMLCurrentStyle_get_lineBreak(IHTMLCurrentStyle *iface, BSTR *p)
00643 {
00644     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00645     FIXME("(%p)->(%p)\n", This, p);
00646     return E_NOTIMPL;
00647 }
00648 
00649 static HRESULT WINAPI HTMLCurrentStyle_get_wordBreak(IHTMLCurrentStyle *iface, BSTR *p)
00650 {
00651     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00652     FIXME("(%p)->(%p)\n", This, p);
00653     return E_NOTIMPL;
00654 }
00655 
00656 static HRESULT WINAPI HTMLCurrentStyle_get_textJustify(IHTMLCurrentStyle *iface, BSTR *p)
00657 {
00658     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00659     FIXME("(%p)->(%p)\n", This, p);
00660     return E_NOTIMPL;
00661 }
00662 
00663 static HRESULT WINAPI HTMLCurrentStyle_get_textJustifyTrim(IHTMLCurrentStyle *iface, BSTR *p)
00664 {
00665     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00666     FIXME("(%p)->(%p)\n", This, p);
00667     return E_NOTIMPL;
00668 }
00669 
00670 static HRESULT WINAPI HTMLCurrentStyle_get_textKashida(IHTMLCurrentStyle *iface, VARIANT *p)
00671 {
00672     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00673     FIXME("(%p)->(%p)\n", This, p);
00674     return E_NOTIMPL;
00675 }
00676 
00677 static HRESULT WINAPI HTMLCurrentStyle_get_blockDirection(IHTMLCurrentStyle *iface, BSTR *p)
00678 {
00679     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00680     FIXME("(%p)->(%p)\n", This, p);
00681     return E_NOTIMPL;
00682 }
00683 
00684 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridChar(IHTMLCurrentStyle *iface, VARIANT *p)
00685 {
00686     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00687     FIXME("(%p)->(%p)\n", This, p);
00688     return E_NOTIMPL;
00689 }
00690 
00691 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridLine(IHTMLCurrentStyle *iface, VARIANT *p)
00692 {
00693     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00694     FIXME("(%p)->(%p)\n", This, p);
00695     return E_NOTIMPL;
00696 }
00697 
00698 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridMode(IHTMLCurrentStyle *iface, BSTR *p)
00699 {
00700     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00701     FIXME("(%p)->(%p)\n", This, p);
00702     return E_NOTIMPL;
00703 }
00704 
00705 static HRESULT WINAPI HTMLCurrentStyle_get_layoutGridType(IHTMLCurrentStyle *iface, BSTR *p)
00706 {
00707     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00708     FIXME("(%p)->(%p)\n", This, p);
00709     return E_NOTIMPL;
00710 }
00711 
00712 static HRESULT WINAPI HTMLCurrentStyle_get_borderStyle(IHTMLCurrentStyle *iface, BSTR *p)
00713 {
00714     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00715     TRACE("(%p)->(%p)\n", This, p);
00716     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_STYLE, p);
00717 }
00718 
00719 static HRESULT WINAPI HTMLCurrentStyle_get_borderColor(IHTMLCurrentStyle *iface, BSTR *p)
00720 {
00721     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00722     TRACE("(%p)->(%p)\n", This, p);
00723     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_COLOR, p);
00724 }
00725 
00726 static HRESULT WINAPI HTMLCurrentStyle_get_borderWidth(IHTMLCurrentStyle *iface, BSTR *p)
00727 {
00728     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00729     TRACE("(%p)->(%p)\n", This, p);
00730     return get_nsstyle_attr(This->nsstyle, STYLEID_BORDER_WIDTH, p);
00731 }
00732 
00733 static HRESULT WINAPI HTMLCurrentStyle_get_padding(IHTMLCurrentStyle *iface, BSTR *p)
00734 {
00735     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00736     FIXME("(%p)->(%p)\n", This, p);
00737     return E_NOTIMPL;
00738 }
00739 
00740 static HRESULT WINAPI HTMLCurrentStyle_get_margin(IHTMLCurrentStyle *iface, BSTR *p)
00741 {
00742     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00743     TRACE("(%p)->(%p)\n", This, p);
00744     return get_nsstyle_attr(This->nsstyle, STYLEID_MARGIN, p);
00745 }
00746 
00747 static HRESULT WINAPI HTMLCurrentStyle_get_accelerator(IHTMLCurrentStyle *iface, BSTR *p)
00748 {
00749     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00750     FIXME("(%p)->(%p)\n", This, p);
00751     return E_NOTIMPL;
00752 }
00753 
00754 static HRESULT WINAPI HTMLCurrentStyle_get_overflowX(IHTMLCurrentStyle *iface, BSTR *p)
00755 {
00756     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00757     FIXME("(%p)->(%p)\n", This, p);
00758     return E_NOTIMPL;
00759 }
00760 
00761 static HRESULT WINAPI HTMLCurrentStyle_get_overflowY(IHTMLCurrentStyle *iface, BSTR *p)
00762 {
00763     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00764     FIXME("(%p)->(%p)\n", This, p);
00765     return E_NOTIMPL;
00766 }
00767 
00768 static HRESULT WINAPI HTMLCurrentStyle_get_textTransform(IHTMLCurrentStyle *iface, BSTR *p)
00769 {
00770     HTMLCurrentStyle *This = HTMLCURSTYLE_THIS(iface);
00771     FIXME("(%p)->(%p)\n", This, p);
00772     return E_NOTIMPL;
00773 }
00774 
00775 #undef HTMLCURSTYLE_THIS
00776 
00777 static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl = {
00778     HTMLCurrentStyle_QueryInterface,
00779     HTMLCurrentStyle_AddRef,
00780     HTMLCurrentStyle_Release,
00781     HTMLCurrentStyle_GetTypeInfoCount,
00782     HTMLCurrentStyle_GetTypeInfo,
00783     HTMLCurrentStyle_GetIDsOfNames,
00784     HTMLCurrentStyle_Invoke,
00785     HTMLCurrentStyle_get_position,
00786     HTMLCurrentStyle_get_styleFloat,
00787     HTMLCurrentStyle_get_color,
00788     HTMLCurrentStyle_get_backgroundColor,
00789     HTMLCurrentStyle_get_fontFamily,
00790     HTMLCurrentStyle_get_fontStyle,
00791     HTMLCurrentStyle_get_fontVariant,
00792     HTMLCurrentStyle_get_fontWeight,
00793     HTMLCurrentStyle_get_fontSize,
00794     HTMLCurrentStyle_get_backgroundImage,
00795     HTMLCurrentStyle_get_backgroundPositionX,
00796     HTMLCurrentStyle_get_backgroundPositionY,
00797     HTMLCurrentStyle_get_backgroundRepeat,
00798     HTMLCurrentStyle_get_borderLeftColor,
00799     HTMLCurrentStyle_get_borderTopColor,
00800     HTMLCurrentStyle_get_borderRightColor,
00801     HTMLCurrentStyle_get_borderBottomColor,
00802     HTMLCurrentStyle_get_borderTopStyle,
00803     HTMLCurrentStyle_get_borderRightStyle,
00804     HTMLCurrentStyle_get_borderBottomStyle,
00805     HTMLCurrentStyle_get_borderLeftStyle,
00806     HTMLCurrentStyle_get_borderTopWidth,
00807     HTMLCurrentStyle_get_borderRightWidth,
00808     HTMLCurrentStyle_get_borderBottomWidth,
00809     HTMLCurrentStyle_get_borderLeftWidth,
00810     HTMLCurrentStyle_get_left,
00811     HTMLCurrentStyle_get_top,
00812     HTMLCurrentStyle_get_width,
00813     HTMLCurrentStyle_get_height,
00814     HTMLCurrentStyle_get_paddingLeft,
00815     HTMLCurrentStyle_get_paddingTop,
00816     HTMLCurrentStyle_get_paddingRight,
00817     HTMLCurrentStyle_get_paddingBottom,
00818     HTMLCurrentStyle_get_textAlign,
00819     HTMLCurrentStyle_get_textDecoration,
00820     HTMLCurrentStyle_get_display,
00821     HTMLCurrentStyle_get_visibility,
00822     HTMLCurrentStyle_get_zIndex,
00823     HTMLCurrentStyle_get_letterSpacing,
00824     HTMLCurrentStyle_get_lineHeight,
00825     HTMLCurrentStyle_get_textIndent,
00826     HTMLCurrentStyle_get_verticalAlign,
00827     HTMLCurrentStyle_get_backgroundAttachment,
00828     HTMLCurrentStyle_get_marginTop,
00829     HTMLCurrentStyle_get_marginRight,
00830     HTMLCurrentStyle_get_marginBottom,
00831     HTMLCurrentStyle_get_marginLeft,
00832     HTMLCurrentStyle_get_clear,
00833     HTMLCurrentStyle_get_listStyleType,
00834     HTMLCurrentStyle_get_listStylePosition,
00835     HTMLCurrentStyle_get_listStyleImage,
00836     HTMLCurrentStyle_get_clipTop,
00837     HTMLCurrentStyle_get_clipRight,
00838     HTMLCurrentStyle_get_clipBottom,
00839     HTMLCurrentStyle_get_clipLeft,
00840     HTMLCurrentStyle_get_overflow,
00841     HTMLCurrentStyle_get_pageBreakBefore,
00842     HTMLCurrentStyle_get_pageBreakAfter,
00843     HTMLCurrentStyle_get_cursor,
00844     HTMLCurrentStyle_get_tableLayout,
00845     HTMLCurrentStyle_get_borderCollapse,
00846     HTMLCurrentStyle_get_direction,
00847     HTMLCurrentStyle_get_behavior,
00848     HTMLCurrentStyle_getAttribute,
00849     HTMLCurrentStyle_get_unicodeBidi,
00850     HTMLCurrentStyle_get_right,
00851     HTMLCurrentStyle_get_bottom,
00852     HTMLCurrentStyle_get_imeMode,
00853     HTMLCurrentStyle_get_rubyAlign,
00854     HTMLCurrentStyle_get_rubyPosition,
00855     HTMLCurrentStyle_get_rubyOverhang,
00856     HTMLCurrentStyle_get_textAutospace,
00857     HTMLCurrentStyle_get_lineBreak,
00858     HTMLCurrentStyle_get_wordBreak,
00859     HTMLCurrentStyle_get_textJustify,
00860     HTMLCurrentStyle_get_textJustifyTrim,
00861     HTMLCurrentStyle_get_textKashida,
00862     HTMLCurrentStyle_get_blockDirection,
00863     HTMLCurrentStyle_get_layoutGridChar,
00864     HTMLCurrentStyle_get_layoutGridLine,
00865     HTMLCurrentStyle_get_layoutGridMode,
00866     HTMLCurrentStyle_get_layoutGridType,
00867     HTMLCurrentStyle_get_borderStyle,
00868     HTMLCurrentStyle_get_borderColor,
00869     HTMLCurrentStyle_get_borderWidth,
00870     HTMLCurrentStyle_get_padding,
00871     HTMLCurrentStyle_get_margin,
00872     HTMLCurrentStyle_get_accelerator,
00873     HTMLCurrentStyle_get_overflowX,
00874     HTMLCurrentStyle_get_overflowY,
00875     HTMLCurrentStyle_get_textTransform
00876 };
00877 
00878 static const tid_t HTMLCurrentStyle_iface_tids[] = {
00879     IHTMLCurrentStyle_tid,
00880     IHTMLCurrentStyle2_tid,
00881     IHTMLCurrentStyle3_tid,
00882     IHTMLCurrentStyle4_tid,
00883     0
00884 };
00885 static dispex_static_data_t HTMLCurrentStyle_dispex = {
00886     NULL,
00887     DispHTMLCurrentStyle_tid,
00888     NULL,
00889     HTMLCurrentStyle_iface_tids
00890 };
00891 
00892 HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
00893 {
00894     nsIDOMCSSStyleDeclaration *nsstyle;
00895     nsIDOMDocumentView *nsdocview;
00896     nsIDOMAbstractView *nsview;
00897     nsIDOMViewCSS *nsviewcss;
00898     nsAString nsempty_str;
00899     HTMLCurrentStyle *ret;
00900     nsresult nsres;
00901 
00902     if(!elem->node.doc->nsdoc)  {
00903         WARN("NULL nsdoc\n");
00904         return E_UNEXPECTED;
00905     }
00906 
00907     nsres = nsIDOMHTMLDocument_QueryInterface(elem->node.doc->nsdoc, &IID_nsIDOMDocumentView, (void**)&nsdocview);
00908     if(NS_FAILED(nsres)) {
00909         ERR("Could not get nsIDOMDocumentView: %08x\n", nsres);
00910         return E_FAIL;
00911     }
00912 
00913     nsres = nsIDOMDocumentView_GetDefaultView(nsdocview, &nsview);
00914     nsIDOMDocumentView_Release(nsdocview);
00915     if(NS_FAILED(nsres)) {
00916         ERR("GetDefaultView failed: %08x\n", nsres);
00917         return E_FAIL;
00918     }
00919 
00920     nsres = nsIDOMAbstractView_QueryInterface(nsview, &IID_nsIDOMViewCSS, (void**)&nsviewcss);
00921     nsIDOMAbstractView_Release(nsview);
00922     if(NS_FAILED(nsres)) {
00923         ERR("Could not get nsIDOMViewCSS: %08x\n", nsres);
00924         return E_FAIL;
00925     }
00926 
00927     nsAString_Init(&nsempty_str, NULL);
00928     nsres = nsIDOMViewCSS_GetComputedStyle(nsviewcss, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
00929     nsIDOMViewCSS_Release(nsviewcss);
00930     nsAString_Finish(&nsempty_str);
00931     if(NS_FAILED(nsres)) {
00932         ERR("GetComputedStyle failed: %08x\n", nsres);
00933         return E_FAIL;
00934     }
00935 
00936     ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
00937     if(!ret) {
00938         nsIDOMCSSStyleDeclaration_Release(nsstyle);
00939         return E_OUTOFMEMORY;
00940     }
00941 
00942     ret->lpIHTMLCurrentStyleVtbl = &HTMLCurrentStyleVtbl;
00943     ret->ref = 1;
00944     ret->nsstyle = nsstyle;
00945 
00946     init_dispex(&ret->dispex, (IUnknown*)HTMLCURSTYLE(ret),  &HTMLCurrentStyle_dispex);
00947 
00948     *p = HTMLCURSTYLE(ret);
00949     return S_OK;
00950 }

Generated on Thu May 24 2012 04:25:20 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.