ReactOS 0.4.15-dev-7788-g1ad9096
mshtml_private.h File Reference
#include <wine/config.h>
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <math.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <wingdi.h>
#include <ole2.h>
#include <docobjectservice.h>
#include <mshtmhst.h>
#include <mshtmcid.h>
#include <mshtmdid.h>
#include <perhist.h>
#include <objsafe.h>
#include <htiframe.h>
#include <tlogstg.h>
#include <shdeprecated.h>
#include <shlguid.h>
#include <shlwapi.h>
#include <optary.h>
#include <idispids.h>
#include <wininet.h>
#include <nsiface.h>
#include <wine/debug.h>
#include <wine/list.h>
#include <wine/unicode.h>
#include "binding.h"
#include "htmlevent.h"
#include "htmlscript.h"
#include "htmlstyle.h"
#include "pluginhost.h"
#include "resource.h"
Include dependency graph for mshtml_private.h:

Go to the source code of this file.

Classes

struct  dispex_static_data_vtbl_t
 
struct  dispex_static_data_t
 
struct  DispatchEx
 
struct  nsCycleCollectingAutoRefCnt
 
struct  ExternalCycleCollectionParticipant
 
struct  CCObjCallback
 
struct  global_prop_t
 
struct  EventTarget
 
struct  HTMLOptionElementFactory
 
struct  HTMLImageElementFactory
 
struct  HTMLXMLHttpRequestFactory
 
struct  HTMLLocation
 
struct  OmHistory
 
struct  windowref_t
 
struct  HTMLWindow
 
struct  HTMLOuterWindow
 
struct  HTMLInnerWindow
 
struct  _cp_static_data_t
 
struct  cpc_entry_t
 
struct  ConnectionPointContainer
 
struct  ConnectionPoint< T >
 
struct  HTMLDocument
 
struct  HTMLDocumentObj
 
struct  NSContainer
 
struct  NodeImplVtbl
 
struct  HTMLDOMNode
 
struct  HTMLElement
 
struct  HTMLTextContainer
 
struct  HTMLFrameBase
 
struct  HTMLDocumentNode
 
struct  HTMLAttributeCollection
 
struct  HTMLDOMAttribute
 
struct  cmdtable_t
 
struct  task_t
 
struct  docobj_task_t
 
struct  thread_data_t
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COBJMACROS
 
#define NONAMELESSUNION
 
#define NONAMELESSSTRUCT
 
#define NO_SHLWAPI_REG
 
#define NS_ERROR_GENERATE_FAILURE(module, code)    ((nsresult) (((UINT32)(1u<<31)) | ((UINT32)(module+0x45)<<16) | ((UINT32)(code))))
 
#define NS_OK   ((nsresult)0x00000000L)
 
#define NS_ERROR_FAILURE   ((nsresult)0x80004005L)
 
#define NS_ERROR_OUT_OF_MEMORY   ((nsresult)0x8007000EL)
 
#define NS_ERROR_NOT_IMPLEMENTED   ((nsresult)0x80004001L)
 
#define NS_NOINTERFACE   ((nsresult)0x80004002L)
 
#define NS_ERROR_INVALID_POINTER   ((nsresult)0x80004003L)
 
#define NS_ERROR_NULL_POINTER   NS_ERROR_INVALID_POINTER
 
#define NS_ERROR_NOT_AVAILABLE   ((nsresult)0x80040111L)
 
#define NS_ERROR_INVALID_ARG   ((nsresult)0x80070057L)
 
#define NS_ERROR_UNEXPECTED   ((nsresult)0x8000ffffL)
 
#define NS_ERROR_MODULE_NETWORK   6
 
#define NS_BINDING_ABORTED   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2)
 
#define NS_ERROR_UNKNOWN_PROTOCOL   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)
 
#define NS_FAILED(res)   ((res) & 0x80000000)
 
#define NS_SUCCEEDED(res)   (!NS_FAILED(res))
 
#define NSAPI   WINAPI
 
#define MSHTML_E_NODOC   0x800a025c
 
#define TID_LIST
 
#define XIID(iface)   iface ## _tid,
 
#define XDIID(iface)   iface ## _tid,
 
#define MSHTML_DISPID_CUSTOM_MIN   0x60000000
 
#define MSHTML_DISPID_CUSTOM_MAX   0x6fffffff
 
#define MSHTML_CUSTOM_DISPID_CNT   (MSHTML_DISPID_CUSTOM_MAX-MSHTML_DISPID_CUSTOM_MIN)
 
#define HTMLELEMENT_TIDS
 
#define HTMLELEMENT_CPC   {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}
 
#define ATTRFLAG_CASESENSITIVE   0x0001
 
#define ATTRFLAG_ASSTRING   0x0002
 
#define ATTRFLAG_EXPANDURL   0x0004
 
#define UPDATE_UI   0x0001
 
#define UPDATE_TITLE   0x0002
 

Typedefs

typedef struct HTMLDOMNode HTMLDOMNode
 
typedef struct ConnectionPoint ConnectionPoint
 
typedef struct BSCallback BSCallback
 
typedef struct event_target_t event_target_t
 
typedef struct dispex_data_t dispex_data_t
 
typedef struct dispex_dynamic_data_t dispex_dynamic_data_t
 
typedef struct DispatchEx DispatchEx
 
typedef struct nsCycleCollectionTraversalCallback nsCycleCollectionTraversalCallback
 
typedef struct HTMLWindow HTMLWindow
 
typedef struct HTMLInnerWindow HTMLInnerWindow
 
typedef struct HTMLOuterWindow HTMLOuterWindow
 
typedef struct HTMLDocumentNode HTMLDocumentNode
 
typedef struct HTMLDocumentObj HTMLDocumentObj
 
typedef struct HTMLFrameBase HTMLFrameBase
 
typedef struct NSContainer NSContainer
 
typedef struct HTMLAttributeCollection HTMLAttributeCollection
 
typedef struct ScriptHost ScriptHost
 
typedef struct nsChannelBSC nsChannelBSC
 
typedef struct _cp_static_data_t cp_static_data_t
 
typedef struct ConnectionPointContainer ConnectionPointContainer
 
typedef struct nsWeakReference nsWeakReference
 
typedef struct nsDocumentEventListener nsDocumentEventListener
 
typedef struct task_t task_t
 
typedef void(* task_proc_t) (task_t *)
 

Enumerations

enum  tid_t {
  LAST_tid , LAST_tid , Database_tid , Installer_tid ,
  Record_tid , Session_tid , StringList_tid , SummaryInfo_tid ,
  View_tid , LAST_tid , NULL_tid , IXMLDOMAttribute_tid ,
  IXMLDOMCDATASection_tid , IXMLDOMComment_tid , IXMLDOMDocument_tid , IXMLDOMDocument2_tid ,
  IXMLDOMDocument3_tid , IXMLDOMDocumentFragment_tid , IXMLDOMDocumentType_tid , IXMLDOMElement_tid ,
  IXMLDOMEntityReference_tid , IXMLDOMImplementation_tid , IXMLDOMNamedNodeMap_tid , IXMLDOMNode_tid ,
  IXMLDOMNodeList_tid , IXMLDOMParseError2_tid , IXMLDOMProcessingInstruction_tid , IXMLDOMSchemaCollection_tid ,
  IXMLDOMSchemaCollection2_tid , IXMLDOMSelection_tid , IXMLDOMText_tid , IXMLElement_tid ,
  IXMLDocument_tid , IXMLHTTPRequest_tid , IXSLProcessor_tid , IXSLTemplate_tid ,
  IVBSAXAttributes_tid , IVBSAXContentHandler_tid , IVBSAXDeclHandler_tid , IVBSAXDTDHandler_tid ,
  IVBSAXEntityResolver_tid , IVBSAXErrorHandler_tid , IVBSAXLexicalHandler_tid , IVBSAXLocator_tid ,
  IVBSAXXMLFilter_tid , IVBSAXXMLReader_tid , IMXAttributes_tid , IMXReaderControl_tid ,
  IMXWriter_tid , IVBMXNamespaceManager_tid , IServerXMLHTTPRequest_tid , LAST_tid ,
  NULL_tid , ITextDocument_tid , ITextRange_tid , ITextSelection_tid ,
  ITextFont_tid , ITextPara_tid , LAST_tid , NULL_tid ,
  IDictionary_tid , IDrive_tid , IDriveCollection_tid , IFile_tid ,
  IFileCollection_tid , IFileSystem3_tid , IFolder_tid , IFolderCollection_tid ,
  ITextStream_tid , LAST_tid , NULL_tid , IWshCollection_tid ,
  IWshEnvironment_tid , IWshExec_tid , IWshShell3_tid , IWshShortcut_tid ,
  LAST_tid
}
 
enum  dispex_prop_type_t { DISPEXPROP_CUSTOM , DISPEXPROP_DYNAMIC , DISPEXPROP_BUILTIN }
 
enum  SCRIPTMODE { SCRIPTMODE_GECKO , SCRIPTMODE_ACTIVESCRIPT }
 
enum  global_prop_type_t { GLOBAL_SCRIPTVAR , GLOBAL_ELEMENTVAR , GLOBAL_DISPEXVAR , GLOBAL_FRAMEVAR }
 
enum  USERMODE { UNKNOWN_USERMODE , BROWSEMODE , EDITMODE }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mshtml)
 
 DEFINE_GUID (IID_nsXPCOMCycleCollectionParticipant, 0x9674489b, 0x1f6f, 0x4550, 0xa7, 0x30, 0xcc, 0xae, 0xdd, 0x10, 0x4c, 0xf9)
 
 nsrefcnt (__cdecl *ccref_incr)(nsCycleCollectingAutoRefCnt *
 
 void (__cdecl *ccref_init)(nsCycleCollectingAutoRefCnt *
 
void init_dispex (DispatchEx *, IUnknown *, dispex_static_data_t *) DECLSPEC_HIDDEN
 
void release_dispex (DispatchEx *) DECLSPEC_HIDDEN
 
BOOL dispex_query_interface (DispatchEx *, REFIID, void **) DECLSPEC_HIDDEN
 
HRESULT dispex_get_dprop_ref (DispatchEx *, const WCHAR *, BOOL, VARIANT **) DECLSPEC_HIDDEN
 
HRESULT get_dispids (tid_t, DWORD *, DISPID **) DECLSPEC_HIDDEN
 
HRESULT remove_attribute (DispatchEx *, DISPID, VARIANT_BOOL *) DECLSPEC_HIDDEN
 
HRESULT dispex_get_dynid (DispatchEx *, const WCHAR *, DISPID *) DECLSPEC_HIDDEN
 
void dispex_traverse (DispatchEx *, nsCycleCollectionTraversalCallback *) DECLSPEC_HIDDEN
 
void dispex_unlink (DispatchEx *) DECLSPEC_HIDDEN
 
void release_typelib (void) DECLSPEC_HIDDEN
 
HRESULT get_htmldoc_classinfo (ITypeInfo **typeinfo) DECLSPEC_HIDDEN
 
dispex_prop_type_t get_dispid_type (DISPID) DECLSPEC_HIDDEN
 
static HRESULT htmldoc_query_interface (HTMLDocument *This, REFIID riid, void **ppv)
 
static ULONG htmldoc_addref (HTMLDocument *This)
 
static ULONG htmldoc_release (HTMLDocument *This)
 
static void node_addref (HTMLDOMNode *node)
 
static void node_release (HTMLDOMNode *node)
 
HRESULT HTMLDocument_Create (IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
 
HRESULT HTMLLoadOptions_Create (IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
 
HRESULT create_doc_from_nsdoc (nsIDOMHTMLDocument *, HTMLDocumentObj *, HTMLInnerWindow *, HTMLDocumentNode **) DECLSPEC_HIDDEN
 
HRESULT HTMLOuterWindow_Create (HTMLDocumentObj *, nsIDOMWindow *, HTMLOuterWindow *, HTMLOuterWindow **) DECLSPEC_HIDDEN
 
HRESULT update_window_doc (HTMLInnerWindow *) DECLSPEC_HIDDEN
 
HTMLOuterWindownswindow_to_window (const nsIDOMWindow *) DECLSPEC_HIDDEN
 
void get_top_window (HTMLOuterWindow *, HTMLOuterWindow **) DECLSPEC_HIDDEN
 
HRESULT HTMLOptionElementFactory_Create (HTMLInnerWindow *, HTMLOptionElementFactory **) DECLSPEC_HIDDEN
 
HRESULT HTMLImageElementFactory_Create (HTMLInnerWindow *, HTMLImageElementFactory **) DECLSPEC_HIDDEN
 
HRESULT HTMLXMLHttpRequestFactory_Create (HTMLInnerWindow *, HTMLXMLHttpRequestFactory **) DECLSPEC_HIDDEN
 
HRESULT HTMLLocation_Create (HTMLInnerWindow *, HTMLLocation **) DECLSPEC_HIDDEN
 
IOmNavigator * OmNavigator_Create (void) DECLSPEC_HIDDEN
 
HRESULT HTMLScreen_Create (IHTMLScreen **) DECLSPEC_HIDDEN
 
HRESULT create_history (HTMLInnerWindow *, OmHistory **) DECLSPEC_HIDDEN
 
HRESULT create_dom_implementation (IHTMLDOMImplementation **) DECLSPEC_HIDDEN
 
HRESULT create_storage (IHTMLStorage **) DECLSPEC_HIDDEN
 
void HTMLDocument_Persist_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_OleCmd_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_OleObj_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_View_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_Window_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_Service_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_Hlink_Init (HTMLDocument *) DECLSPEC_HIDDEN
 
void TargetContainer_Init (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void init_binding_ui (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void HTMLDocumentNode_SecMgr_Init (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
HRESULT HTMLCurrentStyle_Create (HTMLElement *, IHTMLCurrentStyle **) DECLSPEC_HIDDEN
 
void ConnectionPointContainer_Init (ConnectionPointContainer *, IUnknown *, const cpc_entry_t *) DECLSPEC_HIDDEN
 
void ConnectionPointContainer_Destroy (ConnectionPointContainer *) DECLSPEC_HIDDEN
 
HRESULT create_nscontainer (HTMLDocumentObj *, NSContainer **) DECLSPEC_HIDDEN
 
void NSContainer_Release (NSContainer *) DECLSPEC_HIDDEN
 
void init_mutation (nsIComponentManager *) DECLSPEC_HIDDEN
 
void init_document_mutation (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
void release_document_mutation (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
JSContextget_context_from_document (nsIDOMHTMLDocument *) DECLSPEC_HIDDEN
 
void HTMLDocument_LockContainer (HTMLDocumentObj *, BOOL) DECLSPEC_HIDDEN
 
void show_context_menu (HTMLDocumentObj *, DWORD, POINT *, IDispatch *) DECLSPEC_HIDDEN
 
void notif_focus (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void show_tooltip (HTMLDocumentObj *, DWORD, DWORD, LPCWSTR) DECLSPEC_HIDDEN
 
void hide_tooltip (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
HRESULT get_client_disp_property (IOleClientSite *, DISPID, VARIANT *) DECLSPEC_HIDDEN
 
UINT get_document_charset (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
HRESULT ProtocolFactory_Create (REFCLSID, REFIID, void **) DECLSPEC_HIDDEN
 
BOOL load_gecko (void) DECLSPEC_HIDDEN
 
void close_gecko (void) DECLSPEC_HIDDEN
 
void register_nsservice (nsIComponentRegistrar *, nsIServiceManager *) DECLSPEC_HIDDEN
 
void init_nsio (nsIComponentManager *, nsIComponentRegistrar *) DECLSPEC_HIDDEN
 
void release_nsio (void) DECLSPEC_HIDDEN
 
BOOL is_gecko_path (const char *) DECLSPEC_HIDDEN
 
void set_viewer_zoom (NSContainer *, float) DECLSPEC_HIDDEN
 
void init_node_cc (void) DECLSPEC_HIDDEN
 
HRESULT nsuri_to_url (LPCWSTR, BOOL, BSTR *) DECLSPEC_HIDDEN
 
HRESULT set_frame_doc (HTMLFrameBase *, nsIDOMDocument *) DECLSPEC_HIDDEN
 
void call_property_onchanged (ConnectionPointContainer *, DISPID) DECLSPEC_HIDDEN
 
HRESULT call_set_active_object (IOleInPlaceUIWindow *, IOleInPlaceActiveObject *) DECLSPEC_HIDDEN
 
voidnsalloc (size_t) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
 
void nsfree (void *) DECLSPEC_HIDDEN
 
BOOL nsACString_Init (nsACString *str, const char *data) DECLSPEC_HIDDEN
 
void nsACString_InitDepend (nsACString *, const char *) DECLSPEC_HIDDEN
 
void nsACString_SetData (nsACString *, const char *) DECLSPEC_HIDDEN
 
UINT32 nsACString_GetData (const nsACString *, const char **) DECLSPEC_HIDDEN
 
void nsACString_Finish (nsACString *) DECLSPEC_HIDDEN
 
BOOL nsAString_Init (nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
 
void nsAString_InitDepend (nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
 
UINT32 nsAString_GetData (const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
 
void nsAString_Finish (nsAString *) DECLSPEC_HIDDEN
 
HRESULT return_nsstr (nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
 
static HRESULT return_nsstr_variant (nsresult nsres, nsAString *nsstr, VARIANT *p)
 
nsICommandParamscreate_nscommand_params (void) DECLSPEC_HIDDEN
 
HRESULT nsnode_to_nsstring (nsIDOMNode *, nsAString *) DECLSPEC_HIDDEN
 
void get_editor_controller (NSContainer *) DECLSPEC_HIDDEN
 
nsresult get_nsinterface (nsISupports *, REFIID, void **) DECLSPEC_HIDDEN
 
nsIWritableVariantcreate_nsvariant (void) DECLSPEC_HIDDEN
 
nsIXMLHttpRequestcreate_nsxhr (nsIDOMWindow *nswindow) DECLSPEC_HIDDEN
 
nsresult create_nsfile (const PRUnichar *, nsIFile **) DECLSPEC_HIDDEN
 
charget_nscategory_entry (const char *, const char *) DECLSPEC_HIDDEN
 
HRESULT create_pending_window (HTMLOuterWindow *, nsChannelBSC *) DECLSPEC_HIDDEN
 
HRESULT start_binding (HTMLInnerWindow *, BSCallback *, IBindCtx *) DECLSPEC_HIDDEN
 
HRESULT async_start_doc_binding (HTMLOuterWindow *, HTMLInnerWindow *) DECLSPEC_HIDDEN
 
void abort_window_bindings (HTMLInnerWindow *) DECLSPEC_HIDDEN
 
void set_download_state (HTMLDocumentObj *, int) DECLSPEC_HIDDEN
 
void call_docview_84 (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void set_ready_state (HTMLOuterWindow *, READYSTATE) DECLSPEC_HIDDEN
 
HRESULT get_readystate_string (READYSTATE, BSTR *) DECLSPEC_HIDDEN
 
HRESULT HTMLSelectionObject_Create (HTMLDocumentNode *, nsISelection *, IHTMLSelectionObject **) DECLSPEC_HIDDEN
 
HRESULT HTMLTxtRange_Create (HTMLDocumentNode *, nsIDOMRange *, IHTMLTxtRange **) DECLSPEC_HIDDEN
 
IHTMLStyleSheet * HTMLStyleSheet_Create (nsIDOMStyleSheet *) DECLSPEC_HIDDEN
 
IHTMLStyleSheetsCollection * HTMLStyleSheetsCollection_Create (nsIDOMStyleSheetList *) DECLSPEC_HIDDEN
 
void detach_selection (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
void detach_ranges (HTMLDocumentNode *) DECLSPEC_HIDDEN
 
HRESULT get_node_text (HTMLDOMNode *, BSTR *) DECLSPEC_HIDDEN
 
HRESULT replace_node_by_html (nsIDOMHTMLDocument *, nsIDOMNode *, const WCHAR *) DECLSPEC_HIDDEN
 
HRESULT create_nselem (HTMLDocumentNode *, const WCHAR *, nsIDOMHTMLElement **) DECLSPEC_HIDDEN
 
HRESULT create_element (HTMLDocumentNode *, const WCHAR *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLDOMTextNode_Create (HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **) DECLSPEC_HIDDEN
 
BOOL variant_to_nscolor (const VARIANT *v, nsAString *nsstr) DECLSPEC_HIDDEN
 
HRESULT nscolor_to_str (LPCWSTR color, BSTR *ret) DECLSPEC_HIDDEN
 
HRESULT HTMLDOMAttribute_Create (const WCHAR *, HTMLElement *, DISPID, HTMLDOMAttribute **) DECLSPEC_HIDDEN
 
HRESULT HTMLElement_Create (HTMLDocumentNode *, nsIDOMNode *, BOOL, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLCommentElement_Create (HTMLDocumentNode *, nsIDOMNode *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLAnchorElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLAreaElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLBodyElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLButtonElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLEmbedElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLFormElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLFrameElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLHeadElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLIFrame_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLStyleElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLImgElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLInputElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLLabelElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLLinkElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLMetaElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLObjectElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLOptionElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLScriptElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLSelectElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLTable_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLTableCell_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLTableRow_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLTextAreaElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLTitleElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HRESULT HTMLGenericElement_Create (HTMLDocumentNode *, nsIDOMHTMLElement *, HTMLElement **) DECLSPEC_HIDDEN
 
void HTMLDOMNode_Init (HTMLDocumentNode *, HTMLDOMNode *, nsIDOMNode *) DECLSPEC_HIDDEN
 
void HTMLElement_Init (HTMLElement *, HTMLDocumentNode *, nsIDOMHTMLElement *, dispex_static_data_t *) DECLSPEC_HIDDEN
 
void HTMLTextContainer_Init (HTMLTextContainer *, HTMLDocumentNode *, nsIDOMHTMLElement *, dispex_static_data_t *) DECLSPEC_HIDDEN
 
void HTMLFrameBase_Init (HTMLFrameBase *, HTMLDocumentNode *, nsIDOMHTMLElement *, dispex_static_data_t *) DECLSPEC_HIDDEN
 
HRESULT HTMLDOMNode_QI (HTMLDOMNode *, REFIID, void **) DECLSPEC_HIDDEN
 
void HTMLDOMNode_destructor (HTMLDOMNode *) DECLSPEC_HIDDEN
 
HRESULT HTMLElement_QI (HTMLDOMNode *, REFIID, void **) DECLSPEC_HIDDEN
 
void HTMLElement_destructor (HTMLDOMNode *) DECLSPEC_HIDDEN
 
HRESULT HTMLElement_clone (HTMLDOMNode *, nsIDOMNode *, HTMLDOMNode **) DECLSPEC_HIDDEN
 
HRESULT HTMLElement_get_attr_col (HTMLDOMNode *, HTMLAttributeCollection **) DECLSPEC_HIDDEN
 
HRESULT HTMLElement_handle_event (HTMLDOMNode *, DWORD, nsIDOMEvent *, BOOL *) DECLSPEC_HIDDEN
 
HRESULT HTMLFrameBase_QI (HTMLFrameBase *, REFIID, void **) DECLSPEC_HIDDEN
 
void HTMLFrameBase_destructor (HTMLFrameBase *) DECLSPEC_HIDDEN
 
HRESULT get_node (HTMLDocumentNode *, nsIDOMNode *, BOOL, HTMLDOMNode **) DECLSPEC_HIDDEN
 
HRESULT get_elem (HTMLDocumentNode *, nsIDOMElement *, HTMLElement **) DECLSPEC_HIDDEN
 
HTMLElementunsafe_impl_from_IHTMLElement (IHTMLElement *) DECLSPEC_HIDDEN
 
HRESULT search_window_props (HTMLInnerWindow *, BSTR, DWORD, DISPID *) DECLSPEC_HIDDEN
 
HRESULT get_frame_by_name (HTMLOuterWindow *, const WCHAR *, BOOL, HTMLOuterWindow **) DECLSPEC_HIDDEN
 
HRESULT get_doc_elem_by_id (HTMLDocumentNode *, const WCHAR *, HTMLElement **) DECLSPEC_HIDDEN
 
HTMLOuterWindowget_target_window (HTMLOuterWindow *, nsAString *, BOOL *) DECLSPEC_HIDDEN
 
HRESULT handle_link_click_event (HTMLElement *, nsAString *, nsAString *, nsIDOMEvent *, BOOL *) DECLSPEC_HIDDEN
 
HRESULT wrap_iface (IUnknown *, IUnknown *, IUnknown **) DECLSPEC_HIDDEN
 
IHTMLElementCollection * create_all_collection (HTMLDOMNode *, BOOL) DECLSPEC_HIDDEN
 
IHTMLElementCollection * create_collection_from_nodelist (HTMLDocumentNode *, nsIDOMNodeList *) DECLSPEC_HIDDEN
 
IHTMLElementCollection * create_collection_from_htmlcol (HTMLDocumentNode *, nsIDOMHTMLCollection *) DECLSPEC_HIDDEN
 
HRESULT get_elem_attr_value_by_dispid (HTMLElement *, DISPID, DWORD, VARIANT *) DECLSPEC_HIDDEN
 
HRESULT get_elem_source_index (HTMLElement *, LONG *) DECLSPEC_HIDDEN
 
nsresult get_elem_attr_value (nsIDOMHTMLElement *, const WCHAR *, nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
 
HRESULT elem_string_attr_getter (HTMLElement *, const WCHAR *, BOOL, BSTR *) DECLSPEC_HIDDEN
 
HRESULT elem_string_attr_setter (HTMLElement *, const WCHAR *, const WCHAR *) DECLSPEC_HIDDEN
 
void do_ns_command (HTMLDocument *, const char *, nsICommandParams *) DECLSPEC_HIDDEN
 
void update_doc (HTMLDocument *, DWORD) DECLSPEC_HIDDEN
 
void update_title (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void set_document_navigation (HTMLDocumentObj *, BOOL) DECLSPEC_HIDDEN
 
HRESULT do_query_service (IUnknown *, REFGUID, REFIID, void **) DECLSPEC_HIDDEN
 
HRESULT setup_edit_mode (HTMLDocumentObj *) DECLSPEC_HIDDEN
 
void init_editor (HTMLDocument *) DECLSPEC_HIDDEN
 
void handle_edit_event (HTMLDocument *, nsIDOMEvent *) DECLSPEC_HIDDEN
 
HRESULT editor_exec_copy (HTMLDocument *, DWORD, VARIANT *, VARIANT *) DECLSPEC_HIDDEN
 
HRESULT editor_exec_cut (HTMLDocument *, DWORD, VARIANT *, VARIANT *) DECLSPEC_HIDDEN
 
HRESULT editor_exec_paste (HTMLDocument *, DWORD, VARIANT *, VARIANT *) DECLSPEC_HIDDEN
 
void handle_edit_load (HTMLDocument *) DECLSPEC_HIDDEN
 
HRESULT editor_is_dirty (HTMLDocument *) DECLSPEC_HIDDEN
 
void set_dirty (HTMLDocument *, VARIANT_BOOL) DECLSPEC_HIDDEN
 
thread_data_tget_thread_data (BOOL) DECLSPEC_HIDDEN
 
HWND get_thread_hwnd (void) DECLSPEC_HIDDEN
 
LONG get_task_target_magic (void) DECLSPEC_HIDDEN
 
HRESULT push_task (task_t *, task_proc_t, task_proc_t, LONG) DECLSPEC_HIDDEN
 
void remove_target_tasks (LONG) DECLSPEC_HIDDEN
 
void flush_pending_tasks (LONG) DECLSPEC_HIDDEN
 
HRESULT set_task_timer (HTMLInnerWindow *, DWORD, BOOL, IDispatch *, LONG *) DECLSPEC_HIDDEN
 
HRESULT clear_task_timer (HTMLInnerWindow *, BOOL, DWORD) DECLSPEC_HIDDEN
 
const chardebugstr_mshtml_guid (const GUID *) DECLSPEC_HIDDEN
 
 DEFINE_GUID (CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B)
 
 DEFINE_GUID (CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8, 0x40, 0x00, 0x60, 0x08, 0x05, 0x93, 0x82)
 
 DEFINE_GUID (CLSID_CMarkup, 0x3050f4fb, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b)
 
 DEFINE_OLEGUID (CGID_DocHostCmdPriv, 0x000214D4L, 0, 0)
 
 DEFINE_GUID (CLSID_JScript, 0xf414c260, 0x6ac0, 0x11cf, 0xb6, 0xd1, 0x00, 0xaa, 0x00, 0xbb, 0xbb, 0x58)
 
 DEFINE_GUID (CLSID_VBScript, 0xb54f3741, 0x5b07, 0x11cf, 0xa4, 0xb0, 0x00, 0xaa, 0x00, 0x4a, 0x55, 0xe8)
 
 DEFINE_GUID (IID_UndocumentedScriptIface, 0x719c3050, 0xf9d3, 0x11cf, 0xa4, 0x93, 0x00, 0x40, 0x05, 0x23, 0xa8, 0xa0)
 
 DEFINE_GUID (IID_IDispatchJS, 0x719c3050, 0xf9d3, 0x11cf, 0xa4, 0x93, 0x00, 0x40, 0x05, 0x23, 0xa8, 0xa6)
 
static void__WINE_ALLOC_SIZE (1) heap_alloc(size_t len)
 
static void__WINE_ALLOC_SIZE (2) heap_realloc(void *mem
 
static BOOL heap_free (void *mem)
 
static LPWSTR heap_strdupW (LPCWSTR str)
 
static LPWSTR heap_strndupW (LPCWSTR str, unsigned len)
 
static charheap_strdupA (const char *str)
 
static WCHARheap_strdupAtoW (const char *str)
 
static charheap_strdupWtoA (LPCWSTR str)
 
static WCHARheap_strdupUtoW (const char *str)
 
static charheap_strdupWtoU (const WCHAR *str)
 
static charheap_strndupWtoU (LPCWSTR str, unsigned len)
 
static void windowref_addref (windowref_t *ref)
 
static void windowref_release (windowref_t *ref)
 
UINT cp_from_charset_string (BSTR) DECLSPEC_HIDDEN
 
HDC get_display_dc (void) DECLSPEC_HIDDEN
 
HINSTANCE get_shdoclc (void) DECLSPEC_HIDDEN
 
void set_statustext (HTMLDocumentObj *, INT, LPCWSTR) DECLSPEC_HIDDEN
 

Variables

nsISupportsDECLSPEC_HIDDEN
 
static void size_t len
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 30 of file mshtml_private.h.

◆ ATTRFLAG_ASSTRING

#define ATTRFLAG_ASSTRING   0x0002

Definition at line 1031 of file mshtml_private.h.

◆ ATTRFLAG_CASESENSITIVE

#define ATTRFLAG_CASESENSITIVE   0x0001

Definition at line 1030 of file mshtml_private.h.

◆ ATTRFLAG_EXPANDURL

#define ATTRFLAG_EXPANDURL   0x0004

Definition at line 1032 of file mshtml_private.h.

◆ COBJMACROS

#define COBJMACROS

Definition at line 32 of file mshtml_private.h.

◆ HTMLELEMENT_CPC

#define HTMLELEMENT_CPC   {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}

Definition at line 748 of file mshtml_private.h.

◆ HTMLELEMENT_TIDS

#define HTMLELEMENT_TIDS
Value:
IHTMLDOMNode_tid, \
IHTMLDOMNode2_tid, \
IHTMLElement_tid, \
IHTMLElement2_tid, \
IHTMLElement3_tid, \
IHTMLElement4_tid

Definition at line 739 of file mshtml_private.h.

◆ MSHTML_CUSTOM_DISPID_CNT

#define MSHTML_CUSTOM_DISPID_CNT   (MSHTML_DISPID_CUSTOM_MAX-MSHTML_DISPID_CUSTOM_MIN)

Definition at line 251 of file mshtml_private.h.

◆ MSHTML_DISPID_CUSTOM_MAX

#define MSHTML_DISPID_CUSTOM_MAX   0x6fffffff

Definition at line 250 of file mshtml_private.h.

◆ MSHTML_DISPID_CUSTOM_MIN

#define MSHTML_DISPID_CUSTOM_MIN   0x60000000

Definition at line 249 of file mshtml_private.h.

◆ MSHTML_E_NODOC

#define MSHTML_E_NODOC   0x800a025c

Definition at line 88 of file mshtml_private.h.

◆ NO_SHLWAPI_REG

#define NO_SHLWAPI_REG

Definition at line 51 of file mshtml_private.h.

◆ NONAMELESSSTRUCT

#define NONAMELESSSTRUCT

Definition at line 34 of file mshtml_private.h.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 33 of file mshtml_private.h.

◆ NS_BINDING_ABORTED

Definition at line 80 of file mshtml_private.h.

◆ NS_ERROR_FAILURE

#define NS_ERROR_FAILURE   ((nsresult)0x80004005L)

Definition at line 68 of file mshtml_private.h.

◆ NS_ERROR_GENERATE_FAILURE

#define NS_ERROR_GENERATE_FAILURE (   module,
  code 
)     ((nsresult) (((UINT32)(1u<<31)) | ((UINT32)(module+0x45)<<16) | ((UINT32)(code))))

Definition at line 64 of file mshtml_private.h.

◆ NS_ERROR_INVALID_ARG

#define NS_ERROR_INVALID_ARG   ((nsresult)0x80070057L)

Definition at line 75 of file mshtml_private.h.

◆ NS_ERROR_INVALID_POINTER

#define NS_ERROR_INVALID_POINTER   ((nsresult)0x80004003L)

Definition at line 72 of file mshtml_private.h.

◆ NS_ERROR_MODULE_NETWORK

#define NS_ERROR_MODULE_NETWORK   6

Definition at line 78 of file mshtml_private.h.

◆ NS_ERROR_NOT_AVAILABLE

#define NS_ERROR_NOT_AVAILABLE   ((nsresult)0x80040111L)

Definition at line 74 of file mshtml_private.h.

◆ NS_ERROR_NOT_IMPLEMENTED

#define NS_ERROR_NOT_IMPLEMENTED   ((nsresult)0x80004001L)

Definition at line 70 of file mshtml_private.h.

◆ NS_ERROR_NULL_POINTER

#define NS_ERROR_NULL_POINTER   NS_ERROR_INVALID_POINTER

Definition at line 73 of file mshtml_private.h.

◆ NS_ERROR_OUT_OF_MEMORY

#define NS_ERROR_OUT_OF_MEMORY   ((nsresult)0x8007000EL)

Definition at line 69 of file mshtml_private.h.

◆ NS_ERROR_UNEXPECTED

#define NS_ERROR_UNEXPECTED   ((nsresult)0x8000ffffL)

Definition at line 76 of file mshtml_private.h.

◆ NS_ERROR_UNKNOWN_PROTOCOL

#define NS_ERROR_UNKNOWN_PROTOCOL   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)

Definition at line 81 of file mshtml_private.h.

◆ NS_FAILED

#define NS_FAILED (   res)    ((res) & 0x80000000)

Definition at line 83 of file mshtml_private.h.

◆ NS_NOINTERFACE

#define NS_NOINTERFACE   ((nsresult)0x80004002L)

Definition at line 71 of file mshtml_private.h.

◆ NS_OK

#define NS_OK   ((nsresult)0x00000000L)

Definition at line 67 of file mshtml_private.h.

◆ NS_SUCCEEDED

#define NS_SUCCEEDED (   res)    (!NS_FAILED(res))

Definition at line 84 of file mshtml_private.h.

◆ NSAPI

#define NSAPI   WINAPI

Definition at line 86 of file mshtml_private.h.

◆ TID_LIST

#define TID_LIST

Definition at line 95 of file mshtml_private.h.

◆ UPDATE_TITLE

#define UPDATE_TITLE   0x0002

Definition at line 1054 of file mshtml_private.h.

◆ UPDATE_UI

#define UPDATE_UI   0x0001

Definition at line 1053 of file mshtml_private.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 29 of file mshtml_private.h.

◆ XDIID

#define XDIID (   iface)    iface ## _tid,

Definition at line 239 of file mshtml_private.h.

◆ XIID

#define XIID (   iface)    iface ## _tid,

Definition at line 238 of file mshtml_private.h.

Typedef Documentation

◆ BSCallback

Definition at line 92 of file mshtml_private.h.

◆ ConnectionPoint

Definition at line 91 of file mshtml_private.h.

◆ ConnectionPointContainer

◆ cp_static_data_t

◆ DispatchEx

Definition at line 253 of file mshtml_private.h.

◆ dispex_data_t

Definition at line 246 of file mshtml_private.h.

◆ dispex_dynamic_data_t

◆ event_target_t

Definition at line 93 of file mshtml_private.h.

◆ HTMLAttributeCollection

◆ HTMLDocumentNode

Definition at line 331 of file mshtml_private.h.

◆ HTMLDocumentObj

Definition at line 332 of file mshtml_private.h.

◆ HTMLDOMNode

Definition at line 90 of file mshtml_private.h.

◆ HTMLFrameBase

Definition at line 333 of file mshtml_private.h.

◆ HTMLInnerWindow

Definition at line 329 of file mshtml_private.h.

◆ HTMLOuterWindow

Definition at line 330 of file mshtml_private.h.

◆ HTMLWindow

Definition at line 328 of file mshtml_private.h.

◆ nsChannelBSC

Definition at line 413 of file mshtml_private.h.

◆ NSContainer

Definition at line 334 of file mshtml_private.h.

◆ nsCycleCollectionTraversalCallback

◆ nsDocumentEventListener

◆ nsWeakReference

Definition at line 648 of file mshtml_private.h.

◆ ScriptHost

Definition at line 342 of file mshtml_private.h.

◆ task_proc_t

typedef void(* task_proc_t) (task_t *)

Definition at line 1076 of file mshtml_private.h.

◆ task_t

typedef struct task_t task_t

Definition at line 1075 of file mshtml_private.h.

Enumeration Type Documentation

◆ dispex_prop_type_t

Enumerator
DISPEXPROP_CUSTOM 
DISPEXPROP_DYNAMIC 
DISPEXPROP_BUILTIN 

Definition at line 320 of file mshtml_private.h.

320 {
dispex_prop_type_t
@ DISPEXPROP_CUSTOM
@ DISPEXPROP_DYNAMIC
@ DISPEXPROP_BUILTIN

◆ global_prop_type_t

Enumerator
GLOBAL_SCRIPTVAR 
GLOBAL_ELEMENTVAR 
GLOBAL_DISPEXVAR 
GLOBAL_FRAMEVAR 

Definition at line 344 of file mshtml_private.h.

344 {
global_prop_type_t
@ GLOBAL_FRAMEVAR
@ GLOBAL_SCRIPTVAR
@ GLOBAL_DISPEXVAR
@ GLOBAL_ELEMENTVAR

◆ SCRIPTMODE

Enumerator
SCRIPTMODE_GECKO 
SCRIPTMODE_ACTIVESCRIPT 

Definition at line 337 of file mshtml_private.h.

337 {
340} SCRIPTMODE;
SCRIPTMODE
@ SCRIPTMODE_ACTIVESCRIPT
@ SCRIPTMODE_GECKO

◆ tid_t

Enumerator
LAST_tid 
LAST_tid 
Database_tid 
Installer_tid 
Record_tid 
Session_tid 
StringList_tid 
SummaryInfo_tid 
View_tid 
LAST_tid 
NULL_tid 
IXMLDOMAttribute_tid 
IXMLDOMCDATASection_tid 
IXMLDOMComment_tid 
IXMLDOMDocument_tid 
IXMLDOMDocument2_tid 
IXMLDOMDocument3_tid 
IXMLDOMDocumentFragment_tid 
IXMLDOMDocumentType_tid 
IXMLDOMElement_tid 
IXMLDOMEntityReference_tid 
IXMLDOMImplementation_tid 
IXMLDOMNamedNodeMap_tid 
IXMLDOMNode_tid 
IXMLDOMNodeList_tid 
IXMLDOMParseError2_tid 
IXMLDOMProcessingInstruction_tid 
IXMLDOMSchemaCollection_tid 
IXMLDOMSchemaCollection2_tid 
IXMLDOMSelection_tid 
IXMLDOMText_tid 
IXMLElement_tid 
IXMLDocument_tid 
IXMLHTTPRequest_tid 
IXSLProcessor_tid 
IXSLTemplate_tid 
IVBSAXAttributes_tid 
IVBSAXContentHandler_tid 
IVBSAXDeclHandler_tid 
IVBSAXDTDHandler_tid 
IVBSAXEntityResolver_tid 
IVBSAXErrorHandler_tid 
IVBSAXLexicalHandler_tid 
IVBSAXLocator_tid 
IVBSAXXMLFilter_tid 
IVBSAXXMLReader_tid 
IMXAttributes_tid 
IMXReaderControl_tid 
IMXWriter_tid 
IVBMXNamespaceManager_tid 
IServerXMLHTTPRequest_tid 
LAST_tid 
NULL_tid 
ITextDocument_tid 
ITextRange_tid 
ITextSelection_tid 
ITextFont_tid 
ITextPara_tid 
LAST_tid 
NULL_tid 
IDictionary_tid 
IDrive_tid 
IDriveCollection_tid 
IFile_tid 
IFileCollection_tid 
IFileSystem3_tid 
IFolder_tid 
IFolderCollection_tid 
ITextStream_tid 
LAST_tid 
NULL_tid 
IWshCollection_tid 
IWshEnvironment_tid 
IWshExec_tid 
IWshShell3_tid 
IWshShortcut_tid 
LAST_tid 

Definition at line 237 of file mshtml_private.h.

237 {
238#define XIID(iface) iface ## _tid,
239#define XDIID(iface) iface ## _tid,
241#undef XIID
242#undef XDIID
244} tid_t;
tid_t
@ LAST_tid
#define TID_LIST

◆ USERMODE

Enumerator
UNKNOWN_USERMODE 
BROWSEMODE 
EDITMODE 

Definition at line 497 of file mshtml_private.h.

497 {
500 EDITMODE
501} USERMODE;
USERMODE
@ BROWSEMODE
@ EDITMODE
@ UNKNOWN_USERMODE

Function Documentation

◆ __WINE_ALLOC_SIZE() [1/2]

static void * __WINE_ALLOC_SIZE ( )
inlinestatic

Definition at line 1127 of file mshtml_private.h.

1128{
1129 return HeapAlloc(GetProcessHeap(), 0, len);
1130}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
GLenum GLsizei len
Definition: glext.h:6722

◆ __WINE_ALLOC_SIZE() [2/2]

static void * __WINE_ALLOC_SIZE ( )
inlinestatic

◆ abort_window_bindings()

void abort_window_bindings ( HTMLInnerWindow window)

Definition at line 1775 of file navigate.c.

1776{
1777 BSCallback *iter;
1778
1779 remove_target_tasks(window->task_magic);
1780
1781 while(!list_empty(&window->bindings)) {
1782 iter = LIST_ENTRY(window->bindings.next, BSCallback, entry);
1783
1784 TRACE("Aborting %p\n", iter);
1785
1786 IBindStatusCallback_AddRef(&iter->IBindStatusCallback_iface);
1787
1788 if(iter->binding)
1789 IBinding_Abort(iter->binding);
1790 else
1791 iter->vtbl->stop_binding(iter, E_ABORT);
1792
1793 iter->window = NULL;
1794 list_remove(&iter->entry);
1795 list_init(&iter->entry);
1796
1797 IBindStatusCallback_Release(&iter->IBindStatusCallback_iface);
1798 }
1799
1800 if(window->bscallback) {
1801 IBindStatusCallback_Release(&window->bscallback->bsc.IBindStatusCallback_iface);
1802 window->bscallback = NULL;
1803 }
1804
1805 if(window->mon) {
1806 IMoniker_Release(window->mon);
1807 window->mon = NULL;
1808 }
1809}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_init(struct list_entry *head)
Definition: list.h:51
#define NULL
Definition: types.h:112
uint32_t entry
Definition: isohybrid.c:63
static IHTMLWindow2 * window
Definition: events.c:77
void remove_target_tasks(LONG) DECLSPEC_HIDDEN
Definition: task.c:107
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT(* stop_binding)(BSCallback *, HRESULT)
Definition: binding.h:114
struct list entry
Definition: binding.h:92
IBindStatusCallback IBindStatusCallback_iface
Definition: binding.h:72
IBinding * binding
Definition: binding.h:88
HTMLInnerWindow * window
Definition: binding.h:90
const BSCallbackVtbl * vtbl
Definition: binding.h:77
#define LIST_ENTRY(type)
Definition: queue.h:175
#define E_ABORT
Definition: winerror.h:2366

Referenced by create_pending_window(), detach_inner_window(), release_outer_window(), and set_moniker().

◆ async_start_doc_binding()

HRESULT async_start_doc_binding ( HTMLOuterWindow window,
HTMLInnerWindow pending_window 
)

Definition at line 1758 of file navigate.c.

1759{
1761
1762 TRACE("%p\n", pending_window);
1763
1764 task = heap_alloc(sizeof(start_doc_binding_task_t));
1765 if(!task)
1766 return E_OUTOFMEMORY;
1767
1768 task->window = window;
1769 task->pending_window = pending_window;
1770 IHTMLWindow2_AddRef(&pending_window->base.IHTMLWindow2_iface);
1771
1773}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static void start_doc_binding_task_destr(task_t *_task)
Definition: navigate.c:1750
static void start_doc_binding_proc(task_t *_task)
Definition: navigate.c:1742
HRESULT push_task(task_t *, task_proc_t, task_proc_t, LONG) DECLSPEC_HIDDEN
Definition: task.c:39
IHTMLWindow2 IHTMLWindow2_iface
HTMLOuterWindow * window
Definition: navigate.c:1738
HTMLInnerWindow * pending_window
Definition: navigate.c:1739

Referenced by async_open().

◆ call_docview_84()

void call_docview_84 ( HTMLDocumentObj doc)

Definition at line 173 of file oleobj.c.

174{
175 IOleCommandTarget *olecmd;
176 VARIANT var;
178
179 if(!doc->client)
180 return;
181
182 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
183 if(FAILED(hres))
184 return;
185
187 hres = IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 84, 0, NULL, &var);
188 IOleCommandTarget_Release(olecmd);
189 if(SUCCEEDED(hres) && V_VT(&var) != VT_NULL)
190 FIXME("handle result\n");
191}
#define FIXME(fmt,...)
Definition: debug.h:111
@ VT_NULL
Definition: compat.h:2296
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
const char * var
Definition: shader.c:5666
HRESULT hres
Definition: protocol.c:465
#define V_VT(A)
Definition: oleauto.h:211
IOleClientSite * client
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568

Referenced by OleObject_SetClientSite(), PersistMoniker_Load(), and super_navigate().

◆ call_property_onchanged()

void call_property_onchanged ( ConnectionPointContainer container,
DISPID  dispid 
)

Definition at line 342 of file conpoint.c.

343{
345 DWORD i;
346
348 if(!cp)
349 return;
350
351 for(i=0; i<cp->sinks_size; i++) {
352 if(cp->sinks[i].propnotif)
353 IPropertyNotifySink_OnChanged(cp->sinks[i].propnotif, dispid);
354 }
355}
static ConnectionPoint * get_cp(ConnectionPointContainer *container, REFIID riid, BOOL do_create)
Definition: conpoint.c:312
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
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
POINT cp
Definition: magnifier.c:59
const GUID IID_IPropertyNotifySink

Referenced by HTMLDocument_put_designMode(), notif_readystate(), and parse_complete().

◆ call_set_active_object()

HRESULT call_set_active_object ( IOleInPlaceUIWindow window,
IOleInPlaceActiveObject act_obj 
)

Definition at line 398 of file view.c.

399{
400 static WCHAR html_documentW[30];
401
402 if(act_obj && !html_documentW[0]) {
403 LoadStringW(hInst, IDS_HTMLDOCUMENT, html_documentW,
404 sizeof(html_documentW)/sizeof(WCHAR));
405 }
406
407 return IOleInPlaceUIWindow_SetActiveObject(window, act_obj, act_obj ? html_documentW : NULL);
408}
#define IDS_HTMLDOCUMENT
Definition: resource.h:21
HINSTANCE hInst
Definition: dxdiag.c:13
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by OleDocumentView_UIActivate(), and setup_edit_mode().

◆ clear_task_timer()

HRESULT clear_task_timer ( HTMLInnerWindow window,
BOOL  interval,
DWORD  id 
)

Definition at line 201 of file task.c.

202{
204 task_timer_t *iter;
205
206 if(!thread_data)
207 return S_OK;
208
209 LIST_FOR_EACH_ENTRY(iter, &thread_data->timer_list, task_timer_t, entry) {
210 if(iter->id == id && iter->window == window && !iter->interval == !interval) {
211 release_task_timer(thread_data->thread_hwnd, iter);
212 return S_OK;
213 }
214 }
215
216 WARN("timet not found\n");
217 return S_OK;
218}
#define WARN(fmt,...)
Definition: debug.h:112
thread_data_t * get_thread_data(BOOL create)
Definition: task.c:352
static void release_task_timer(HWND thread_hwnd, task_timer_t *timer)
Definition: task.c:79
#define S_OK
Definition: intsafe.h:52
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
HTMLInnerWindow * window
Definition: task.c:25
DWORD interval
Definition: task.c:28
DWORD id
Definition: task.c:26

Referenced by HTMLWindow2_clearInterval(), and HTMLWindow2_clearTimeout().

◆ close_gecko()

void close_gecko ( void  )

Definition at line 1076 of file nsembed.c.

1077{
1078 TRACE("()\n");
1079
1080 release_nsio();
1082
1083 if(profile_directory) {
1084 nsIFile_Release(profile_directory);
1086 }
1087
1088 if(plugin_directory) {
1089 nsIFile_Release(plugin_directory);
1091 }
1092
1093 if(pCompMgr)
1094 nsIComponentManager_Release(pCompMgr);
1095
1096 if(pServMgr)
1097 nsIServiceManager_Release(pServMgr);
1098
1099 if(cat_mgr)
1100 nsICategoryManager_Release(cat_mgr);
1101
1102 /* Gecko doesn't really support being unloaded */
1103 /* if (hXPCOM) FreeLibrary(hXPCOM); */
1104
1106}
void init_mutation(nsIComponentManager *) DECLSPEC_HIDDEN
Definition: mutation.c:774
void release_nsio(void) DECLSPEC_HIDDEN
Definition: nsio.c:4085
static nsICategoryManager * cat_mgr
Definition: nsembed.c:63
static CRITICAL_SECTION cs_load_gecko
Definition: nsembed.c:733
static nsIComponentManager * pCompMgr
Definition: nsembed.c:62
static nsIFile * plugin_directory
Definition: nsembed.c:64
static nsIServiceManager * pServMgr
Definition: nsembed.c:61
static nsIFile * profile_directory
Definition: nsembed.c:64
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by process_detach().

◆ ConnectionPointContainer_Destroy()

void ConnectionPointContainer_Destroy ( ConnectionPointContainer This)

Definition at line 442 of file events.c.

443{
447}
static void ConnectionPoint_Destroy(ConnectionPoint *This)
Definition: events.c:418

Referenced by destroy_htmldoc(), DocHost_Release(), and HTMLElement_destructor().

◆ ConnectionPointContainer_Init()

void ConnectionPointContainer_Init ( ConnectionPointContainer This,
IUnknown outer,
const cpc_entry_t cp_entries 
)

Definition at line 421 of file conpoint.c.

422{
423 This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
424 This->cp_entries = cp_entries;
425 This->cps = NULL;
426 This->outer = outer;
427 This->forward_container = NULL;
428}
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
Definition: conpoint.c:413

◆ cp_from_charset_string()

UINT cp_from_charset_string ( BSTR  charset)

Definition at line 45 of file main.c.

46{
47 MIMECSETINFO info;
49
50 if(!mlang) {
51 IMultiLanguage2 *new_mlang;
52
53 hres = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
54 &IID_IMultiLanguage2, (void**)&new_mlang);
55 if(FAILED(hres)) {
56 ERR("Could not create CMultiLanguage instance\n");
57 return CP_UTF8;
58 }
59
60 if(InterlockedCompareExchangePointer((void**)&mlang, new_mlang, NULL))
61 IMultiLanguage2_Release(new_mlang);
62 }
63
64 hres = IMultiLanguage2_GetCharsetInfo(mlang, charset, &info);
65 if(FAILED(hres)) {
66 FIXME("GetCharsetInfo failed: %08x\n", hres);
67 return CP_UTF8;
68 }
69
70 return info.uiInternetEncoding;
71}
#define ERR(fmt,...)
Definition: debug.h:110
CFF_Charset charset
Definition: cffcmap.c:138
static IMultiLanguage2 * mlang
Definition: main.c:43
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define CP_UTF8
Definition: nls.h:20

Referenced by get_document_charset(), and nsIOService_NewURI().

◆ create_all_collection()

IHTMLElementCollection * create_all_collection ( HTMLDOMNode node,
BOOL  include_root 
)

Definition at line 654 of file htmlelemcol.c.

655{
656 elem_vector_t buf = {NULL, 0, 8};
657
658 buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
659
660 if(include_root) {
663 }
664 create_all_list(node->doc, node, &buf);
666
667 return HTMLElementCollection_Create(buf.buf, buf.len);
668}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static void elem_vector_add(elem_vector_t *buf, HTMLElement *elem)
Definition: htmlelemcol.c:54
static HTMLElement * elem_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlelemcol.c:47
static void create_all_list(HTMLDocumentNode *doc, HTMLDOMNode *elem, elem_vector_t *buf)
Definition: htmlelemcol.c:614
static IHTMLElementCollection * HTMLElementCollection_Create(HTMLElement **elems, DWORD len)
Definition: htmlelemcol.c:809
static void elem_vector_normalize(elem_vector_t *buf)
Definition: htmlelemcol.c:64
static void node_addref(HTMLDOMNode *node)
Definition: dlist.c:348

Referenced by HTMLDocument_get_all(), and HTMLElement_get_all().

◆ create_collection_from_htmlcol()

IHTMLElementCollection * create_collection_from_htmlcol ( HTMLDocumentNode doc,
nsIDOMHTMLCollection nscol 
)

Definition at line 705 of file htmlelemcol.c.

706{
707 UINT32 length = 0, i;
710 HRESULT hres = S_OK;
711
712 nsIDOMHTMLCollection_GetLength(nscol, &length);
713
714 buf.len = buf.size = length;
715 if(buf.len) {
716 nsIDOMNode *nsnode;
717
718 buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
719
720 for(i=0; i<length; i++) {
721 nsIDOMHTMLCollection_Item(nscol, i, &nsnode);
722 hres = get_node(doc, nsnode, TRUE, &node);
723 nsIDOMNode_Release(nsnode);
724 if(FAILED(hres))
725 break;
727 }
728 }else {
729 buf.buf = NULL;
730 }
731
732 if(FAILED(hres)) {
733 heap_free(buf.buf);
734 return NULL;
735 }
736
737 return HTMLElementCollection_Create(buf.buf, buf.len);
738}
unsigned int UINT32
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define TRUE
Definition: types.h:120
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339

Referenced by HTMLDocument_get_anchors(), HTMLDocument_get_applets(), HTMLDocument_get_forms(), HTMLDocument_get_images(), HTMLDocument_get_links(), HTMLDocument_get_scripts(), HTMLElement2_getElementsByTagName(), HTMLTable_get_rows(), HTMLTable_get_tBodies(), and HTMLTableRow_get_cells().

◆ create_collection_from_nodelist()

IHTMLElementCollection * create_collection_from_nodelist ( HTMLDocumentNode doc,
nsIDOMNodeList nslist 
)

Definition at line 670 of file htmlelemcol.c.

671{
672 UINT32 length = 0, i;
676
677 nsIDOMNodeList_GetLength(nslist, &length);
678
679 buf.len = 0;
680 buf.size = length;
681 if(length) {
682 nsIDOMNode *nsnode;
683
684 buf.buf = heap_alloc(buf.size*sizeof(HTMLElement*));
685
686 for(i=0; i<length; i++) {
687 nsIDOMNodeList_Item(nslist, i, &nsnode);
688 if(is_elem_node(nsnode)) {
689 hres = get_node(doc, nsnode, TRUE, &node);
690 if(FAILED(hres))
691 continue;
692 buf.buf[buf.len++] = elem_from_HTMLDOMNode(node);
693 }
694 nsIDOMNode_Release(nsnode);
695 }
696
698 }else {
699 buf.buf = NULL;
700 }
701
702 return HTMLElementCollection_Create(buf.buf, buf.len);
703}
static BOOL is_elem_node(nsIDOMNode *node)
Definition: htmlelemcol.c:76

Referenced by HTMLDocument3_getElementsByName(), HTMLDocument3_getElementsByTagName(), and HTMLElement_get_children().

◆ create_doc_from_nsdoc()

HRESULT create_doc_from_nsdoc ( nsIDOMHTMLDocument nsdoc,
HTMLDocumentObj doc_obj,
HTMLInnerWindow window,
HTMLDocumentNode **  ret 
)

Definition at line 4620 of file htmldoc.c.

4621{
4622 HTMLDocumentNode *doc;
4623
4624 doc = alloc_doc_node(doc_obj, window);
4625 if(!doc)
4626 return E_OUTOFMEMORY;
4627
4628 if(!doc_obj->basedoc.window || window->base.outer_window == doc_obj->basedoc.window)
4630
4631 HTMLDOMNode_Init(doc, &doc->node, (nsIDOMNode*)nsdoc);
4632
4633 nsIDOMHTMLDocument_AddRef(nsdoc);
4634 doc->nsdoc = nsdoc;
4635
4637 doc_init_events(doc);
4638
4641
4642 *ret = doc;
4643 return S_OK;
4644}
static const NodeImplVtbl HTMLDocumentNodeImplVtbl
Definition: htmldoc.c:4473
static HTMLDocumentNode * alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindow *window)
Definition: htmldoc.c:4593
HRESULT doc_init_events(HTMLDocumentNode *doc)
Definition: htmlevent.c:1591
void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
Definition: htmlnode.c:1196
void init_document_mutation(HTMLDocumentNode *) DECLSPEC_HIDDEN
Definition: mutation.c:726
struct ConnectionPointContainer * forward_container
ConnectionPointContainer * cp_container
const NodeImplVtbl * vtbl
HTMLDOMNode node
nsIDOMHTMLDocument * nsdoc
HTMLDocument basedoc
HTMLDocument basedoc
HTMLOuterWindow * window
ConnectionPointContainer cp_container
int ret

Referenced by update_window_doc().

◆ create_dom_implementation()

HRESULT create_dom_implementation ( IHTMLDOMImplementation **  ret)

Definition at line 168 of file omnavigator.c.

169{
170 HTMLDOMImplementation *dom_implementation;
171
172 dom_implementation = heap_alloc_zero(sizeof(*dom_implementation));
173 if(!dom_implementation)
174 return E_OUTOFMEMORY;
175
176 dom_implementation->IHTMLDOMImplementation_iface.lpVtbl = &HTMLDOMImplementationVtbl;
177 dom_implementation->ref = 1;
178
179 init_dispex(&dom_implementation->dispex, (IUnknown*)&dom_implementation->IHTMLDOMImplementation_iface,
181
182 *ret = &dom_implementation->IHTMLDOMImplementation_iface;
183 return S_OK;
184}
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
static dispex_static_data_t HTMLDOMImplementation_dispex
Definition: omnavigator.c:161
static const IHTMLDOMImplementationVtbl HTMLDOMImplementationVtbl
Definition: omnavigator.c:146
IHTMLDOMImplementation IHTMLDOMImplementation_iface
Definition: omnavigator.c:46

Referenced by HTMLDocument5_get_implementation().

◆ create_element()

HRESULT create_element ( HTMLDocumentNode doc,
const WCHAR tag,
HTMLElement **  ret 
)

Definition at line 275 of file htmlelem.c.

276{
277 nsIDOMHTMLElement *nselem;
279
280 /* Use owner doc if called on document fragment */
281 if(!doc->nsdoc)
282 doc = doc->node.doc;
283
284 hres = create_nselem(doc, tag, &nselem);
285 if(FAILED(hres))
286 return hres;
287
288 hres = HTMLElement_Create(doc, (nsIDOMNode*)nselem, TRUE, ret);
289 nsIDOMHTMLElement_Release(nselem);
290 return hres;
291}
HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_generic, HTMLElement **ret)
Definition: htmlelem.c:4032
HRESULT create_nselem(HTMLDocumentNode *doc, const WCHAR *tag, nsIDOMHTMLElement **ret)
Definition: htmlelem.c:246
HTMLDocumentNode * doc
Definition: ecma_167.h:138

Referenced by HTMLDocument_createElement(), and HTMLDocument_createStyleSheet().

◆ create_history()

HRESULT create_history ( HTMLInnerWindow window,
OmHistory **  ret 
)

Definition at line 334 of file omnavigator.c.

335{
336 OmHistory *history;
337
338 history = heap_alloc_zero(sizeof(*history));
339 if(!history)
340 return E_OUTOFMEMORY;
341
343 history->IOmHistory_iface.lpVtbl = &OmHistoryVtbl;
344 history->ref = 1;
345
346 history->window = window;
347
348 *ret = history;
349 return S_OK;
350}
static dispex_static_data_t OmHistory_dispex
Definition: omnavigator.c:326
static const IOmHistoryVtbl OmHistoryVtbl
Definition: omnavigator.c:308
IOmHistory IOmHistory_iface
HTMLInnerWindow * window
DispatchEx dispex

Referenced by HTMLWindow2_get_history().

◆ create_nscommand_params()

nsICommandParams * create_nscommand_params ( void  )

Definition at line 865 of file nsembed.c.

866{
868 nsresult nsres;
869
870 if(!pCompMgr)
871 return NULL;
872
873 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
874 NS_COMMANDPARAMS_CONTRACTID, NULL, &IID_nsICommandParams,
875 (void**)&ret);
876 if(NS_FAILED(nsres))
877 ERR("Could not get nsICommandParams\n");
878
879 return ret;
880}
#define NS_FAILED(res)
#define NS_COMMANDPARAMS_CONTRACTID
Definition: nsembed.c:28

Referenced by exec_fontname(), exec_forecolor(), query_ns_edit_status(), set_ns_align(), and set_ns_fontname().

◆ create_nscontainer()

HRESULT create_nscontainer ( HTMLDocumentObj doc,
NSContainer **  _ret 
)

Definition at line 2076 of file nsembed.c.

2077{
2079 HRESULT hres;
2080
2081 if(!load_gecko())
2083
2084 ret = heap_alloc_zero(sizeof(NSContainer));
2085 if(!ret)
2086 return E_OUTOFMEMORY;
2087
2088 ret->nsIWebBrowserChrome_iface.lpVtbl = &nsWebBrowserChromeVtbl;
2089 ret->nsIContextMenuListener_iface.lpVtbl = &nsContextMenuListenerVtbl;
2090 ret->nsIURIContentListener_iface.lpVtbl = &nsURIContentListenerVtbl;
2091 ret->nsIEmbeddingSiteWindow_iface.lpVtbl = &nsEmbeddingSiteWindowVtbl;
2092 ret->nsITooltipListener_iface.lpVtbl = &nsTooltipListenerVtbl;
2093 ret->nsIInterfaceRequestor_iface.lpVtbl = &nsInterfaceRequestorVtbl;
2094 ret->nsISupportsWeakReference_iface.lpVtbl = &nsSupportsWeakReferenceVtbl;
2095
2096 ret->doc = doc;
2097 ret->ref = 1;
2098
2100 if(SUCCEEDED(hres))
2101 *_ret = ret;
2102 else
2103 nsIWebBrowserChrome_Release(&ret->nsIWebBrowserChrome_iface);
2104 return hres;
2105}
static const nsIInterfaceRequestorVtbl nsInterfaceRequestorVtbl
Definition: nsembed.c:1908
BOOL load_gecko(void)
Definition: nsembed.c:742
static const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl
Definition: nsembed.c:1961
static const nsITooltipListenerVtbl nsTooltipListenerVtbl
Definition: nsembed.c:1863
static const nsIWebBrowserChromeVtbl nsWebBrowserChromeVtbl
Definition: nsembed.c:1399
static const nsIURIContentListenerVtbl nsURIContentListenerVtbl
Definition: nsembed.c:1673
static const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl
Definition: nsembed.c:1804
static HRESULT init_nscontainer(NSContainer *nscontainer)
Definition: nsembed.c:1968
static const nsIContextMenuListenerVtbl nsContextMenuListenerVtbl
Definition: nsembed.c:1509
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

Referenced by HTMLDocument_Create().

◆ create_nselem()

HRESULT create_nselem ( HTMLDocumentNode doc,
const WCHAR tag,
nsIDOMHTMLElement **  ret 
)

Definition at line 246 of file htmlelem.c.

247{
248 nsIDOMElement *nselem;
249 nsAString tag_str;
250 nsresult nsres;
251
252 if(!doc->nsdoc) {
253 WARN("NULL nsdoc\n");
254 return E_UNEXPECTED;
255 }
256
257 nsAString_InitDepend(&tag_str, tag);
258 nsres = nsIDOMHTMLDocument_CreateElement(doc->nsdoc, &tag_str, &nselem);
259 nsAString_Finish(&tag_str);
260 if(NS_FAILED(nsres)) {
261 ERR("CreateElement failed: %08x\n", nsres);
262 return E_FAIL;
263 }
264
265 nsres = nsIDOMElement_QueryInterface(nselem, &IID_nsIDOMHTMLElement, (void**)ret);
266 nsIDOMElement_Release(nselem);
267 if(NS_FAILED(nsres)) {
268 ERR("Could not get nsIDOMHTMLElement iface: %08x\n", nsres);
269 return E_FAIL;
270 }
271
272 return S_OK;
273}
#define E_FAIL
Definition: ddrawi.h:102
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
#define E_UNEXPECTED
Definition: winerror.h:2456

Referenced by create_element(), exec_hyperlink(), exec_indent(), HTMLImageElementFactory_create(), HTMLOptionElementFactory_create(), and set_font_size().

◆ create_nsfile()

nsresult create_nsfile ( const PRUnichar path,
nsIFile **  ret 
)

Definition at line 72 of file nsembed.c.

73{
75 nsresult nsres;
76
78 nsres = NS_NewLocalFile(&str, FALSE, ret);
80
81 if(NS_FAILED(nsres))
82 WARN("NS_NewLocalFile failed: %08x\n", nsres);
83 return nsres;
84}
void nsAString_InitDepend(nsAString *str, const PRUnichar *data)
Definition: nsembed.c:826
void nsAString_Finish(nsAString *str)
Definition: nsembed.c:836
const WCHAR * str

Referenced by create_profile_directory(), init_xpcom(), nsDirectoryServiceProvider2_GetFiles(), and nsFileURL_GetFile().

◆ create_nsvariant()

nsIWritableVariant * create_nsvariant ( void  )

Definition at line 882 of file nsembed.c.

883{
885 nsresult nsres;
886
887 if(!pCompMgr)
888 return NULL;
889
890 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
891 NS_VARIANT_CONTRACTID, NULL, &IID_nsIWritableVariant, (void**)&ret);
892 if(NS_FAILED(nsres))
893 ERR("Could not get nsIVariant\n");
894
895 return ret;
896}
#define NS_VARIANT_CONTRACTID
Definition: nsembed.c:32

Referenced by HTMLSelectElement_add().

◆ create_nsxhr()

nsIXMLHttpRequest * create_nsxhr ( nsIDOMWindow nswindow)

Definition at line 2156 of file nsembed.c.

2157{
2159 nsIPrincipal *nspri;
2160 nsIGlobalObject *nsglo;
2161 nsIXMLHttpRequest *nsxhr;
2162 nsresult nsres;
2163
2164 nsres = nsIServiceManager_GetServiceByContractID(pServMgr,
2166 &IID_nsIScriptSecurityManager, (void**)&secman);
2167 if(NS_FAILED(nsres)) {
2168 ERR("Could not get sec manager service: %08x\n", nsres);
2169 return NULL;
2170 }
2171
2172 nsres = nsIScriptSecurityManager_GetSystemPrincipal(secman, &nspri);
2173 nsIScriptSecurityManager_Release(secman);
2174 if(NS_FAILED(nsres)) {
2175 ERR("GetSystemPrincipal failed: %08x\n", nsres);
2176 return NULL;
2177 }
2178
2179 nsres = nsIDOMWindow_QueryInterface(nswindow, &IID_nsIGlobalObject, (void **)&nsglo);
2180 assert(nsres == NS_OK);
2181
2182 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
2183 NS_XMLHTTPREQUEST_CONTRACTID, NULL, &IID_nsIXMLHttpRequest,
2184 (void**)&nsxhr);
2185 if(NS_FAILED(nsres)) {
2186 ERR("Could not get nsIXMLHttpRequest: %08x\n", nsres);
2187 nsISupports_Release(nspri);
2188 nsIGlobalObject_Release(nsglo);
2189 return NULL;
2190 }
2191
2192 nsres = nsIXMLHttpRequest_Init(nsxhr, nspri, NULL, nsglo, NULL, NULL);
2193
2194 nsISupports_Release(nspri);
2195 nsIGlobalObject_Release(nsglo);
2196 if(NS_FAILED(nsres)) {
2197 ERR("nsIXMLHttpRequest_Init failed: %08x\n", nsres);
2198 nsIXMLHttpRequest_Release(nsxhr);
2199 return NULL;
2200 }
2201 return nsxhr;
2202}
#define assert(x)
Definition: debug.h:53
#define NS_OK
#define NS_SCRIPTSECURITYMANAGER_CONTRACTID
Definition: nsembed.c:35
#define NS_XMLHTTPREQUEST_CONTRACTID
Definition: nsembed.c:34

Referenced by HTMLXMLHttpRequestFactory_create().

◆ create_pending_window()

HRESULT create_pending_window ( HTMLOuterWindow outer_window,
nsChannelBSC channelbsc 
)

Definition at line 3009 of file htmlwindow.c.

3010{
3011 HTMLInnerWindow *pending_window;
3012 HRESULT hres;
3013
3014 hres = create_inner_window(outer_window, outer_window->mon /* FIXME */, &pending_window);
3015 if(FAILED(hres))
3016 return hres;
3017
3018 if(channelbsc) {
3019 IBindStatusCallback_AddRef(&channelbsc->bsc.IBindStatusCallback_iface);
3020 pending_window->bscallback = channelbsc;
3021 }
3022
3023 if(outer_window->pending_window) {
3025 outer_window->pending_window->base.outer_window = NULL;
3026 IHTMLWindow2_Release(&outer_window->pending_window->base.IHTMLWindow2_iface);
3027 }
3028
3029 outer_window->pending_window = pending_window;
3030 return S_OK;
3031}
static HRESULT create_inner_window(HTMLOuterWindow *outer_window, IMoniker *mon, HTMLInnerWindow **ret)
Definition: htmlwindow.c:2917
void abort_window_bindings(HTMLInnerWindow *) DECLSPEC_HIDDEN
Definition: navigate.c:1775
nsChannelBSC * bscallback
HTMLInnerWindow * pending_window
HTMLOuterWindow * outer_window
BSCallback bsc
Definition: binding.h:98

Referenced by async_open(), HTMLOuterWindow_Create(), and set_moniker().

◆ create_storage()

HRESULT create_storage ( IHTMLStorage **  p)

Definition at line 188 of file htmlstorage.c.

189{
190 HTMLStorage *storage;
191
192 storage = heap_alloc_zero(sizeof(*storage));
193 if(!storage)
194 return E_OUTOFMEMORY;
195
196 storage->IHTMLStorage_iface.lpVtbl = &HTMLStorageVtbl;
197 storage->ref = 1;
199
200 *p = &storage->IHTMLStorage_iface;
201 return S_OK;
202}
GLfloat GLfloat p
Definition: glext.h:8902
static const IHTMLStorageVtbl HTMLStorageVtbl
Definition: htmlstorage.c:160
static dispex_static_data_t HTMLStorage_dispex
Definition: htmlstorage.c:181
DispatchEx dispex
Definition: htmlstorage.c:22
IHTMLStorage IHTMLStorage_iface
Definition: htmlstorage.c:23

◆ debugstr_mshtml_guid()

const char * debugstr_mshtml_guid ( const GUID iid)

Definition at line 542 of file main.c.

543{
544#define X(x) if(IsEqualGUID(iid, &x)) return #x
545 X(DIID_HTMLDocumentEvents);
546 X(DIID_HTMLDocumentEvents2);
547 X(DIID_HTMLTableEvents);
548 X(DIID_HTMLTextContainerEvents);
549 X(IID_HTMLPluginContainer);
552 X(IID_ICustomDoc);
554 X(IID_IDispatchEx);
555 X(IID_IDispatchJS);
556 X(IID_UndocumentedScriptIface);
558 X(IID_IEnumVARIANT);
559 X(IID_IHlinkTarget);
560 X(IID_IHTMLDocument6);
561 X(IID_IHTMLDocument7);
562 X(IID_IHTMLEditServices);
563 X(IID_IHTMLFramesCollection2);
564 X(IID_IHTMLPrivateWindow);
565 X(IID_IHtmlLoadOptions);
566 X(IID_IInternetHostSecurityManager);
567 X(IID_IMonikerProp);
568 X(IID_IObjectIdentity);
569 X(IID_IObjectSafety);
572 X(IID_IOleCommandTarget);
574 X(IID_IOleDocument);
575 X(IID_IOleDocumentView);
579 X(IID_IOleInPlaceObjectWindowless);
583 X(IID_IOptionArray);
586 X(IID_IPersistHistory);
587 X(IID_IPersistMoniker);
591 X(IID_IServiceProvider);
592 X(IID_ISupportErrorInfo);
593 X(IID_ITargetContainer);
594 X(IID_ITravelLogClient);
598 X(IID_IViewObjectEx);
599 X(IID_nsCycleCollectionISupports);
600 X(IID_nsXPCOMCycleCollectionParticipant);
601#define XIID(x) X(IID_##x);
602#define XDIID(x) X(DIID_##x);
604#undef XIID
605#undef XDIID
606#undef X
607
608 return debugstr_guid(iid);
609}
const GUID IID_IUnknown
#define X(x)
#define TID_LIST
Definition: ieframe.h:306
#define debugstr_guid
Definition: kernel32.h:35
const IID IID_IObjectWithSite
const GUID IID_IOleInPlaceActiveObject
const GUID IID_IViewObject
const GUID IID_IOleContainer
const GUID IID_IEnumConnections
const GUID IID_IConnectionPointContainer
const GUID IID_IConnectionPoint
const GUID IID_IProvideClassInfo
const GUID IID_IOleInPlaceFrame
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IDispatch
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
const GUID IID_IOleInPlaceUIWindow
const GUID IID_IOleControl
const GUID IID_IPersistStreamInit
const GUID IID_IPersistFile
const GUID IID_IPersist
Definition: proxy.cpp:14

Referenced by ClassFactory_QueryInterface(), ConnectionPoint_QueryInterface(), ConnectionPointContainer_FindConnectionPoint(), CustomDoc_QueryInterface(), DllGetClassObject(), editsvcs_QueryInterface(), EnumConnections_QueryInterface(), Function_QueryInterface(), get_typeinfo(), HTMLAttributeCollection_QueryInterface(), HTMLCurrentStyle_QueryInterface(), HTMLDocument_Create(), HTMLDocumentNode_QI(), HTMLDOMAttribute_QueryInterface(), HTMLDOMChildrenCollection_QueryInterface(), HTMLDOMChildrenCollectionEnum_QueryInterface(), HTMLDOMImplementation_QueryInterface(), HTMLDOMNode_QI(), HTMLDOMTextNode_QI(), HTMLElementCollection_QueryInterface(), HTMLElementCollectionEnum_QueryInterface(), HTMLEmbedElement_QI(), HTMLEventObj_QueryInterface(), HTMLFiltersCollection_QueryInterface(), HTMLHeadElement_QI(), HTMLImageElementFactory_QueryInterface(), HTMLLoadOptions_Create(), HtmlLoadOptions_QueryInterface(), HTMLLocation_QueryInterface(), HTMLMimeTypesCollection_QueryInterface(), HTMLObjectElement_QI(), HTMLOptionElementFactory_QueryInterface(), HTMLPluginsCollection_QueryInterface(), HTMLRect_QueryInterface(), HTMLScreen_QueryInterface(), HTMLSelectionObject_QueryInterface(), HTMLStorage_QueryInterface(), HTMLStyle_QueryInterface(), HTMLStyleSheet_QueryInterface(), HTMLStyleSheetRulesCollection_QueryInterface(), HTMLStyleSheetsCollection_QueryInterface(), HTMLTitleElement_QI(), HTMLTxtRange_QueryInterface(), HTMLWindow2_QueryInterface(), HTMLWindowSP_QueryService(), HTMLXMLHttpRequest_QueryInterface(), HTMLXMLHttpRequestFactory_QueryInterface(), InPlaceFrame_QueryInterface(), InPlaceUIWindow_QueryInterface(), OmHistory_QueryInterface(), OmNavigator_QueryInterface(), SupportErrorInfo_InterfaceSupportsErrorInfo(), typeinfo_invoke(), and wrapper_QueryInterface().

◆ DEFINE_GUID() [1/11]

DEFINE_GUID ( CLSID_AboutProtocol  ,
0x3050F406  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [2/11]

DEFINE_GUID ( CLSID_CMarkup  ,
0x3050f4fb  ,
0x98b5  ,
0x11cf  ,
0xbb  ,
0x82  ,
0x00  ,
0xaa  ,
0x00  ,
0xbd  ,
0xce  ,
0x0b   
)

◆ DEFINE_GUID() [3/11]

DEFINE_GUID ( CLSID_JScript  ,
0xf414c260  ,
0x6ac0  ,
0x11cf  ,
0xb6  ,
0xd1  ,
0x00  ,
0xaa  ,
0x00  ,
0xbb  ,
0xbb  ,
0x58   
)

◆ DEFINE_GUID() [4/11]

DEFINE_GUID ( CLSID_JSProtocol  ,
0x3050F3B2  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [5/11]

DEFINE_GUID ( CLSID_MailtoProtocol  ,
0x3050F3DA  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [6/11]

DEFINE_GUID ( CLSID_ResProtocol  ,
0x3050F3BC  ,
0x98B5  ,
0x11CF  ,
0xBB  ,
0x82  ,
0x00  ,
0xAA  ,
0x00  ,
0xBD  ,
0xCE  ,
0x0B   
)

◆ DEFINE_GUID() [7/11]

DEFINE_GUID ( CLSID_SysimageProtocol  ,
0x76E67A63  ,
0x06E9  ,
0x11D2  ,
0xA8  ,
0x40  ,
0x00  ,
0x60  ,
0x08  ,
0x05  ,
0x93  ,
0x82   
)

◆ DEFINE_GUID() [8/11]

DEFINE_GUID ( CLSID_VBScript  ,
0xb54f3741  ,
0x5b07  ,
0x11cf  ,
0xa4  ,
0xb0  ,
0x00  ,
0xaa  ,
0x00  ,
0x4a  ,
0x55  ,
0xe8   
)

◆ DEFINE_GUID() [9/11]

DEFINE_GUID ( IID_IDispatchJS  ,
0x719c3050  ,
0xf9d3  ,
0x11cf  ,
0xa4  ,
0x93  ,
0x00  ,
0x40  ,
0x05  ,
0x23  ,
0xa8  ,
0xa6   
)

◆ DEFINE_GUID() [10/11]

DEFINE_GUID ( IID_nsXPCOMCycleCollectionParticipant  ,
0x9674489b  ,
0x1f6f  ,
0x4550  ,
0xa7  ,
0x30  ,
0xcc  ,
0xae  ,
0xdd  ,
0x10  ,
0x4c  ,
0xf9   
)

◆ DEFINE_GUID() [11/11]

DEFINE_GUID ( IID_UndocumentedScriptIface  ,
0x719c3050  ,
0xf9d3  ,
0x11cf  ,
0xa4  ,
0x93  ,
0x00  ,
0x40  ,
0x05  ,
0x23  ,
0xa8  ,
0xa0   
)

◆ DEFINE_OLEGUID()

DEFINE_OLEGUID ( CGID_DocHostCmdPriv  ,
0x000214D4L  ,
,
 
)

◆ detach_ranges()

void detach_ranges ( HTMLDocumentNode This)

Definition at line 1747 of file txtrange.c.

1748{
1749 HTMLTxtRange *iter;
1750
1751 LIST_FOR_EACH_ENTRY(iter, &This->range_list, HTMLTxtRange, entry) {
1752 iter->doc = NULL;
1753 }
1754}
HTMLDocumentNode * doc
Definition: txtrange.c:32

Referenced by HTMLDocumentNode_destructor().

◆ detach_selection()

void detach_selection ( HTMLDocumentNode This)

Definition at line 347 of file selection.c.

348{
350
351 LIST_FOR_EACH_ENTRY(iter, &This->selection_list, HTMLSelectionObject, entry) {
352 iter->doc = NULL;
353 }
354}
HTMLDocumentNode * doc
Definition: selection.c:29

Referenced by HTMLDocumentNode_destructor().

◆ dispex_get_dprop_ref()

HRESULT dispex_get_dprop_ref ( DispatchEx This,
const WCHAR name,
BOOL  alloc,
VARIANT **  ret 
)

Definition at line 555 of file dispex.c.

556{
557 dynamic_prop_t *prop;
559
560 hres = get_dynamic_prop(This, name, alloc ? fdexNameEnsure : 0, &prop);
561 if(FAILED(hres))
562 return hres;
563
564 *ret = &prop->var;
565 return S_OK;
566}
static HRESULT get_dynamic_prop(DispatchEx *This, const WCHAR *name, DWORD flags, dynamic_prop_t **ret)
Definition: dispex.c:499
#define alloc
Definition: rosglue.h:13
VARIANT var
Definition: dispex.c:58
Definition: name.c:39

Referenced by get_event_handler(), HTMLElement3_get_disabled(), HTMLElement3_put_disabled(), HTMLElement_get_title(), HTMLElement_put_title(), HTMLStyle3_get_zoom(), HTMLStyle3_put_zoom(), remove_event_handler(), and set_event_handler().

◆ dispex_get_dynid()

HRESULT dispex_get_dynid ( DispatchEx This,
const WCHAR name,
DISPID id 
)

Definition at line 568 of file dispex.c.

569{
570 dynamic_prop_t *prop;
572
573 hres = get_dynamic_prop(This, name, fdexNameEnsure, &prop);
574 if(FAILED(hres))
575 return hres;
576
577 *id = DISPID_DYNPROP_0 + (prop - This->dynamic_data->props);
578 return S_OK;
579}
#define DISPID_DYNPROP_0
Definition: dispex.c:85

Referenced by HTMLWindow_invoke().

◆ dispex_query_interface()

BOOL dispex_query_interface ( DispatchEx This,
REFIID  riid,
void **  ppv 
)

Definition at line 1656 of file dispex.c.

1657{
1659 *ppv = &This->IDispatchEx_iface;
1660 else if(IsEqualGUID(&IID_IDispatchEx, riid))
1661 *ppv = &This->IDispatchEx_iface;
1662 else if(IsEqualGUID(&IID_IDispatchJS, riid))
1663 *ppv = NULL;
1664 else if(IsEqualGUID(&IID_UndocumentedScriptIface, riid))
1665 *ppv = NULL;
1666 else
1667 return FALSE;
1668
1669 if(*ppv)
1670 IUnknown_AddRef((IUnknown*)*ppv);
1671 return TRUE;
1672}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ dispex_traverse()

void dispex_traverse ( DispatchEx This,
nsCycleCollectionTraversalCallback cb 
)

Definition at line 1674 of file dispex.c.

1675{
1676 dynamic_prop_t *prop;
1677
1678 if(!This->dynamic_data)
1679 return;
1680
1681 for(prop = This->dynamic_data->props; prop < This->dynamic_data->props + This->dynamic_data->prop_cnt; prop++) {
1682 if(V_VT(&prop->var) == VT_DISPATCH)
1683 note_cc_edge((nsISupports*)V_DISPATCH(&prop->var), "dispex_data", cb);
1684 }
1685
1686 /* FIXME: Traverse func_disps */
1687}
@ VT_DISPATCH
Definition: compat.h:2304
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define V_DISPATCH(A)
Definition: oleauto.h:239

Referenced by HTMLDOMNode_traverse().

◆ dispex_unlink()

void dispex_unlink ( DispatchEx This)

Definition at line 1689 of file dispex.c.

1690{
1691 dynamic_prop_t *prop;
1692
1693 if(!This->dynamic_data)
1694 return;
1695
1696 for(prop = This->dynamic_data->props; prop < This->dynamic_data->props + This->dynamic_data->prop_cnt; prop++) {
1697 if(V_VT(&prop->var) == VT_DISPATCH) {
1698 V_VT(&prop->var) = VT_EMPTY;
1699 IDispatch_Release(V_DISPATCH(&prop->var));
1700 }else {
1701 VariantClear(&prop->var);
1702 }
1703 }
1704}
@ VT_EMPTY
Definition: compat.h:2295
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by HTMLDOMNode_unlink().

◆ do_ns_command()

void do_ns_command ( HTMLDocument This,
const char cmd,
nsICommandParams nsparam 
)

Definition at line 24 of file olecmd.c.

25{
26 nsICommandManager *cmdmgr;
27 nsresult nsres;
28
29 TRACE("(%p)\n", This);
30
31 if(!This->doc_obj || !This->doc_obj->nscontainer)
32 return;
33
34 nsres = get_nsinterface((nsISupports*)This->doc_obj->nscontainer->webbrowser, &IID_nsICommandManager, (void**)&cmdmgr);
35 if(NS_FAILED(nsres)) {
36 ERR("Could not get nsICommandManager: %08x\n", nsres);
37 return;
38 }
39
40 nsres = nsICommandManager_DoCommand(cmdmgr, cmd, nsparam, This->window->nswindow);
41 if(NS_FAILED(nsres))
42 ERR("DoCommand(%s) failed: %08x\n", debugstr_a(cmd), nsres);
43
44 nsICommandManager_Release(cmdmgr);
45}
#define debugstr_a
Definition: kernel32.h:31
nsresult get_nsinterface(nsISupports *, REFIID, void **) DECLSPEC_HIDDEN
Definition: nsembed.c:907
Definition: ftp_var.h:139

Referenced by exec_bold(), exec_copy(), exec_forecolor(), exec_horizontalline(), exec_indent(), exec_italic(), exec_mshtml_copy(), exec_orderlist(), exec_outdent(), exec_select_all(), exec_underline(), exec_unorderlist(), set_ns_align(), and set_ns_fontname().

◆ do_query_service()

HRESULT do_query_service ( IUnknown unk,
REFGUID  guid_service,
REFIID  riid,
void **  ppv 
)

Definition at line 148 of file main.c.

149{
152
153 hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&sp);
154 if(FAILED(hres))
155 return hres;
156
157 hres = IServiceProvider_QueryService(sp, guid_service, riid, ppv);
158 IServiceProvider_Release(sp);
159 return hres;
160}
static const WCHAR sp[]
Definition: suminfo.c:287

Referenced by hlink_frame_navigate(), HTMLWindow2_open(), navigate_new_window(), OleObject_SetClientSite(), and ServiceProvider_QueryService().

◆ editor_exec_copy()

HRESULT editor_exec_copy ( HTMLDocument This,
DWORD  cmdexecopt,
VARIANT in,
VARIANT out 
)

Definition at line 870 of file editor.c.

871{
873
874 if(!This->doc_obj->nscontainer)
875 return E_FAIL;
876
877 do_ns_editor_command(This->doc_obj->nscontainer, NSCMD_COPY);
878 return S_OK;
879}
#define NSCMD_COPY
Definition: editor.c:26
static void do_ns_editor_command(NSContainer *This, const char *cmd)
Definition: editor.c:99
#define UPDATE_UI
void update_doc(HTMLDocument *, DWORD) DECLSPEC_HIDDEN
Definition: view.c:62

Referenced by exec_mshtml_copy().

◆ editor_exec_cut()

HRESULT editor_exec_cut ( HTMLDocument This,
DWORD  cmdexecopt,
VARIANT in,
VARIANT out 
)

Definition at line 881 of file editor.c.

882{
884
885 if(!This->doc_obj->nscontainer)
886 return E_FAIL;
887
888 do_ns_editor_command(This->doc_obj->nscontainer, NSCMD_CUT);
889 return S_OK;
890}
#define NSCMD_CUT
Definition: editor.c:27

Referenced by exec_mshtml_cut().

◆ editor_exec_paste()

HRESULT editor_exec_paste ( HTMLDocument This,
DWORD  cmdexecopt,
VARIANT in,
VARIANT out 
)

Definition at line 892 of file editor.c.

893{
895
896 if(!This->doc_obj->nscontainer)
897 return E_FAIL;
898
899 do_ns_editor_command(This->doc_obj->nscontainer, NSCMD_PASTE);
900 return S_OK;
901}
#define NSCMD_PASTE
Definition: editor.c:45

Referenced by exec_mshtml_paste().

◆ editor_is_dirty()

HRESULT editor_is_dirty ( HTMLDocument This)

Definition at line 1209 of file editor.c.

1210{
1211 cpp_bool modified;
1212
1213 if(!This->doc_obj->nscontainer || !This->doc_obj->nscontainer->editor)
1214 return S_FALSE;
1215
1216 nsIEditor_GetDocumentModified(This->doc_obj->nscontainer->editor, &modified);
1217
1218 return modified ? S_OK : S_FALSE;
1219}
unsigned char cpp_bool
Definition: atl.c:38
#define S_FALSE
Definition: winerror.h:2357

Referenced by PersistStreamInit_IsDirty().

◆ elem_string_attr_getter()

HRESULT elem_string_attr_getter ( HTMLElement elem,
const WCHAR name,
BOOL  use_null,
BSTR p 
)

Definition at line 162 of file htmlelem.c.

163{
164 const PRUnichar *val;
165 nsAString val_str;
166 nsresult nsres;
167 HRESULT hres = S_OK;
168
169 nsres = get_elem_attr_value(elem->nselem, name, &val_str, &val);
170 if(NS_FAILED(nsres))
171 return E_FAIL;
172
173 TRACE("%s: returning %s\n", debugstr_w(name), debugstr_w(val));
174
175 if(*val || !use_null) {
176 *p = SysAllocString(val);
177 if(!*p)
179 }else {
180 *p = NULL;
181 }
182 nsAString_Finish(&val_str);
183 return hres;
184}
GLuint GLfloat * val
Definition: glext.h:7180
nsresult get_elem_attr_value(nsIDOMHTMLElement *nselem, const WCHAR *name, nsAString *val_str, const PRUnichar **val)
Definition: htmlelem.c:143
#define debugstr_w
Definition: kernel32.h:32
static size_t elem
Definition: string.c:68
WCHAR PRUnichar
Definition: nsiface.idl:48
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

Referenced by HTMLElement_get_language(), HTMLLabelElement_get_htmlFor(), HTMLMetaElement_get_charset(), HTMLMetaElement_get_content(), HTMLMetaElement_get_httpEquiv(), and HTMLMetaElement_get_name().

◆ elem_string_attr_setter()

HRESULT elem_string_attr_setter ( HTMLElement elem,
const WCHAR name,
const WCHAR value 
)

Definition at line 186 of file htmlelem.c.

187{
188 nsAString name_str, val_str;
189 nsresult nsres;
190
191 nsAString_InitDepend(&name_str, name);
192 nsAString_InitDepend(&val_str, value);
193 nsres = nsIDOMHTMLElement_SetAttribute(elem->nselem, &name_str, &val_str);
194 nsAString_Finish(&name_str);
195 nsAString_Finish(&val_str);
196
197 if(NS_FAILED(nsres)) {
198 WARN("SetAttribute failed: %08x\n", nsres);
199 return E_FAIL;
200 }
201
202 return S_OK;
203}
Definition: pdh_main.c:94

Referenced by HTMLElement_put_language(), HTMLMetaElement_put_charset(), and HTMLObjectElement2_put_classid().

◆ flush_pending_tasks()

void flush_pending_tasks ( LONG  target)

Definition at line 88 of file task.c.

89{
91 struct list *liter, *ltmp;
92 task_t *task;
93
94 if(!thread_data)
95 return;
96
97 LIST_FOR_EACH_SAFE(liter, ltmp, &thread_data->task_list) {
98 task = LIST_ENTRY(liter, task_t, entry);
99 if(task->target_magic == target) {
100 list_remove(&task->entry);
101 task->proc(task);
102 task->destr(task);
103 }
104 }
105}
Definition: list.h:37
GLenum target
Definition: glext.h:7315
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
task_proc_t proc
task_proc_t destr
struct list entry
LONG target_magic

Referenced by handle_load().

◆ get_client_disp_property()

HRESULT get_client_disp_property ( IOleClientSite client,
DISPID  dispid,
VARIANT res 
)

Definition at line 811 of file oleobj.c.

812{
813 IDispatch *disp = NULL;
814 DISPPARAMS dispparams = {NULL, 0};
815 UINT err;
817
818 hres = IOleClientSite_QueryInterface(client, &IID_IDispatch, (void**)&disp);
819 if(FAILED(hres)) {
820 TRACE("Could not get IDispatch\n");
821 return hres;
822 }
823
825
826 hres = IDispatch_Invoke(disp, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
827 DISPATCH_PROPERTYGET, &dispparams, res, NULL, &err);
828
829 IDispatch_Release(disp);
830
831 return hres;
832}
GLuint res
Definition: glext.h:9613
struct stdole::DISPPARAMS DISPPARAMS
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_SYSTEM_DEFAULT
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define IID_NULL
Definition: guiddef.h:98
#define err(...)
static FILE * client
Definition: client.c:41

Referenced by OleControl_OnAmbientPropertyChange(), OleObject_SetClientSite(), and on_change_dlcontrol().

◆ get_context_from_document()

JSContext * get_context_from_document ( nsIDOMHTMLDocument nsdoc)

Definition at line 758 of file mutation.c.

759{
760 nsIDocument *doc;
761 JSContext *ctx;
762 nsresult nsres;
763
764 nsres = nsIDOMHTMLDocument_QueryInterface(nsdoc, &IID_nsIDocument, (void**)&doc);
765 assert(nsres == NS_OK);
766
767 ctx = nsIContentUtils_GetContextFromDocument(content_utils, doc);
768 nsIDocument_Release(doc);
769
770 TRACE("ret %p\n", ctx);
771 return ctx;
772}
static nsIContentUtils * content_utils
Definition: mutation.c:27

Referenced by document_write(), and HTMLDocument_open().

◆ get_dispid_type()

dispex_prop_type_t get_dispid_type ( DISPID  id)

Definition at line 464 of file dispex.c.

465{
466 if(is_dynamic_dispid(id))
467 return DISPEXPROP_DYNAMIC;
468 if(is_custom_dispid(id))
469 return DISPEXPROP_CUSTOM;
470 return DISPEXPROP_BUILTIN;
471}
static BOOL is_custom_dispid(DISPID id)
Definition: dispex.c:454
static BOOL is_dynamic_dispid(DISPID id)
Definition: dispex.c:459

Referenced by DispatchEx_InvokeEx(), HTMLDOMAttribute2_get_expando(), HTMLDOMAttribute_get_specified(), and remove_attribute().

◆ get_dispids()

HRESULT get_dispids ( tid_t  tid,
DWORD ret_size,
DISPID **  ret 
)

Definition at line 389 of file dispex.c.

390{
391 unsigned i, func_cnt;
392 FUNCDESC *funcdesc;
393 ITypeInfo *ti;
394 TYPEATTR *attr;
395 DISPID *ids;
397
398 hres = get_typeinfo(tid, &ti);
399 if(FAILED(hres))
400 return hres;
401
402 hres = ITypeInfo_GetTypeAttr(ti, &attr);
403 if(FAILED(hres)) {
404 ITypeInfo_Release(ti);
405 return hres;
406 }
407
408 func_cnt = attr->cFuncs;
409 ITypeInfo_ReleaseTypeAttr(ti, attr);
410
411 ids = heap_alloc(func_cnt*sizeof(DISPID));
412 if(!ids) {
413 ITypeInfo_Release(ti);
414 return E_OUTOFMEMORY;
415 }
416
417 for(i=0; i < func_cnt; i++) {
418 hres = ITypeInfo_GetFuncDesc(ti, i, &funcdesc);
419 if(FAILED(hres))
420 break;
421
422 ids[i] = funcdesc->memid;
423 ITypeInfo_ReleaseFuncDesc(ti, funcdesc);
424 }
425
426 ITypeInfo_Release(ti);
427 if(FAILED(hres)) {
428 heap_free(ids);
429 return hres;
430 }
431
432 qsort(ids, func_cnt, sizeof(DISPID), id_cmp);
433
434 *ret_size = func_cnt;
435 *ret = ids;
436 return S_OK;
437}
GLuint * ids
Definition: glext.h:5907
static TfClientId tid
static VARIANTARG static DISPID
Definition: ordinal.c:52
static int id_cmp(const void *p1, const void *p2)
Definition: dispex.c:384
static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
Definition: dispex.c:118
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
Definition: cookie.c:202

Referenced by is_cp_event().

◆ get_display_dc()

HDC get_display_dc ( void  )

Definition at line 173 of file main.c.

174{
175 static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
176
177 if(!display_dc) {
178 HDC hdc;
179
183 }
184
185 return display_dc;
186}
static HDC display_dc
Definition: main.c:41
pKey DeleteObject()
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static const WCHAR displayW[]
Definition: icm.c:30
HDC WINAPI CreateICW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ const DEVMODEW *)

Referenced by HTMLScreen_get_colorDepth(), HTMLScreen_get_height(), and HTMLScreen_get_width().

◆ get_doc_elem_by_id()

HRESULT get_doc_elem_by_id ( HTMLDocumentNode doc,
const WCHAR id,
HTMLElement **  ret 
)

Definition at line 23 of file htmldoc.c.

24{
25 nsIDOMNodeList *nsnode_list;
26 nsIDOMElement *nselem;
27 nsIDOMNode *nsnode;
28 nsAString id_str;
29 nsresult nsres;
31
32 if(!doc->nsdoc) {
33 WARN("NULL nsdoc\n");
34 return E_UNEXPECTED;
35 }
36
37 nsAString_InitDepend(&id_str, id);
38 /* get element by id attribute */
39 nsres = nsIDOMHTMLDocument_GetElementById(doc->nsdoc, &id_str, &nselem);
40 if(FAILED(nsres)) {
41 ERR("GetElementById failed: %08x\n", nsres);
42 nsAString_Finish(&id_str);
43 return E_FAIL;
44 }
45
46 /* get first element by name attribute */
47 nsres = nsIDOMHTMLDocument_GetElementsByName(doc->nsdoc, &id_str, &nsnode_list);
48 nsAString_Finish(&id_str);
49 if(FAILED(nsres)) {
50 ERR("getElementsByName failed: %08x\n", nsres);
51 if(nselem)
52 nsIDOMElement_Release(nselem);
53 return E_FAIL;
54 }
55
56 nsres = nsIDOMNodeList_Item(nsnode_list, 0, &nsnode);
57 nsIDOMNodeList_Release(nsnode_list);
58 assert(nsres == NS_OK);
59
60 if(nsnode && nselem) {
61 UINT16 pos;
62
63 nsres = nsIDOMNode_CompareDocumentPosition(nsnode, (nsIDOMNode*)nselem, &pos);
64 if(NS_FAILED(nsres)) {
65 FIXME("CompareDocumentPosition failed: 0x%08x\n", nsres);
66 nsIDOMNode_Release(nsnode);
67 nsIDOMElement_Release(nselem);
68 return E_FAIL;
69 }
70
71 TRACE("CompareDocumentPosition gave: 0x%x\n", pos);
72 if(!(pos & (DOCUMENT_POSITION_PRECEDING | DOCUMENT_POSITION_CONTAINS))) {
73 nsIDOMElement_Release(nselem);
74 nselem = NULL;
75 }
76 }
77
78 if(nsnode) {
79 if(!nselem) {
80 nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMElement, (void**)&nselem);
81 assert(nsres == NS_OK);
82 }
83 nsIDOMNode_Release(nsnode);
84 }
85
86 if(!nselem) {
87 *ret = NULL;
88 return S_OK;
89 }
90
91 hres = get_elem(doc, nselem, ret);
92 nsIDOMElement_Release(nselem);
93 return hres;
94}
unsigned short UINT16
HRESULT get_elem(HTMLDocumentNode *doc, nsIDOMElement *nselem, HTMLElement **ret)
Definition: htmlelem.c:4078

Referenced by find_event_target(), HTMLDocument3_getElementById(), test_elems(), test_elems2(), and test_frameset().

◆ get_document_charset()

UINT get_document_charset ( HTMLDocumentNode doc)

Definition at line 96 of file htmldoc.c.

97{
98 nsAString charset_str;
99 UINT ret = 0;
100 nsresult nsres;
101
102 if(doc->charset)
103 return doc->charset;
104
105 nsAString_Init(&charset_str, NULL);
106 nsres = nsIDOMHTMLDocument_GetCharacterSet(doc->nsdoc, &charset_str);
107 if(NS_SUCCEEDED(nsres)) {
108 const PRUnichar *charset;
109
110 nsAString_GetData(&charset_str, &charset);
111
112 if(*charset) {
116 }
117 }else {
118 ERR("GetCharset failed: %08x\n", nsres);
119 }
120 nsAString_Finish(&charset_str);
121
122 if(!ret)
123 return CP_UTF8;
124
125 return doc->charset = ret;
126}
OLECHAR * BSTR
Definition: compat.h:2293
UINT cp_from_charset_string(BSTR charset)
Definition: main.c:45
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
#define NS_SUCCEEDED(res)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271

Referenced by bind_script_to_text().

◆ get_editor_controller()

void get_editor_controller ( NSContainer This)

Definition at line 1029 of file nsembed.c.

1030{
1031 nsIEditingSession *editing_session = NULL;
1032 nsIControllerContext *ctrlctx;
1033 nsresult nsres;
1034
1035 if(This->editor) {
1036 nsIEditor_Release(This->editor);
1037 This->editor = NULL;
1038 }
1039
1040 if(This->editor_controller) {
1041 nsIController_Release(This->editor_controller);
1042 This->editor_controller = NULL;
1043 }
1044
1045 nsres = get_nsinterface((nsISupports*)This->webbrowser, &IID_nsIEditingSession,
1046 (void**)&editing_session);
1047 if(NS_FAILED(nsres)) {
1048 ERR("Could not get nsIEditingSession: %08x\n", nsres);
1049 return;
1050 }
1051
1052 nsres = nsIEditingSession_GetEditorForWindow(editing_session,
1053 This->doc->basedoc.window->nswindow, &This->editor);
1054 nsIEditingSession_Release(editing_session);
1055 if(NS_FAILED(nsres)) {
1056 ERR("Could not get editor: %08x\n", nsres);
1057 return;
1058 }
1059
1060 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
1061 NS_EDITORCONTROLLER_CONTRACTID, NULL, &IID_nsIControllerContext, (void**)&ctrlctx);
1062 if(NS_SUCCEEDED(nsres)) {
1063 nsres = nsIControllerContext_SetCommandContext(ctrlctx, (nsISupports *)This->editor);
1064 if(NS_FAILED(nsres))
1065 ERR("SetCommandContext failed: %08x\n", nsres);
1066 nsres = nsIControllerContext_QueryInterface(ctrlctx, &IID_nsIController,
1067 (void**)&This->editor_controller);
1068 nsIControllerContext_Release(ctrlctx);
1069 if(NS_FAILED(nsres))
1070 ERR("Could not get nsIController interface: %08x\n", nsres);
1071 }else {
1072 ERR("Could not create edit controller: %08x\n", nsres);
1073 }
1074}
nsresult get_nsinterface(nsISupports *iface, REFIID riid, void **ppv)
Definition: nsembed.c:907
#define NS_EDITORCONTROLLER_CONTRACTID
Definition: nsembed.c:30

Referenced by handle_edit_load().

◆ get_elem()

HRESULT get_elem ( HTMLDocumentNode doc,
nsIDOMElement nselem,
HTMLElement **  ret 
)

Definition at line 4078 of file htmlelem.c.

4079{
4081 HRESULT hres;
4082
4083 hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node);
4084 if(FAILED(hres))
4085 return hres;
4086
4088 return S_OK;
4089}
static HTMLElement * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlelem.c:3733

Referenced by get_doc_elem_by_id(), and HTMLDocument_get_activeElement().

◆ get_elem_attr_value()

nsresult get_elem_attr_value ( nsIDOMHTMLElement nselem,
const WCHAR name,
nsAString val_str,
const PRUnichar **  val 
)

Definition at line 143 of file htmlelem.c.

144{
145 nsAString name_str;
146 nsresult nsres;
147
148 nsAString_InitDepend(&name_str, name);
149 nsAString_Init(val_str, NULL);
150 nsres = nsIDOMHTMLElement_GetAttribute(nselem, &name_str, val_str);
151 nsAString_Finish(&name_str);
152 if(NS_FAILED(nsres)) {
153 ERR("GetAttribute(%s) failed: %08x\n", debugstr_w(name), nsres);
154 nsAString_Finish(val_str);
155 return nsres;
156 }
157
158 nsAString_GetData(val_str, val);
159 return NS_OK;
160}

Referenced by check_codebase(), check_event_attr(), elem_string_attr_getter(), fill_props(), get_elem_clsid(), get_font_size(), get_script_guid(), HTMLFormElement_get_dispid(), and is_elem_name().

◆ get_elem_attr_value_by_dispid()

HRESULT get_elem_attr_value_by_dispid ( HTMLElement elem,
DISPID  dispid,
DWORD  flags,
VARIANT ret 
)

Definition at line 621 of file htmlelem.c.

622{
623 DISPPARAMS dispParams = {NULL, NULL, 0, 0};
624 EXCEPINFO excep;
626
627 hres = IDispatchEx_InvokeEx(&elem->node.event_target.dispex.IDispatchEx_iface, dispid, LOCALE_SYSTEM_DEFAULT,
628 DISPATCH_PROPERTYGET, &dispParams, ret, &excep, NULL);
629 if(FAILED(hres))
630 return hres;
631
633 switch(V_VT(ret)) {
634 case VT_BSTR:
635 break;
636 case VT_DISPATCH:
637 IDispatch_Release(V_DISPATCH(ret));
638 V_VT(ret) = VT_BSTR;
640 break;
641 default:
643 if(FAILED(hres))
644 return hres;
645 }
646 }
647
648 return S_OK;
649}
@ VT_BSTR
Definition: compat.h:2303
GLbitfield flags
Definition: glext.h:7161
#define ATTRFLAG_ASSTRING
struct stdole::EXCEPINFO EXCEPINFO
#define V_BSTR(A)
Definition: oleauto.h:226
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962

Referenced by HTMLDOMAttribute2_get_value(), HTMLDOMAttribute_get_nodeValue(), and HTMLElement_getAttribute().

◆ get_elem_source_index()

HRESULT get_elem_source_index ( HTMLElement elem,
LONG ret 
)

Definition at line 740 of file htmlelemcol.c.

741{
742 elem_vector_t buf = {NULL, 0, 8};
743 nsIDOMNode *parent_node, *iter;
744 UINT16 parent_type;
746 int i;
747 nsresult nsres;
749
750 iter = elem->node.nsnode;
751 nsIDOMNode_AddRef(iter);
752
753 /* Find document or document fragment parent. */
754 while(1) {
755 nsres = nsIDOMNode_GetParentNode(iter, &parent_node);
756 nsIDOMNode_Release(iter);
757 assert(nsres == NS_OK);
758 if(!parent_node)
759 break;
760
761 nsres = nsIDOMNode_GetNodeType(parent_node, &parent_type);
762 assert(nsres == NS_OK);
763
764 if(parent_type != ELEMENT_NODE) {
765 if(parent_type != DOCUMENT_NODE && parent_type != DOCUMENT_FRAGMENT_NODE)
766 FIXME("Unexpected parent_type %d\n", parent_type);
767 break;
768 }
769
770 iter = parent_node;
771 }
772
773 if(!parent_node) {
774 *ret = -1;
775 return S_OK;
776 }
777
778 hres = get_node(elem->node.doc, parent_node, TRUE, &node);
779 nsIDOMNode_Release(parent_node);
780 if(FAILED(hres))
781 return hres;
782
783
784 /* Create all children collection and find the element in it.
785 * This could be optimized if we ever find the reason. */
786 buf.buf = heap_alloc(buf.size*sizeof(*buf.buf));
787 if(!buf.buf) {
788 IHTMLDOMNode_Release(&node->IHTMLDOMNode_iface);
789 return E_OUTOFMEMORY;
790 }
791
792 create_all_list(elem->node.doc, node, &buf);
793
794 for(i=0; i < buf.len; i++) {
795 if(buf.buf[i] == elem)
796 break;
797 }
798 IHTMLDOMNode_Release(&node->IHTMLDOMNode_iface);
799 heap_free(buf.buf);
800 if(i == buf.len) {
801 FIXME("The element is not in parent's child list?\n");
802 return E_UNEXPECTED;
803 }
804
805 *ret = i;
806 return S_OK;
807}

Referenced by HTMLElement_get_sourceIndex().

◆ get_frame_by_name()

HRESULT get_frame_by_name ( HTMLOuterWindow This,
const WCHAR name,
BOOL  deep,
HTMLOuterWindow **  ret 
)

Definition at line 343 of file htmlwindow.c.

344{
345 nsIDOMWindowCollection *nsframes;
347 nsIDOMWindow *nswindow;
348 nsAString name_str;
349 UINT32 length, i;
350 nsresult nsres;
351 HRESULT hres = S_OK;
352
353 nsres = nsIDOMWindow_GetFrames(This->nswindow, &nsframes);
354 if(NS_FAILED(nsres)) {
355 FIXME("nsIDOMWindow_GetFrames failed: 0x%08x\n", nsres);
356 return E_FAIL;
357 }
358
359 if(!nsframes) {
360 WARN("nsIDOMWindow_GetFrames returned NULL nsframes: %p\n", This->nswindow);
362 }
363
364 nsAString_InitDepend(&name_str, name);
365 nsres = nsIDOMWindowCollection_NamedItem(nsframes, &name_str, &nswindow);
366 nsAString_Finish(&name_str);
367 if(NS_FAILED(nsres)) {
368 nsIDOMWindowCollection_Release(nsframes);
369 return E_FAIL;
370 }
371
372 if(nswindow) {
373 *ret = nswindow_to_window(nswindow);
374 return S_OK;
375 }
376
377 nsres = nsIDOMWindowCollection_GetLength(nsframes, &length);
378 assert(nsres == NS_OK);
379
380 for(i = 0; i < length && !window; ++i) {
381 HTMLOuterWindow *window_iter;
382 BSTR id;
383
384 nsres = nsIDOMWindowCollection_Item(nsframes, i, &nswindow);
385 if(NS_FAILED(nsres)) {
386 FIXME("nsIDOMWindowCollection_Item failed: 0x%08x\n", nsres);
387 hres = E_FAIL;
388 break;
389 }
390
391 window_iter = nswindow_to_window(nswindow);
392
393 nsIDOMWindow_Release(nswindow);
394
395 if(!window_iter) {
396 WARN("nsIDOMWindow without HTMLOuterWindow: %p\n", nswindow);
397 continue;
398 }
399
400 hres = IHTMLElement_get_id(&window_iter->frame_element->element.IHTMLElement_iface, &id);
401 if(FAILED(hres)) {
402 FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres);
403 break;
404 }
405
406 if(id && !strcmpiW(id, name))
407 window = window_iter;
408
409 SysFreeString(id);
410
411 if(!window && deep)
412 get_frame_by_name(window_iter, name, TRUE, &window);
413 }
414
415 nsIDOMWindowCollection_Release(nsframes);
416 if(FAILED(hres))
417 return hres;
418
419 *ret = window;
420 return NS_OK;
421}
GLuint id
Definition: glext.h:5910
HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, HTMLOuterWindow **ret)
Definition: htmlwindow.c:343
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099
#define strcmpiW(s1, s2)
Definition: unicode.h:39
IHTMLElement IHTMLElement_iface
HTMLElement element
HTMLFrameBase * frame_element
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512

Referenced by get_frame_by_name(), get_target_window(), HTMLWindow2_item(), HTMLWindow_invoke(), and WindowDispEx_GetDispID().

◆ get_htmldoc_classinfo()

HRESULT get_htmldoc_classinfo ( ITypeInfo **  typeinfo)

Definition at line 172 of file dispex.c.

173{
175
176 if (!typelib)
177 hres = load_typelib();
178 if (!typelib)
179 return hres;
180
181 hres = ITypeLib_GetTypeInfoOfGuid(typelib, &CLSID_HTMLDocument, typeinfo);
182 if(FAILED(hres))
183 ERR("GetTypeInfoOfGuid failed: %08x\n", hres);
184 return hres;
185}
static ITypeLib * typelib
Definition: dispex.c:90
static HRESULT load_typelib(void)
Definition: dispex.c:102

Referenced by ProvideClassInfo_GetClassInfo().

◆ get_node()

HRESULT get_node ( HTMLDocumentNode This,
nsIDOMNode nsnode,
BOOL  create,
HTMLDOMNode **  ret 
)

Definition at line 1339 of file htmlnode.c.

1340{
1341 nsISupports *unk = NULL;
1342 nsresult nsres;
1343
1344 nsres = nsIDOMNode_GetMshtmlNode(nsnode, &unk);
1345 assert(nsres == NS_OK);
1346
1347 if(unk) {
1348 *ret = get_node_obj((IHTMLDOMNode*)unk);
1349 nsISupports_Release(unk);
1350 return NS_OK;
1351 }
1352
1353 if(!create) {
1354 *ret = NULL;
1355 return S_OK;
1356 }
1357
1358 return create_node(This, nsnode, ret);
1359}
static HRESULT create_node(HTMLDocumentNode *, nsIDOMNode *, HTMLDOMNode **)
Definition: htmlnode.c:1216
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045
static const struct access_res create[16]
Definition: package.c:7644

Referenced by check_event_attr(), create_all_list(), create_collection_from_htmlcol(), create_collection_from_nodelist(), fire_event(), fire_event_obj(), get_elem(), get_elem_source_index(), HTMLDocument3_get_documentElement(), HTMLDocument_elementFromPoint(), HTMLDocument_get_all(), HTMLDocument_get_body(), HTMLDocumentNode_invoke(), HTMLDOMChildrenCollection_item(), HTMLDOMChildrenCollectionEnum_Next(), HTMLDOMNode_appendChild(), HTMLDOMNode_get_firstChild(), HTMLDOMNode_get_lastChild(), HTMLDOMNode_get_nextSibling(), HTMLDOMNode_get_parentNode(), HTMLDOMNode_get_previousSibling(), HTMLDOMNode_insertBefore(), HTMLDOMNode_removeChild(), HTMLDOMNode_replaceChild(), HTMLDOMTextNode_splitText(), HTMLElement_get_offsetParent(), htmlform_item(), HTMLInputElement_get_form(), HTMLOptionElement_get_form(), HTMLOptionElementFactory_create(), htmlselect_item(), HTMLSelectElement_get_form(), HTMLTextAreaElement_get_form(), HTMLTxtRange_parentElement(), insert_adjacent_node(), NPP_New(), nsContextMenuListener_OnShowContextMenu(), run_bind_to_tree(), and script_elem_from_nsscript().

◆ get_node_text()

HRESULT get_node_text ( HTMLDOMNode node,
BSTR ret 
)

Definition at line 515 of file txtrange.c.

516{
518 HRESULT hres = S_OK;
519
520 if (!wstrbuf_init(&buf))
521 return E_OUTOFMEMORY;
523 if(buf.buf) {
524 *ret = SysAllocString(buf.buf);
525 if(!*ret)
527 } else {
528 *ret = NULL;
529 }
531
532 if(SUCCEEDED(hres))
533 TRACE("ret %s\n", debugstr_w(*ret));
534 return hres;
535}
static BOOL wstrbuf_init(wstrbuf_t *buf)
Definition: txtrange.c:344
static void wstrbuf_finish(wstrbuf_t *buf)
Definition: txtrange.c:354
static void wstrbuf_append_node_rec(wstrbuf_t *buf, nsIDOMNode *node)
Definition: txtrange.c:439

Referenced by HTMLElement_get_innerText().

◆ get_nscategory_entry()

char * get_nscategory_entry ( const char category,
const char entry 
)

Definition at line 898 of file nsembed.c.

899{
900 char *ret = NULL;
901 nsresult nsres;
902
903 nsres = nsICategoryManager_GetCategoryEntry(cat_mgr, category, entry, &ret);
904 return NS_SUCCEEDED(nsres) ? ret : NULL;
905}

Referenced by is_supported_doc_mime().

◆ get_nsinterface()

nsresult get_nsinterface ( nsISupports iface,
REFIID  riid,
void **  ppv 
)

Definition at line 907 of file nsembed.c.

908{
909 nsIInterfaceRequestor *iface_req;
910 nsresult nsres;
911
912 nsres = nsISupports_QueryInterface(iface, &IID_nsIInterfaceRequestor, (void**)&iface_req);
913 if(NS_FAILED(nsres))
914 return nsres;
915
916 nsres = nsIInterfaceRequestor_GetInterface(iface_req, riid, ppv);
917 nsIInterfaceRequestor_Release(iface_req);
918
919 return nsres;
920}

Referenced by CustomDoc_Release(), do_ns_command(), exec_print(), get_clipboard_commands(), get_editor_controller(), get_ns_command_state(), load_nsuri(), and set_viewer_zoom().

◆ get_readystate_string()

HRESULT get_readystate_string ( READYSTATE  readystate,
BSTR p 
)

Definition at line 205 of file htmlelem.c.

206{
207 static const WCHAR uninitializedW[] = {'u','n','i','n','i','t','i','a','l','i','z','e','d',0};
208 static const WCHAR loadingW[] = {'l','o','a','d','i','n','g',0};
209 static const WCHAR loadedW[] = {'l','o','a','d','e','d',0};
210 static const WCHAR interactiveW[] = {'i','n','t','e','r','a','c','t','i','v','e',0};
211 static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
212
213 static const LPCWSTR readystate_strs[] = {
214 uninitializedW,
215 loadingW,
216 loadedW,
217 interactiveW,
218 completeW
219 };
220
221 assert(readystate <= READYSTATE_COMPLETE);
222 *p = SysAllocString(readystate_strs[readystate]);
223 return *p ? S_OK : E_OUTOFMEMORY;
224}
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by HTMLDocument_get_readyState(), and HTMLScriptElement_get_readyState().

◆ get_shdoclc()

HINSTANCE get_shdoclc ( void  )

Definition at line 162 of file main.c.

163{
164 static const WCHAR wszShdoclc[] =
165 {'s','h','d','o','c','l','c','.','d','l','l',0};
166
167 if(shdoclc)
168 return shdoclc;
169
171}
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
const char nsCycleCollectionTraversalCallback const char nsCycleCollectionTraversalCallback *static HINSTANCE shdoclc
Definition: main.c:40
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:342

Referenced by HTMLWindow2_alert(), HTMLWindow2_confirm(), prompt_dlgproc(), set_default_templates(), and show_context_menu().

◆ get_target_window()

HTMLOuterWindow * get_target_window ( HTMLOuterWindow window,
nsAString target_str,
BOOL use_new_window 
)

Definition at line 45 of file htmlanchor.c.

46{
47 HTMLOuterWindow *top_window, *ret_window;
48 const PRUnichar *target;
50
51 static const WCHAR _parentW[] = {'_','p','a','r','e','n','t',0};
52 static const WCHAR _selfW[] = {'_','s','e','l','f',0};
53 static const WCHAR _topW[] = {'_','t','o','p',0};
54
55 *use_new_window = FALSE;
56
57 nsAString_GetData(target_str, &target);
58 TRACE("%s\n", debugstr_w(target));
59
60 if(!*target || !strcmpiW(target, _selfW)) {
61 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
62 return window;
63 }
64
65 if(!strcmpiW(target, _topW)) {
66 get_top_window(window, &top_window);
67 IHTMLWindow2_AddRef(&top_window->base.IHTMLWindow2_iface);
68 return top_window;
69 }
70
71 if(!strcmpiW(target, _parentW)) {
72 if(!window->parent) {
73 WARN("Window has no parent, treat as self\n");
74 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
75 return window;
76 }
77
78 IHTMLWindow2_AddRef(&window->parent->base.IHTMLWindow2_iface);
79 return window->parent;
80 }
81
82 get_top_window(window, &top_window);
83
84 hres = get_frame_by_name(top_window, target, TRUE, &ret_window);
85 if(FAILED(hres) || !ret_window) {
86 *use_new_window = TRUE;
87 return NULL;
88 }
89
90 IHTMLWindow2_AddRef(&ret_window->base.IHTMLWindow2_iface);
91 return ret_window;
92}
void get_top_window(HTMLOuterWindow *window, HTMLOuterWindow **ret)
Definition: htmlwindow.c:59

Referenced by HTMLFormElement_submit(), and navigate_href().

◆ get_task_target_magic()

LONG get_task_target_magic ( void  )

Definition at line 139 of file task.c.

140{
141 static LONG magic = 0x10000000;
143}
#define InterlockedIncrement
Definition: armddk.h:53
u32_t magic(void)
long LONG
Definition: pedump.c:60

Referenced by create_inner_window(), HTMLOuterWindow_Create(), and init_doc().

◆ get_thread_data()

thread_data_t * get_thread_data ( BOOL  create)

Definition at line 352 of file task.c.

353{
355
357 DWORD tls;
358
359 if(!create)
360 return NULL;
361
362 tls = TlsAlloc();
364 return NULL;
365
367 if(tls != mshtml_tls)
368 TlsFree(tls);
369 }
370
372 if(!thread_data && create) {
373 thread_data = heap_alloc_zero(sizeof(thread_data_t));
374 if(!thread_data)
375 return NULL;
376
378 list_init(&thread_data->task_list);
379 list_init(&thread_data->timer_list);
380 }
381
382 return thread_data;
383}
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1100
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
DWORD mshtml_tls
Definition: main.c:31
#define InterlockedCompareExchange
Definition: interlocked.h:104
static DWORD tls
Definition: sock.c:229
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:549

Referenced by clear_task_timer(), flush_pending_tasks(), get_thread_hwnd(), pop_task(), process_timer(), push_task(), remove_target_tasks(), set_task_timer(), and thread_detach().

◆ get_thread_hwnd()

HWND get_thread_hwnd ( void  )

Definition at line 338 of file task.c.

339{
341
343 if(!thread_data)
344 return NULL;
345
346 if(!thread_data->thread_hwnd)
347 thread_data->thread_hwnd = create_thread_hwnd();
348
349 return thread_data->thread_hwnd;
350}
static HWND create_thread_hwnd(void)
Definition: task.c:316

Referenced by HTMLDocument_Create().

◆ get_top_window()

void get_top_window ( HTMLOuterWindow window,
HTMLOuterWindow **  ret 
)

Definition at line 59 of file htmlwindow.c.

60{
61 HTMLOuterWindow *iter;
62
63 for(iter = window; iter->parent; iter = iter->parent);
64 *ret = iter;
65}
HTMLOuterWindow * parent

Referenced by get_target_window(), and HTMLWindow2_get_top().

◆ handle_edit_event()

void handle_edit_event ( HTMLDocument This,
nsIDOMEvent event 
)

Definition at line 384 of file editor.c.

385{
387 UINT32 code;
388
389 nsIDOMEvent_QueryInterface(event, &IID_nsIDOMKeyEvent, (void**)&key_event);
390
391 nsIDOMKeyEvent_GetKeyCode(key_event, &code);
392
393 switch(code) {
394 case DOM_VK_LEFT: {
395 static const char * const cmds[] = {
400 };
401
402 TRACE("left\n");
404 break;
405 }
406 case DOM_VK_RIGHT: {
407 static const char * const cmds[] = {
412 };
413
414 TRACE("right\n");
416 break;
417 }
418 case DOM_VK_UP: {
419 static const char * const cmds[] = {
424 };
425
426 TRACE("up\n");
428 break;
429 }
430 case DOM_VK_DOWN: {
431 static const char * const cmds[] = {
436 };
437
438 TRACE("down\n");
440 break;
441 }
442 case DOM_VK_DELETE: {
443 static const char * const cmds[] = {
446 NULL, NULL
447 };
448
449 TRACE("delete\n");
451 break;
452 }
453 case DOM_VK_HOME: {
454 static const char * const cmds[] = {
459 };
460
461 TRACE("home\n");
463 break;
464 }
465 case DOM_VK_END: {
466 static const char * const cmds[] = {
471 };
472
473 TRACE("end\n");
475 break;
476 }
477 }
478
479 nsIDOMKeyEvent_Release(key_event);
480}
COMMAND cmds[]
Definition: main.c:21
#define NSCMD_LINENEXT
Definition: editor.c:37
#define DOM_VK_DOWN
Definition: editor.c:73
#define NSCMD_ENDLINE
Definition: editor.c:30
#define NSCMD_SELECTWORDPREVIOUS
Definition: editor.c:57
#define DOM_VK_LEFT
Definition: editor.c:70
#define NSCMD_BEGINLINE
Definition: editor.c:22
#define NSCMD_CHARPREVIOUS
Definition: editor.c:25
#define NSCMD_LINEPREVIOUS
Definition: editor.c:38
#define NSCMD_MOVEPAGEUP
Definition: editor.c:41
#define DOM_VK_HOME
Definition: editor.c:75
#define DOM_VK_DELETE
Definition: editor.c:74
#define NSCMD_SELECTBEGINLINE
Definition: editor.c:46
static void handle_arrow_key(HTMLDocument *This, nsIDOMKeyEvent *event, const char *const cmds[4])
Definition: editor.c:365
#define DOM_VK_END
Definition: editor.c:76
#define NSCMD_CHARNEXT
Definition: editor.c:24
#define DOM_VK_RIGHT
Definition: editor.c:72
#define NSCMD_DELETEWORDFORWARD
Definition: editor.c:29
#define NSCMD_SELECTENDLINE
Definition: editor.c:50
#define NSCMD_MOVEPAGEDOWN
Definition: editor.c:40
#define NSCMD_SELECTPAGEUP
Definition: editor.c:54
#define NSCMD_SELECTCHARPREVIOUS
Definition: editor.c:49
#define NSCMD_SELECTBOTTOM
Definition: editor.c:47
#define NSCMD_SELECTCHARNEXT
Definition: editor.c:48
#define NSCMD_SELECTPAGEDOWN
Definition: editor.c:53
#define NSCMD_SELECTWORDNEXT
Definition: editor.c:56
#define NSCMD_WORDPREVIOUS
Definition: editor.c:61
#define DOM_VK_UP
Definition: editor.c:71
#define NSCMD_SELECTTOP
Definition: editor.c:55
#define NSCMD_DELETECHARFORWARD
Definition: editor.c:28
#define NSCMD_SELECTLINEPREVIOUS
Definition: editor.c:52
#define NSCMD_MOVETOP
Definition: editor.c:42
#define NSCMD_SELECTLINENEXT
Definition: editor.c:51
#define NSCMD_WORDNEXT
Definition: editor.c:60
#define NSCMD_MOVEBOTTOM
Definition: editor.c:39
struct _cl_event * event
Definition: glext.h:7739
Definition: inflate.c:139
void key_event(int scancode, int pressed)
Definition: svgawin.c:773

Referenced by handle_keypress().

◆ handle_edit_load()

void handle_edit_load ( HTMLDocument This)

Definition at line 482 of file editor.c.

483{
484 get_editor_controller(This->doc_obj->nscontainer);
485}
void get_editor_controller(NSContainer *) DECLSPEC_HIDDEN
Definition: nsembed.c:1029

Referenced by handle_docobj_load().

◆ handle_link_click_event()

HRESULT handle_link_click_event ( HTMLElement element,
nsAString href_str,
nsAString target_str,
nsIDOMEvent event,
BOOL prevent_default 
)

Definition at line 123 of file htmlanchor.c.

125{
128 nsresult nsres;
130
131 TRACE("CLICK\n");
132
133 nsres = nsIDOMEvent_QueryInterface(event, &IID_nsIDOMMouseEvent, (void**)&mouse_event);
134 assert(nsres == NS_OK);
135
136 nsres = nsIDOMMouseEvent_GetButton(mouse_event, &button);
137 assert(nsres == NS_OK);
138
139 nsIDOMMouseEvent_Release(mouse_event);
140
141 switch(button) {
142 case 0:
143 *prevent_default = TRUE;
144 hres = navigate_href(element, href_str, target_str);
145 break;
146 case 1:
147 *prevent_default = TRUE;
149 break;
150 default:
151 *prevent_default = FALSE;
152 hres = S_OK;
153 }
154
155 nsAString_Finish(href_str);
156 nsAString_Finish(target_str);
157 return hres;
158}
signed short INT16
static HRESULT navigate_href(HTMLElement *element, nsAString *href_str, nsAString *target_str)
Definition: htmlanchor.c:94
static HRESULT navigate_href_new_window(HTMLElement *element, nsAString *href_str, const WCHAR *target)
Definition: htmlanchor.c:29
DWORD button
Definition: button.c:166
void WINAPI mouse_event(_In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ ULONG_PTR)

Referenced by HTMLAnchorElement_handle_event(), and HTMLAreaElement_handle_event().

◆ heap_free()

static BOOL heap_free ( void mem)
inlinestatic

Definition at line 1147 of file mshtml_private.h.

1148{
1149 return HeapFree(GetProcessHeap(), 0, mem);
1150}
#define HeapFree(x, y, z)
Definition: compat.h:735
Definition: mem.c:156

Referenced by windowref_release().

◆ heap_strdupA()

static char * heap_strdupA ( const char str)
inlinestatic

Definition at line 1184 of file mshtml_private.h.

1185{
1186 char *ret = NULL;
1187
1188 if(str) {
1189 DWORD size;
1190
1191 size = strlen(str)+1;
1192 ret = heap_alloc(size);
1193 if(ret)
1194 memcpy(ret, str, size);
1195 }
1196
1197 return ret;
1198}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLsizeiptr size
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by channelbsc_load_stream(), create_nsuri(), FindFirstUrlCacheEntryA(), nsChannel_SetContentCharset(), nsChannel_SetContentType(), and read_stream_data().

◆ heap_strdupAtoW()

static WCHAR * heap_strdupAtoW ( const char str)
inlinestatic

Definition at line 1200 of file mshtml_private.h.

1201{
1202 LPWSTR ret = NULL;
1203
1204 if(str) {
1205 DWORD len;
1206
1207 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
1208 ret = heap_alloc(len*sizeof(WCHAR));
1209 if(ret)
1211 }
1212
1213 return ret;
1214}
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
static void size_t len
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ heap_strdupUtoW()

static WCHAR * heap_strdupUtoW ( const char str)
inlinestatic

Definition at line 1230 of file mshtml_private.h.

1231{
1232 WCHAR *ret = NULL;
1233
1234 if(str) {
1235 size_t len;
1236
1237 len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
1238 ret = heap_alloc(len*sizeof(WCHAR));
1239 if(ret)
1241 }
1242
1243 return ret;
1244}

Referenced by is_gecko_path(), nsURI_Resolve(), nsURI_SetHost(), nsURI_SetPassword(), nsURI_SetPath(), nsURI_SetScheme(), nsURI_SetSpec(), nsURI_SetUsername(), nsURI_SetUserPass(), nsURL_SetQuery(), and nsURL_SetRef().

◆ heap_strdupW()

static LPWSTR heap_strdupW ( LPCWSTR  str)
inlinestatic

Definition at line 1152 of file mshtml_private.h.

1153{
1154 LPWSTR ret = NULL;
1155
1156 if(str) {
1157 DWORD size;
1158
1159 size = (strlenW(str)+1)*sizeof(WCHAR);
1160 ret = heap_alloc(size);
1161 if(ret)
1162 memcpy(ret, str, size);
1163 }
1164
1165 return ret;
1166}
#define strlenW(s)
Definition: unicode.h:28

◆ heap_strdupWtoA()

static char * heap_strdupWtoA ( LPCWSTR  str)
inlinestatic

Definition at line 1216 of file mshtml_private.h.

1217{
1218 char *ret = NULL;
1219
1220 if(str) {
1222 ret = heap_alloc(size);
1223 if(ret)
1225 }
1226
1227 return ret;
1228}
#define WideCharToMultiByte
Definition: compat.h:111

◆ heap_strdupWtoU()

static char * heap_strdupWtoU ( const WCHAR str)
inlinestatic

Definition at line 1246 of file mshtml_private.h.

1247{
1248 char *ret = NULL;
1249
1250 if(str) {
1251 size_t size = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL);
1252 ret = heap_alloc(size);
1253 if(ret)
1255 }
1256
1257 return ret;
1258}

Referenced by bstr_to_nsacstr(), get_uri_string(), HTMLXMLHttpRequest_getResponseHeader(), nsURI_GetHostPort(), nsURI_Resolve(), and nsURL_GetRef().

◆ heap_strndupW()

static LPWSTR heap_strndupW ( LPCWSTR  str,
unsigned  len 
)
inlinestatic

◆ heap_strndupWtoU()

static char * heap_strndupWtoU ( LPCWSTR  str,
unsigned  len 
)
inlinestatic

Definition at line 1260 of file mshtml_private.h.

1261{
1262 char *ret = NULL;
1263 DWORD size;
1264
1265 if(str && len) {
1267 ret = heap_alloc(size + 1);
1268 if(ret) {
1270 ret[size] = '\0';
1271 }
1272 }
1273
1274 return ret;
1275}

Referenced by process_response_status_text().

◆ hide_tooltip()

void hide_tooltip ( HTMLDocumentObj This)

Definition at line 386 of file view.c.

387{
388 TTTOOLINFOW toolinfo = {
389 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
390 {0,0,0,0}, NULL, NULL, 0};
391
392 TRACE("(%p)\n", This);
393
394 SendMessageW(This->tooltips_hwnd, TTM_DELTOOLW, 0, (LPARAM)&toolinfo);
395 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, FALSE, 0);
396}
#define TTM_ACTIVATE
Definition: commctrl.h:1784
#define TTM_DELTOOLW
Definition: commctrl.h:1789
struct tagTOOLINFOW TTTOOLINFOW
LONG_PTR LPARAM
Definition: windef.h:208
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by nsTooltipListener_OnHideTooltip().

◆ HTMLAnchorElement_Create()

HRESULT HTMLAnchorElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 798 of file htmlanchor.c.

799{
801 nsresult nsres;
802
803 ret = heap_alloc_zero(sizeof(HTMLAnchorElement));
804 if(!ret)
805 return E_OUTOFMEMORY;
806
807 ret->IHTMLAnchorElement_iface.lpVtbl = &HTMLAnchorElementVtbl;
808 ret->element.node.vtbl = &HTMLAnchorElementImplVtbl;
809
810 HTMLElement_Init(&ret->element, doc, nselem, &HTMLAnchorElement_dispex);
811
812 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAnchorElement, (void**)&ret->nsanchor);
813 assert(nsres == NS_OK);
814
815 *elem = &ret->element;
816 return S_OK;
817}
static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl
Definition: htmlanchor.c:632
static dispex_static_data_t HTMLAnchorElement_dispex
Definition: htmlanchor.c:791
static const NodeImplVtbl HTMLAnchorElementImplVtbl
Definition: htmlanchor.c:764
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmlelem.c:4008

◆ HTMLAreaElement_Create()

HRESULT HTMLAreaElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 443 of file htmlarea.c.

444{
446 nsresult nsres;
447
448 ret = heap_alloc_zero(sizeof(HTMLAreaElement));
449 if(!ret)
450 return E_OUTOFMEMORY;
451
452 ret->IHTMLAreaElement_iface.lpVtbl = &HTMLAreaElementVtbl;
453 ret->element.node.vtbl = &HTMLAreaElementImplVtbl;
454
455 HTMLElement_Init(&ret->element, doc, nselem, &HTMLAreaElement_dispex);
456
457 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAreaElement, (void**)&ret->nsarea);
458 assert(nsres == NS_OK);
459
460 *elem = &ret->element;
461 return S_OK;
462}
static dispex_static_data_t HTMLAreaElement_dispex
Definition: htmlarea.c:436
static const IHTMLAreaElementVtbl HTMLAreaElementVtbl
Definition: htmlarea.c:325
static const NodeImplVtbl HTMLAreaElementImplVtbl
Definition: htmlarea.c:422

◆ HTMLBodyElement_Create()

HRESULT HTMLBodyElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 869 of file htmlbody.c.

870{
872 nsresult nsres;
873
874 ret = heap_alloc_zero(sizeof(HTMLBodyElement));
875 if(!ret)
876 return E_OUTOFMEMORY;
877
878 ret->IHTMLBodyElement_iface.lpVtbl = &HTMLBodyElementVtbl;
879 ret->textcont.element.node.vtbl = &HTMLBodyElementImplVtbl;
880
881 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLBodyElement, (void**)&ret->nsbody);
882 if(NS_FAILED(nsres)) {
883 ERR("Could not get nsDOMHTMLBodyElement: %08x\n", nsres);
884 heap_free(ret);
885 return E_OUTOFMEMORY;
886 }
887
888 HTMLTextContainer_Init(&ret->textcont, doc, nselem, &HTMLBodyElement_dispex);
889
890 *elem = &ret->textcont.element;
891 return S_OK;
892}
static dispex_static_data_t HTMLBodyElement_dispex
Definition: htmlbody.c:862
static const IHTMLBodyElementVtbl HTMLBodyElementVtbl
Definition: htmlbody.c:714
static const NodeImplVtbl HTMLBodyElementImplVtbl
Definition: htmlbody.c:832
void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmltextcont.c:172

◆ HTMLButtonElement_Create()

HRESULT HTMLButtonElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 1843 of file htmlinput.c.

1844{
1846 nsresult nsres;
1847
1848 ret = heap_alloc_zero(sizeof(*ret));
1849 if(!ret)
1850 return E_OUTOFMEMORY;
1851
1852 ret->IHTMLButtonElement_iface.lpVtbl = &HTMLButtonElementVtbl;
1853 ret->element.node.vtbl = &HTMLButtonElementImplVtbl;
1854
1855 HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex);
1856
1857 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton);
1858 assert(nsres == NS_OK);
1859
1860 *elem = &ret->element;
1861 return S_OK;
1862}
static const NodeImplVtbl HTMLButtonElementImplVtbl
Definition: htmlinput.c:1809
static dispex_static_data_t HTMLButtonElement_dispex
Definition: htmlinput.c:1836
static const IHTMLButtonElementVtbl HTMLButtonElementVtbl
Definition: htmlinput.c:1726

◆ HTMLCommentElement_Create()

HRESULT HTMLCommentElement_Create ( HTMLDocumentNode doc,
nsIDOMNode nsnode,
HTMLElement **  elem 
)

Definition at line 179 of file htmlcomment.c.

180{
182
183 ret = heap_alloc_zero(sizeof(*ret));
184 if(!ret)
185 return E_OUTOFMEMORY;
186
187 ret->element.node.vtbl = &HTMLCommentElementImplVtbl;
188 ret->IHTMLCommentElement_iface.lpVtbl = &HTMLCommentElementVtbl;
189
191 HTMLDOMNode_Init(doc, &ret->element.node, nsnode);
192
193 *elem = &ret->element;
194 return S_OK;
195}
static const IHTMLCommentElementVtbl HTMLCommentElementVtbl
Definition: htmlcomment.c:115
static dispex_static_data_t HTMLCommentElement_dispex
Definition: htmlcomment.c:172
static const NodeImplVtbl HTMLCommentElementImplVtbl
Definition: htmlcomment.c:158

Referenced by create_node(), and HTMLDocument5_createComment().

◆ HTMLCurrentStyle_Create()

HRESULT HTMLCurrentStyle_Create ( HTMLElement elem,
IHTMLCurrentStyle **  p 
)

Definition at line 1307 of file htmlcurstyle.c.

1308{
1310 nsIDOMWindow *nsview;
1311 nsAString nsempty_str;
1313 nsresult nsres;
1314
1315 if(!elem->node.doc->nsdoc) {
1316 WARN("NULL nsdoc\n");
1317 return E_UNEXPECTED;
1318 }
1319
1320 nsres = nsIDOMHTMLDocument_GetDefaultView(elem->node.doc->nsdoc, &nsview);
1321 if(NS_FAILED(nsres)) {
1322 ERR("GetDefaultView failed: %08x\n", nsres);
1323 return E_FAIL;
1324 }
1325
1326 nsAString_Init(&nsempty_str, NULL);
1327 nsres = nsIDOMWindow_GetComputedStyle(nsview, (nsIDOMElement*)elem->nselem, &nsempty_str, &nsstyle);
1328 nsAString_Finish(&nsempty_str);
1329 nsIDOMWindow_Release(nsview);
1330 if(NS_FAILED(nsres)) {
1331 ERR("GetComputedStyle failed: %08x\n", nsres);
1332 return E_FAIL;
1333 }
1334
1335 if(!nsstyle) {
1336 ERR("GetComputedStyle returned NULL nsstyle\n");
1337 return E_FAIL;
1338 }
1339
1340 ret = heap_alloc_zero(sizeof(HTMLCurrentStyle));
1341 if(!ret) {
1342 nsIDOMCSSStyleDeclaration_Release(nsstyle);
1343 return E_OUTOFMEMORY;
1344 }
1345
1346 ret->IHTMLCurrentStyle_iface.lpVtbl = &HTMLCurrentStyleVtbl;
1347 ret->IHTMLCurrentStyle2_iface.lpVtbl = &HTMLCurrentStyle2Vtbl;
1348 ret->IHTMLCurrentStyle3_iface.lpVtbl = &HTMLCurrentStyle3Vtbl;
1349 ret->IHTMLCurrentStyle4_iface.lpVtbl = &HTMLCurrentStyle4Vtbl;
1350 ret->ref = 1;
1351 ret->nsstyle = nsstyle;
1352
1353 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLCurrentStyle_iface, &HTMLCurrentStyle_dispex);
1354
1355 IHTMLElement_AddRef(&elem->IHTMLElement_iface);
1356 ret->elem = elem;
1357
1358 *p = &ret->IHTMLCurrentStyle_iface;
1359 return S_OK;
1360}
static const IHTMLCurrentStyle4Vtbl HTMLCurrentStyle4Vtbl
static const IHTMLCurrentStyle3Vtbl HTMLCurrentStyle3Vtbl
static const IHTMLCurrentStyleVtbl HTMLCurrentStyleVtbl
Definition: htmlcurstyle.c:786
static const IHTMLCurrentStyle2Vtbl HTMLCurrentStyle2Vtbl
static dispex_static_data_t HTMLCurrentStyle_dispex

Referenced by HTMLElement2_get_currentStyle().

◆ htmldoc_addref()

◆ htmldoc_query_interface()

◆ htmldoc_release()

◆ HTMLDocument_Create()

HRESULT HTMLDocument_Create ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppvObject 
)

Definition at line 4821 of file htmldoc.c.

4822{
4823 HTMLDocumentObj *doc;
4824 nsIDOMWindow *nswindow = NULL;
4825 nsresult nsres;
4826 HRESULT hres;
4827
4828 TRACE("(%p %s %p)\n", pUnkOuter, debugstr_mshtml_guid(riid), ppvObject);
4829
4830 doc = heap_alloc_zero(sizeof(HTMLDocumentObj));
4831 if(!doc)
4832 return E_OUTOFMEMORY;
4833
4837
4838 doc->ICustomDoc_iface.lpVtbl = &CustomDocVtbl;
4839 doc->ref = 1;
4840 doc->basedoc.doc_obj = doc;
4841
4843
4844 init_binding_ui(doc);
4845
4846 hres = create_nscontainer(doc, &doc->nscontainer);
4847 if(FAILED(hres)) {
4848 ERR("Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE\n");
4849 htmldoc_release(&doc->basedoc);
4850 return hres;
4851 }
4852
4854 htmldoc_release(&doc->basedoc);
4855 if(FAILED(hres))
4856 return hres;
4857
4858 nsres = nsIWebBrowser_GetContentDOMWindow(doc->nscontainer->webbrowser, &nswindow);
4859 if(NS_FAILED(nsres))
4860 ERR("GetContentDOMWindow failed: %08x\n", nsres);
4861
4862 hres = HTMLOuterWindow_Create(doc, nswindow, NULL /* FIXME */, &doc->basedoc.window);
4863 if(nswindow)
4864 nsIDOMWindow_Release(nswindow);
4865 if(FAILED(hres)) {
4866 htmldoc_release(&doc->basedoc);
4867 return hres;
4868 }
4869
4870 if(!doc->basedoc.doc_node && doc->basedoc.window->base.inner_window->doc) {
4873 }
4874
4876
4877 return S_OK;
4878}
static void init_doc(HTMLDocument *doc, IUnknown *unk_impl, IDispatchEx *dispex)
Definition: htmldoc.c:4356
static const ICustomDocVtbl CustomDocVtbl
Definition: htmldoc.c:4800
static dispex_static_data_t HTMLDocumentObj_dispex
Definition: htmldoc.c:4814
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, HTMLOuterWindow *parent, HTMLOuterWindow **ret)
Definition: htmlwindow.c:2945
void TargetContainer_Init(HTMLDocumentObj *) DECLSPEC_HIDDEN
Definition: oleobj.c:1121
HWND get_thread_hwnd(void) DECLSPEC_HIDDEN
Definition: task.c:338
void init_binding_ui(HTMLDocumentObj *) DECLSPEC_HIDDEN
Definition: view.c:935
static HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
HRESULT create_nscontainer(HTMLDocumentObj *, NSContainer **) DECLSPEC_HIDDEN
Definition: nsembed.c:2076
static ULONG htmldoc_addref(HTMLDocument *This)
static ULONG htmldoc_release(HTMLDocument *This)
IDispatchEx IDispatchEx_iface
NSContainer * nscontainer
DispatchEx dispex
ICustomDoc ICustomDoc_iface
HTMLDocumentNode * doc_node
HTMLDocumentObj * doc_obj
HTMLDocumentNode * doc
HTMLInnerWindow * inner_window
nsIWebBrowser * webbrowser
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082

Referenced by DllGetClassObject().

◆ HTMLDocument_Hlink_Init()

void HTMLDocument_Hlink_Init ( HTMLDocument This)

Definition at line 106 of file hlink.c.

107{
108 This->IHlinkTarget_iface.lpVtbl = &HlinkTargetVtbl;
109}

Referenced by init_doc().

◆ HTMLDocument_LockContainer()

void HTMLDocument_LockContainer ( HTMLDocumentObj This,
BOOL  fLock 
)

Definition at line 1183 of file oleobj.c.

1184{
1186 HRESULT hres;
1187
1188 if(!This->client || This->container_locked == fLock)
1189 return;
1190
1191 hres = IOleClientSite_GetContainer(This->client, &container);
1192 if(SUCCEEDED(hres)) {
1193 IOleContainer_LockContainer(container, fLock);
1194 This->container_locked = fLock;
1195 IOleContainer_Release(container);
1196 }
1197}

Referenced by OleDocumentView_UIActivate(), OleObject_Close(), OleObject_DoVerb(), and set_moniker().

◆ HTMLDocument_OleCmd_Init()

void HTMLDocument_OleCmd_Init ( HTMLDocument This)

Definition at line 957 of file olecmd.c.

958{
959 This->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl;
960}
static const IOleCommandTargetVtbl OleCommandTargetVtbl
Definition: olecmd.c:928

Referenced by init_doc().

◆ HTMLDocument_OleObj_Init()

void HTMLDocument_OleObj_Init ( HTMLDocument This)

Definition at line 1199 of file oleobj.c.

1200{
1201 This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
1202 This->IOleDocument_iface.lpVtbl = &OleDocumentVtbl;
1203 This->IOleControl_iface.lpVtbl = &OleControlVtbl;
1204 This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
1205 This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
1206 This->IObjectSafety_iface.lpVtbl = &ObjectSafetyVtbl;
1207}
static const IObjectWithSiteVtbl ObjectWithSiteVtbl
Definition: oleobj.c:994
static const IOleContainerVtbl OleContainerVtbl
Definition: oleobj.c:1062
static const IObjectSafetyVtbl ObjectSafetyVtbl
Definition: oleobj.c:1175
static const IOleDocumentVtbl OleDocumentVtbl
Definition: oleobj.c:761
static const IOleObjectVtbl OleObjectVtbl
Definition: oleobj.c:660
static const IOleControlVtbl OleControlVtbl
Definition: oleobj.c:943

Referenced by init_doc().

◆ HTMLDocument_Persist_Init()

void HTMLDocument_Persist_Init ( HTMLDocument This)

Definition at line 1089 of file persist.c.

1090{
1091 This->IPersistMoniker_iface.lpVtbl = &PersistMonikerVtbl;
1092 This->IPersistFile_iface.lpVtbl = &PersistFileVtbl;
1093 This->IMonikerProp_iface.lpVtbl = &MonikerPropVtbl;
1094 This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
1095 This->IPersistHistory_iface.lpVtbl = &PersistHistoryVtbl;
1096}
static const IPersistStreamInitVtbl PersistStreamInitVtbl
Definition: persist.c:266
static const IPersistFileVtbl PersistFileVtbl
Definition: persist.c:800
static const IPersistMonikerVtbl PersistMonikerVtbl
Definition: persist.c:636
static const IMonikerPropVtbl MonikerPropVtbl
Definition: persist.c:698
static const IPersistHistoryVtbl PersistHistoryVtbl
Definition: persist.c:1078

Referenced by init_doc().

◆ HTMLDocument_Service_Init()

void HTMLDocument_Service_Init ( HTMLDocument This)

Definition at line 409 of file service.c.

410{
411 This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
412}
static const IServiceProviderVtbl ServiceProviderVtbl
Definition: service.c:402

Referenced by init_doc().

◆ HTMLDocument_View_Init()

void HTMLDocument_View_Init ( HTMLDocument This)

Definition at line 875 of file view.c.

876{
877 This->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl;
878 This->IViewObjectEx_iface.lpVtbl = &ViewObjectVtbl;
879}
static const IViewObject2Vtbl ViewObjectVtbl
Definition: view.c:135
static const IOleDocumentViewVtbl OleDocumentViewVtbl
Definition: view.c:705

Referenced by init_doc().

◆ HTMLDocument_Window_Init()

void HTMLDocument_Window_Init ( HTMLDocument This)

Definition at line 265 of file olewnd.c.

266{
267 This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl;
268 This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl;
269}
static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl
Definition: olewnd.c:115
static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl
Definition: olewnd.c:251

Referenced by init_doc().

◆ HTMLDocumentNode_SecMgr_Init()

void HTMLDocumentNode_SecMgr_Init ( HTMLDocumentNode This)

Definition at line 230 of file secmgr.c.

231{
232 This->IInternetHostSecurityManager_iface.lpVtbl = &InternetHostSecurityManagerVtbl;
233}
static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl
Definition: secmgr.c:221

Referenced by alloc_doc_node().

◆ HTMLDOMAttribute_Create()

HRESULT HTMLDOMAttribute_Create ( const WCHAR name,
HTMLElement elem,
DISPID  dispid,
HTMLDOMAttribute **  attr 
)

Definition at line 473 of file htmlattr.c.

474{
478
479 ret = heap_alloc_zero(sizeof(*ret));
480 if(!ret)
481 return E_OUTOFMEMORY;
482
483 ret->IHTMLDOMAttribute_iface.lpVtbl = &HTMLDOMAttributeVtbl;
484 ret->IHTMLDOMAttribute2_iface.lpVtbl = &HTMLDOMAttribute2Vtbl;
485 ret->ref = 1;
486 ret->dispid = dispid;
487 ret->elem = elem;
488
489 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLDOMAttribute_iface,
491
492 /* For attributes attached to an element, (elem,dispid) pair should be valid used for its operation. */
493 if(elem) {
494 hres = HTMLElement_get_attr_col(&elem->node, &col);
495 if(FAILED(hres)) {
496 IHTMLDOMAttribute_Release(&ret->IHTMLDOMAttribute_iface);
497 return hres;
498 }
499 IHTMLAttributeCollection_Release(&col->IHTMLAttributeCollection_iface);
500
501 list_add_tail(&elem->attrs->attrs, &ret->entry);
502 }
503
504 /* For detached attributes we may still do most operations if we have its name available. */
505 if(name) {
506 ret->name = heap_strdupW(name);
507 if(!ret->name) {
508 IHTMLDOMAttribute_Release(&ret->IHTMLDOMAttribute_iface);
509 return E_OUTOFMEMORY;
510 }
511 }
512
513 *attr = ret;
514 return S_OK;
515}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static dispex_static_data_t HTMLDOMAttribute_dispex
Definition: htmlattr.c:466
static const IHTMLDOMAttribute2Vtbl HTMLDOMAttribute2Vtbl
Definition: htmlattr.c:432
static const IHTMLDOMAttributeVtbl HTMLDOMAttributeVtbl
Definition: htmlattr.c:207
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
Definition: htmlelem.c:4827
IHTMLAttributeCollection IHTMLAttributeCollection_iface

Referenced by get_domattr(), and HTMLDocument5_createAttribute().

◆ HTMLDOMNode_destructor()

void HTMLDOMNode_destructor ( HTMLDOMNode This)

Definition at line 1172 of file htmlnode.c.

1173{
1174 if(This->nsnode)
1175 nsIDOMNode_Release(This->nsnode);
1176 if(This->doc && &This->doc->node != This)
1177 htmldoc_release(&This->doc->basedoc);
1178 if(This->event_target.ptr)
1179 release_event_target(This->event_target.ptr);
1180}
void release_event_target(event_target_t *event_target)
Definition: htmlevent.c:1613

Referenced by HTMLElement_destructor().

◆ HTMLDOMNode_Init()

void HTMLDOMNode_Init ( HTMLDocumentNode doc,
HTMLDOMNode node,
nsIDOMNode nsnode 
)

Definition at line 1196 of file htmlnode.c.

1197{
1198 nsresult nsres;
1199
1200 node->IHTMLDOMNode_iface.lpVtbl = &HTMLDOMNodeVtbl;
1201 node->IHTMLDOMNode2_iface.lpVtbl = &HTMLDOMNode2Vtbl;
1202
1203 ccref_init(&node->ccref, 1);
1204
1205 if(&doc->node != node)
1206 htmldoc_addref(&doc->basedoc);
1207 node->doc = doc;
1208
1209 nsIDOMNode_AddRef(nsnode);
1210 node->nsnode = nsnode;
1211
1212 nsres = nsIDOMNode_SetMshtmlNode(nsnode, (nsISupports*)&node->IHTMLDOMNode_iface);
1213 assert(nsres == NS_OK);
1214}
static const IHTMLDOMNode2Vtbl HTMLDOMNode2Vtbl
Definition: htmlnode.c:1131
static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl
Definition: htmlnode.c:1015

Referenced by create_doc_from_nsdoc(), create_document_fragment(), create_node(), HTMLCommentElement_Create(), HTMLDOMTextNode_Create(), and HTMLElement_Init().

◆ HTMLDOMNode_QI()

HRESULT HTMLDOMNode_QI ( HTMLDOMNode This,
REFIID  riid,
void **  ppv 
)

Definition at line 1142 of file htmlnode.c.

1143{
1144 TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
1145
1147 *ppv = &This->IHTMLDOMNode_iface;
1148 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1149 *ppv = &This->IHTMLDOMNode_iface;
1150 }else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
1151 *ppv = &This->IHTMLDOMNode_iface;
1152 }else if(IsEqualGUID(&IID_IHTMLDOMNode2, riid)) {
1153 *ppv = &This->IHTMLDOMNode2_iface;
1154 }else if(IsEqualGUID(&IID_nsXPCOMCycleCollectionParticipant, riid)) {
1155 *ppv = &node_ccp;
1156 return NS_OK;
1157 }else if(IsEqualGUID(&IID_nsCycleCollectionISupports, riid)) {
1158 *ppv = &This->IHTMLDOMNode_iface;
1159 return NS_OK;
1160 }else if(dispex_query_interface(&This->event_target.dispex, riid, ppv)) {
1161 return *ppv ? S_OK : E_NOINTERFACE;
1162 }else {
1163 *ppv = NULL;
1164 WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
1165 return E_NOINTERFACE;
1166 }
1167
1168 IUnknown_AddRef((IUnknown*)*ppv);
1169 return S_OK;
1170}
static ExternalCycleCollectionParticipant node_ccp
Definition: htmlnode.c:24
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by HTMLDocumentNode_QI(), HTMLDOMTextNode_QI(), and HTMLElement_QI().

◆ HTMLDOMTextNode_Create()

HRESULT HTMLDOMTextNode_Create ( HTMLDocumentNode doc,
nsIDOMNode nsnode,
HTMLDOMNode **  node 
)

Definition at line 352 of file htmltextnode.c.

353{
355 nsresult nsres;
356
357 ret = heap_alloc_zero(sizeof(*ret));
358 if(!ret)
359 return E_OUTOFMEMORY;
360
361 ret->node.vtbl = &HTMLDOMTextNodeImplVtbl;
362 ret->IHTMLDOMTextNode_iface.lpVtbl = &HTMLDOMTextNodeVtbl;
363 ret->IHTMLDOMTextNode2_iface.lpVtbl = &HTMLDOMTextNode2Vtbl;
364
365 init_dispex(&ret->node.event_target.dispex, (IUnknown*)&ret->IHTMLDOMTextNode_iface,
367
368 HTMLDOMNode_Init(doc, &ret->node, nsnode);
369
370 nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMText, (void**)&ret->nstext);
371 assert(nsres == NS_OK && (nsIDOMNode*)ret->nstext == ret->node.nsnode);
372
373 /* Share reference with nsnode */
374 nsIDOMNode_Release(ret->node.nsnode);
375
376 *node = &ret->node;
377 return S_OK;
378}
static const IHTMLDOMTextNode2Vtbl HTMLDOMTextNode2Vtbl
Definition: htmltextnode.c:285
static dispex_static_data_t HTMLDOMTextNode_dispex
Definition: htmltextnode.c:345
static const IHTMLDOMTextNodeVtbl HTMLDOMTextNodeVtbl
Definition: htmltextnode.c:167
static const NodeImplVtbl HTMLDOMTextNodeImplVtbl
Definition: htmltextnode.c:331

Referenced by create_node(), HTMLDocument3_createTextNode(), and HTMLDOMTextNode_clone().

◆ HTMLElement_clone()

HRESULT HTMLElement_clone ( HTMLDOMNode iface,
nsIDOMNode nsnode,
HTMLDOMNode **  ret 
)

Definition at line 3793 of file htmlelem.c.

3794{
3796 HTMLElement *new_elem;
3797 HRESULT hres;
3798
3799 hres = HTMLElement_Create(This->node.doc, nsnode, FALSE, &new_elem);
3800 if(FAILED(hres))
3801 return hres;
3802
3803 if(This->filter) {
3804 new_elem->filter = heap_strdupW(This->filter);
3805 if(!new_elem->filter) {
3806 IHTMLElement_Release(&This->IHTMLElement_iface);
3807 return E_OUTOFMEMORY;
3808 }
3809 }
3810
3811 *ret = &new_elem->node;
3812 return S_OK;
3813}
HTMLDOMNode node
WCHAR * filter

◆ HTMLElement_Create()

HRESULT HTMLElement_Create ( HTMLDocumentNode doc,
nsIDOMNode nsnode,
BOOL  use_generic,
HTMLElement **  ret 
)

Definition at line 4032 of file htmlelem.c.

4033{
4034 nsIDOMHTMLElement *nselem;
4035 nsAString class_name_str;
4036 const PRUnichar *class_name;
4037 const tag_desc_t *tag;
4039 nsresult nsres;
4040 HRESULT hres;
4041
4042 nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMHTMLElement, (void**)&nselem);
4043 if(NS_FAILED(nsres))
4044 return E_FAIL;
4045
4046 nsAString_Init(&class_name_str, NULL);
4047 nsIDOMHTMLElement_GetTagName(nselem, &class_name_str);
4048
4049 nsAString_GetData(&class_name_str, &class_name);
4050
4051 tag = get_tag_desc(class_name);
4052 if(tag) {
4053 hres = tag->constructor(doc, nselem, &elem);
4054 }else if(use_generic) {
4055 hres = HTMLGenericElement_Create(doc, nselem, &elem);
4056 }else {
4057 elem = heap_alloc_zero(sizeof(HTMLElement));
4058 if(elem) {
4059 elem->node.vtbl = &HTMLElementImplVtbl;
4061 hres = S_OK;
4062 }else {
4064 }
4065 }
4066
4067 TRACE("%s ret %p\n", debugstr_w(class_name), elem);
4068
4069 nsIDOMHTMLElement_Release(nselem);
4070 nsAString_Finish(&class_name_str);
4071 if(FAILED(hres))
4072 return hres;
4073
4074 *ret = elem;
4075 return S_OK;
4076}
static const tag_desc_t * get_tag_desc(const WCHAR *tag_name)
Definition: htmlelem.c:78
static dispex_static_data_t HTMLElement_dispex
Definition: htmlelem.c:4001
static const NodeImplVtbl HTMLElementImplVtbl
Definition: htmlelem.c:3852
HRESULT HTMLGenericElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
Definition: htmlgeneric.c:162

Referenced by create_element(), create_node(), HTMLElement_clone(), and HTMLImageElementFactory_create().

◆ HTMLElement_destructor()

void HTMLElement_destructor ( HTMLDOMNode iface)

Definition at line 3764 of file htmlelem.c.

3765{
3767
3768 ConnectionPointContainer_Destroy(&This->cp_container);
3769
3770 if(This->style) {
3771 This->style->elem = NULL;
3772 IHTMLStyle_Release(&This->style->IHTMLStyle_iface);
3773 }
3774 if(This->runtime_style) {
3775 This->runtime_style->elem = NULL;
3776 IHTMLStyle_Release(&This->runtime_style->IHTMLStyle_iface);
3777 }
3778 if(This->attrs) {
3780
3782 attr->elem = NULL;
3783
3784 This->attrs->elem = NULL;
3785 IHTMLAttributeCollection_Release(&This->attrs->IHTMLAttributeCollection_iface);
3786 }
3787
3788 heap_free(This->filter);
3789
3791}
void ConnectionPointContainer_Destroy(ConnectionPointContainer *This)
Definition: events.c:442
void HTMLDOMNode_destructor(HTMLDOMNode *This)
Definition: htmlnode.c:1172

Referenced by HTMLCommentElement_destructor(), HTMLEmbedElement_destructor(), HTMLFrameBase_destructor(), HTMLGenericElement_destructor(), HTMLHeadElement_destructor(), HTMLMetaElement_destructor(), HTMLObjectElement_destructor(), HTMLStyleElement_destructor(), HTMLTableCell_destructor(), and HTMLTitleElement_destructor().

◆ HTMLElement_get_attr_col()

HRESULT HTMLElement_get_attr_col ( HTMLDOMNode iface,
HTMLAttributeCollection **  ac 
)

Definition at line 4827 of file htmlelem.c.

4828{
4830
4831 if(This->attrs) {
4832 IHTMLAttributeCollection_AddRef(&This->attrs->IHTMLAttributeCollection_iface);
4833 *ac = This->attrs;
4834 return S_OK;
4835 }
4836
4837 This->attrs = heap_alloc_zero(sizeof(HTMLAttributeCollection));
4838 if(!This->attrs)
4839 return E_OUTOFMEMORY;
4840
4841 This->attrs->IHTMLAttributeCollection_iface.lpVtbl = &HTMLAttributeCollectionVtbl;
4842 This->attrs->IHTMLAttributeCollection2_iface.lpVtbl = &HTMLAttributeCollection2Vtbl;
4843 This->attrs->IHTMLAttributeCollection3_iface.lpVtbl = &HTMLAttributeCollection3Vtbl;
4844 This->attrs->ref = 2;
4845
4846 This->attrs->elem = This;
4847 list_init(&This->attrs->attrs);
4848 init_dispex(&This->attrs->dispex, (IUnknown*)&This->attrs->IHTMLAttributeCollection_iface,
4850
4851 *ac = This->attrs;
4852 return S_OK;
4853}
static const IHTMLAttributeCollection2Vtbl HTMLAttributeCollection2Vtbl
Definition: htmlelem.c:4612
static dispex_static_data_t HTMLAttributeCollection_dispex
Definition: htmlelem.c:4820
static const IHTMLAttributeCollectionVtbl HTMLAttributeCollectionVtbl
Definition: htmlelem.c:4504
static const IHTMLAttributeCollection3Vtbl HTMLAttributeCollection3Vtbl
Definition: htmlelem.c:4730

Referenced by HTMLDOMAttribute_Create(), and HTMLElement4_getAttributeNode().

◆ HTMLElement_handle_event()

HRESULT HTMLElement_handle_event ( HTMLDOMNode iface,
DWORD  eid,
nsIDOMEvent event,
BOOL prevent_default 
)

Definition at line 3815 of file htmlelem.c.

3816{
3818
3819 switch(eid) {
3820 case EVENTID_KEYDOWN: {
3822 nsresult nsres;
3823
3824 nsres = nsIDOMEvent_QueryInterface(event, &IID_nsIDOMKeyEvent, (void**)&key_event);
3825 if(NS_SUCCEEDED(nsres)) {
3826 UINT32 code = 0;
3827
3828 nsIDOMKeyEvent_GetKeyCode(key_event, &code);
3829
3830 switch(code) {
3831 case VK_F1: /* DOM_VK_F1 */
3832 TRACE("F1 pressed\n");
3833 fire_event(This->node.doc, EVENTID_HELP, TRUE, This->node.nsnode, NULL, NULL);
3834 *prevent_default = TRUE;
3835 }
3836
3837 nsIDOMKeyEvent_Release(key_event);
3838 }
3839 }
3840 }
3841
3842 return S_OK;
3843}
void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode *target, nsIDOMEvent *nsevent, IDispatch *script_this)
Definition: htmlevent.c:1195
@ EVENTID_HELP
Definition: htmlevent.h:35
@ EVENTID_KEYDOWN
Definition: htmlevent.h:36
#define VK_F1
Definition: winuser.h:2255

Referenced by HTMLAnchorElement_handle_event(), HTMLAreaElement_handle_event(), and HTMLFormElement_handle_event().

◆ HTMLElement_Init()

void HTMLElement_Init ( HTMLElement This,
HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
dispex_static_data_t dispex_data 
)

Definition at line 4008 of file htmlelem.c.

4009{
4010 This->IHTMLElement_iface.lpVtbl = &HTMLElementVtbl;
4011 This->IHTMLElement2_iface.lpVtbl = &HTMLElement2Vtbl;
4012 This->IHTMLElement3_iface.lpVtbl = &HTMLElement3Vtbl;
4013 This->IHTMLElement4_iface.lpVtbl = &HTMLElement4Vtbl;
4014
4015 if(dispex_data && !dispex_data->vtbl)
4016 dispex_data->vtbl = &HTMLElement_dispex_vtbl;
4017 init_dispex(&This->node.event_target.dispex, (IUnknown*)&This->IHTMLElement_iface,
4018 dispex_data ? dispex_data : &HTMLElement_dispex);
4019
4020 if(nselem) {
4021 HTMLDOMNode_Init(doc, &This->node, (nsIDOMNode*)nselem);
4022
4023 /* No AddRef, share reference with HTMLDOMNode */
4024 assert((nsIDOMNode*)nselem == This->node.nsnode);
4025 This->nselem = nselem;
4026 }
4027
4028 This->node.cp_container = &This->cp_container;
4029 ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface, This->node.vtbl->cpc_entries);
4030}
void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl)
Definition: events.c:431
static dispex_static_data_vtbl_t HTMLElement_dispex_vtbl
Definition: htmlelem.c:3992
static const IHTMLElement2Vtbl HTMLElement2Vtbl
Definition: htmlelem.c:2977
static const IHTMLElement3Vtbl HTMLElement3Vtbl
Definition: htmlelem.c:3501
static const IHTMLElementVtbl HTMLElementVtbl
Definition: htmlelem.c:1865
static const IHTMLElement4Vtbl HTMLElement4Vtbl
Definition: htmlelem.c:3711
const dispex_static_data_vtbl_t * vtbl

Referenced by HTMLAnchorElement_Create(), HTMLAreaElement_Create(), HTMLButtonElement_Create(), HTMLCommentElement_Create(), HTMLElement_Create(), HTMLEmbedElement_Create(), HTMLFormElement_Create(), HTMLFrameBase_Init(), HTMLGenericElement_Create(), HTMLHeadElement_Create(), HTMLImgElement_Create(), HTMLInputElement_Create(), HTMLLabelElement_Create(), HTMLLinkElement_Create(), HTMLMetaElement_Create(), HTMLObjectElement_Create(), HTMLOptionElement_Create(), HTMLScriptElement_Create(), HTMLSelectElement_Create(), HTMLStyleElement_Create(), HTMLTable_Create(), HTMLTableCell_Create(), HTMLTableRow_Create(), HTMLTextAreaElement_Create(), HTMLTextContainer_Init(), and HTMLTitleElement_Create().

◆ HTMLElement_QI()

HRESULT HTMLElement_QI ( HTMLDOMNode iface,
REFIID  riid,
void **  ppv 
)

Definition at line 3738 of file htmlelem.c.

3739{
3741
3743 *ppv = &This->IHTMLElement_iface;
3744 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
3745 *ppv = &This->IHTMLElement_iface;
3746 }else if(IsEqualGUID(&IID_IHTMLElement, riid)) {
3747 *ppv = &This->IHTMLElement_iface;
3748 }else if(IsEqualGUID(&IID_IHTMLElement2, riid)) {
3749 *ppv = &This->IHTMLElement2_iface;
3750 }else if(IsEqualGUID(&IID_IHTMLElement3, riid)) {
3751 *ppv = &This->IHTMLElement3_iface;
3752 }else if(IsEqualGUID(&IID_IHTMLElement4, riid)) {
3753 *ppv = &This->IHTMLElement4_iface;
3755 *ppv = &This->cp_container.IConnectionPointContainer_iface;
3756 }else {
3757 return HTMLDOMNode_QI(&This->node, riid, ppv);
3758 }
3759
3760 IUnknown_AddRef((IUnknown*)*ppv);
3761 return S_OK;
3762}
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
Definition: htmlnode.c:1142

Referenced by HTMLAnchorElement_QI(), HTMLAreaElement_QI(), HTMLBodyElement_QI(), HTMLButtonElement_QI(), HTMLCommentElement_QI(), HTMLEmbedElement_QI(), HTMLFormElement_QI(), HTMLFrameBase_QI(), HTMLGenericElement_QI(), HTMLHeadElement_QI(), HTMLImgElement_QI(), HTMLInputElement_QI(), HTMLLabelElement_QI(), HTMLLinkElement_QI(), HTMLMetaElement_QI(), HTMLObjectElement_QI(), HTMLOptionElement_QI(), HTMLScriptElement_QI(), HTMLSelectElement_QI(), HTMLStyleElement_QI(), HTMLTable_QI(), HTMLTableCell_QI(), HTMLTableRow_QI(), HTMLTextAreaElement_QI(), and HTMLTitleElement_QI().

◆ HTMLEmbedElement_Create()

HRESULT HTMLEmbedElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 260 of file htmlembed.c.

261{
263
264 ret = heap_alloc_zero(sizeof(*ret));
265 if(!ret)
266 return E_OUTOFMEMORY;
267
268 ret->IHTMLEmbedElement_iface.lpVtbl = &HTMLEmbedElementVtbl;
269 ret->element.node.vtbl = &HTMLEmbedElementImplVtbl;
270
271 HTMLElement_Init(&ret->element, doc, nselem, &HTMLEmbedElement_dispex);
272 *elem = &ret->element;
273 return S_OK;
274}
static dispex_static_data_t HTMLEmbedElement_dispex
Definition: htmlembed.c:253
static const NodeImplVtbl HTMLEmbedElementImplVtbl
Definition: htmlembed.c:239
static const IHTMLEmbedElementVtbl HTMLEmbedElementVtbl
Definition: htmlembed.c:183

◆ HTMLFormElement_Create()

HRESULT HTMLFormElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 785 of file htmlform.c.

786{
788 nsresult nsres;
789
790 ret = heap_alloc_zero(sizeof(HTMLFormElement));
791 if(!ret)
792 return E_OUTOFMEMORY;
793
794 ret->IHTMLFormElement_iface.lpVtbl = &HTMLFormElementVtbl;
795 ret->element.node.vtbl = &HTMLFormElementImplVtbl;
796
797 HTMLElement_Init(&ret->element, doc, nselem, &HTMLFormElement_dispex);
798
799 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFormElement, (void**)&ret->nsform);
800 assert(nsres == NS_OK);
801
802 *elem = &ret->element;
803 return S_OK;
804}
static const NodeImplVtbl HTMLFormElementImplVtbl
Definition: htmlform.c:752
static const IHTMLFormElementVtbl HTMLFormElementVtbl
Definition: htmlform.c:531
static dispex_static_data_t HTMLFormElement_dispex
Definition: htmlform.c:778

◆ HTMLFrameBase_destructor()

void HTMLFrameBase_destructor ( HTMLFrameBase This)

Definition at line 704 of file htmlframebase.c.

705{
706 if(This->content_window)
707 This->content_window->frame_element = NULL;
708
709 HTMLElement_destructor(&This->element.node);
710}
void HTMLElement_destructor(HTMLDOMNode *iface)
Definition: htmlelem.c:3764

Referenced by HTMLFrameElement_destructor(), and HTMLIFrame_destructor().

◆ HTMLFrameBase_Init()

void HTMLFrameBase_Init ( HTMLFrameBase This,
HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
dispex_static_data_t dispex_data 
)

Definition at line 712 of file htmlframebase.c.

714{
715 nsresult nsres;
716
717 This->IHTMLFrameBase_iface.lpVtbl = &HTMLFrameBaseVtbl;
718 This->IHTMLFrameBase2_iface.lpVtbl = &HTMLFrameBase2Vtbl;
719
720 HTMLElement_Init(&This->element, doc, nselem, dispex_data);
721
722 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFrameElement, (void**)&This->nsframe);
723 if(NS_FAILED(nsres)) {
724 This->nsframe = NULL;
725 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&This->nsiframe);
726 assert(nsres == NS_OK);
727 }else {
728 This->nsiframe = NULL;
729 }
730}
static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl
static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl

Referenced by HTMLFrameElement_Create(), and HTMLIFrame_Create().

◆ HTMLFrameBase_QI()

HRESULT HTMLFrameBase_QI ( HTMLFrameBase This,
REFIID  riid,
void **  ppv 
)

Definition at line 688 of file htmlframebase.c.

689{
690 if(IsEqualGUID(&IID_IHTMLFrameBase, riid)) {
691 TRACE("(%p)->(IID_IHTMLFrameBase %p)\n", This, ppv);
692 *ppv = &This->IHTMLFrameBase_iface;
693 }else if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
694 TRACE("(%p)->(IID_IHTMLFrameBase2 %p)\n", This, ppv);
695 *ppv = &This->IHTMLFrameBase2_iface;
696 }else {
697 return HTMLElement_QI(&This->element.node, riid, ppv);
698 }
699
700 IUnknown_AddRef((IUnknown*)*ppv);
701 return S_OK;
702}
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlelem.c:3738

Referenced by HTMLFrameElement_QI(), and HTMLIFrame_QI().

◆ HTMLFrameElement_Create()

HRESULT HTMLFrameElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 311 of file htmlframe.c.

312{
314
315 ret = heap_alloc_zero(sizeof(HTMLFrameElement));
316 if(!ret)
317 return E_OUTOFMEMORY;
318
319 ret->framebase.element.node.vtbl = &HTMLFrameElementImplVtbl;
320 ret->IHTMLFrameElement3_iface.lpVtbl = &HTMLFrameElement3Vtbl;
321
322 HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLFrameElement_dispex);
323
324 *elem = &ret->framebase.element;
325 return S_OK;
326}
static const NodeImplVtbl HTMLFrameElementImplVtbl
Definition: htmlframe.c:276
static const IHTMLFrameElement3Vtbl HTMLFrameElement3Vtbl
Definition: htmlframe.c:148
static dispex_static_data_t HTMLFrameElement_dispex
Definition: htmlframe.c:304
void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)

◆ HTMLGenericElement_Create()

HRESULT HTMLGenericElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 162 of file htmlgeneric.c.

163{
165
166 ret = heap_alloc_zero(sizeof(HTMLGenericElement));
167 if(!ret)
168 return E_OUTOFMEMORY;
169
170 ret->IHTMLGenericElement_iface.lpVtbl = &HTMLGenericElementVtbl;
171 ret->element.node.vtbl = &HTMLGenericElementImplVtbl;
172
173 HTMLElement_Init(&ret->element, doc, nselem, &HTMLGenericElement_dispex);
174
175 *elem = &ret->element;
176 return S_OK;
177}
static const NodeImplVtbl HTMLGenericElementImplVtbl
Definition: htmlgeneric.c:140
static dispex_static_data_t HTMLGenericElement_dispex
Definition: htmlgeneric.c:155
static const IHTMLGenericElementVtbl HTMLGenericElementVtbl
Definition: htmlgeneric.c:99

Referenced by HTMLElement_Create().

◆ HTMLHeadElement_Create()

HRESULT HTMLHeadElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 323 of file htmlhead.c.

324{
326
327 ret = heap_alloc_zero(sizeof(*ret));
328 if(!ret)
329 return E_OUTOFMEMORY;
330
331 ret->IHTMLHeadElement_iface.lpVtbl = &HTMLHeadElementVtbl;
332 ret->element.node.vtbl = &HTMLHeadElementImplVtbl;
333
334 HTMLElement_Init(&ret->element, doc, nselem, &HTMLHeadElement_dispex);
335
336 *elem = &ret->element;
337 return S_OK;
338}
static const NodeImplVtbl HTMLHeadElementImplVtbl
Definition: htmlhead.c:302
static const IHTMLHeadElementVtbl HTMLHeadElementVtbl
Definition: htmlhead.c:263
static dispex_static_data_t HTMLHeadElement_dispex
Definition: htmlhead.c:316

◆ HTMLIFrame_Create()

HRESULT HTMLIFrame_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 586 of file htmliframe.c.

587{
589
590 ret = heap_alloc_zero(sizeof(HTMLIFrame));
591 if(!ret)
592 return E_OUTOFMEMORY;
593
594 ret->IHTMLIFrameElement_iface.lpVtbl = &HTMLIFrameElementVtbl;
595 ret->IHTMLIFrameElement2_iface.lpVtbl = &HTMLIFrameElement2Vtbl;
596 ret->IHTMLIFrameElement3_iface.lpVtbl = &HTMLIFrameElement3Vtbl;
597 ret->framebase.element.node.vtbl = &HTMLIFrameImplVtbl;
598
599 HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLIFrame_dispex);
600
601 *elem = &ret->framebase.element;
602 return S_OK;
603}
static const NodeImplVtbl HTMLIFrameImplVtbl
Definition: htmliframe.c:549
static dispex_static_data_t HTMLIFrame_dispex
Definition: htmliframe.c:579
static const IHTMLIFrameElement3Vtbl HTMLIFrameElement3Vtbl
Definition: htmliframe.c:415
static const IHTMLIFrameElement2Vtbl HTMLIFrameElement2Vtbl
Definition: htmliframe.c:282
static const IHTMLIFrameElementVtbl HTMLIFrameElementVtbl
Definition: htmliframe.c:129

◆ HTMLImageElementFactory_Create()

HRESULT HTMLImageElementFactory_Create ( HTMLInnerWindow window,
HTMLImageElementFactory **  ret_val 
)

Definition at line 972 of file htmlimg.c.

973{
975
977 if(!ret)
978 return E_OUTOFMEMORY;
979
980 ret->IHTMLImageElementFactory_iface.lpVtbl = &HTMLImageElementFactoryVtbl;
981 ret->ref = 1;
982 ret->window = window;
983
984 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLImageElementFactory_iface,
986
987 *ret_val = ret;
988 return S_OK;
989}
static dispex_static_data_t HTMLImageElementFactory_dispex
Definition: htmlimg.c:965
static const IHTMLImageElementFactoryVtbl HTMLImageElementFactoryVtbl
Definition: htmlimg.c:909

Referenced by HTMLWindow2_get_Image().

◆ HTMLImgElement_Create()

HRESULT HTMLImgElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 726 of file htmlimg.c.

727{
729 nsresult nsres;
730
731 ret = heap_alloc_zero(sizeof(HTMLImgElement));
732 if(!ret)
733 return E_OUTOFMEMORY;
734
735 ret->IHTMLImgElement_iface.lpVtbl = &HTMLImgElementVtbl;
736 ret->element.node.vtbl = &HTMLImgElementImplVtbl;
737
738 HTMLElement_Init(&ret->element, doc, nselem, &HTMLImgElement_dispex);
739
740 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLImageElement, (void**)&ret->nsimg);
741 assert(nsres == NS_OK);
742
743 *elem = &ret->element;
744 return S_OK;
745}
static const IHTMLImgElementVtbl HTMLImgElementVtbl
Definition: htmlimg.c:587
static dispex_static_data_t HTMLImgElement_dispex
Definition: htmlimg.c:719
static const NodeImplVtbl HTMLImgElementImplVtbl
Definition: htmlimg.c:694

◆ HTMLInputElement_Create()

HRESULT HTMLInputElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 1332 of file htmlinput.c.

1333{
1335 nsresult nsres;
1336
1337 ret = heap_alloc_zero(sizeof(HTMLInputElement));
1338 if(!ret)
1339 return E_OUTOFMEMORY;
1340
1341 ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl;
1342 ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl;
1343 ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1344
1345 HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);
1346
1347 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput);
1348 assert(nsres == NS_OK);
1349
1350 *elem = &ret->element;
1351 return S_OK;
1352}
static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl
Definition: htmlinput.c:1151
static const NodeImplVtbl HTMLInputElementImplVtbl
Definition: htmlinput.c:1299
static const IHTMLInputElementVtbl HTMLInputElementVtbl
Definition: htmlinput.c:811
static dispex_static_data_t HTMLInputElement_dispex
Definition: htmlinput.c:1325

◆ HTMLLabelElement_Create()

HRESULT HTMLLabelElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 1526 of file htmlinput.c.

1527{
1529
1530 ret = heap_alloc_zero(sizeof(*ret));
1531 if(!ret)
1532 return E_OUTOFMEMORY;
1533
1534 ret->IHTMLLabelElement_iface.lpVtbl = &HTMLLabelElementVtbl;
1535 ret->element.node.vtbl = &HTMLLabelElementImplVtbl;
1536
1537 HTMLElement_Init(&ret->element, doc, nselem, &HTMLLabelElement_dispex);
1538 *elem = &ret->element;
1539 return S_OK;
1540}
static const NodeImplVtbl HTMLLabelElementImplVtbl
Definition: htmlinput.c:1504
static dispex_static_data_t HTMLLabelElement_dispex
Definition: htmlinput.c:1519
static const IHTMLLabelElementVtbl HTMLLabelElementVtbl
Definition: htmlinput.c:1465

◆ HTMLLinkElement_Create()

HRESULT HTMLLinkElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 437 of file htmllink.c.

438{
440 nsresult nsres;
441
442 ret = heap_alloc_zero(sizeof(*ret));
443 if(!ret)
444 return E_OUTOFMEMORY;
445
446 ret->IHTMLLinkElement_iface.lpVtbl = &HTMLLinkElementVtbl;
447 ret->element.node.vtbl = &HTMLLinkElementImplVtbl;
448
449 HTMLElement_Init(&ret->element, doc, nselem, &HTMLLinkElement_dispex);
450
451 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLLinkElement, (void**)&ret->nslink);
452 assert(nsres == NS_OK);
453
454 *elem = &ret->element;
455 return S_OK;
456}

◆ HTMLLoadOptions_Create()

HRESULT HTMLLoadOptions_Create ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppv 
)

Definition at line 173 of file loadopts.c.

174{
177
178 TRACE("(%p %s %p)\n", pUnkOuter, debugstr_mshtml_guid(riid), ppv);
179
180 ret = heap_alloc(sizeof(HTMLLoadOptions));
181 if(!ret)
182 return E_OUTOFMEMORY;
183
184 ret->IHtmlLoadOptions_iface.lpVtbl = &HtmlLoadOptionsVtbl;
185 ret->ref = 1;
186 ret->opts = NULL;
187
188 hres = IHtmlLoadOptions_QueryInterface(&ret->IHtmlLoadOptions_iface, riid, ppv);
189 IHtmlLoadOptions_Release(&ret->IHtmlLoadOptions_iface);
190 return hres;
191}
static const IHtmlLoadOptionsVtbl HtmlLoadOptionsVtbl
Definition: loadopts.c:165

Referenced by DllGetClassObject().

◆ HTMLLocation_Create()

HRESULT HTMLLocation_Create ( HTMLInnerWindow window,
HTMLLocation **  ret 
)

Definition at line 622 of file htmllocation.c.

623{
625
626 location = heap_alloc(sizeof(*location));
627 if(!location)
628 return E_OUTOFMEMORY;
629
630 location->IHTMLLocation_iface.lpVtbl = &HTMLLocationVtbl;
631 location->ref = 1;
632 location->window = window;
633
634 init_dispex(&location->dispex, (IUnknown*)&location->IHTMLLocation_iface, &HTMLLocation_dispex);
635
636 *ret = location;
637 return S_OK;
638}
static dispex_static_data_t HTMLLocation_dispex
Definition: htmllocation.c:614
static const IHTMLLocationVtbl HTMLLocationVtbl
Definition: htmllocation.c:580
#define location(file, line)
Definition: kmtest.h:18

Referenced by get_location().

◆ HTMLMetaElement_Create()

HRESULT HTMLMetaElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 244 of file htmlmeta.c.

245{
247
248 ret = heap_alloc_zero(sizeof(*ret));
249 if(!ret)
250 return E_OUTOFMEMORY;
251
252 ret->IHTMLMetaElement_iface.lpVtbl = &HTMLMetaElementVtbl;
253 ret->element.node.vtbl = &HTMLMetaElementImplVtbl;
254
255 HTMLElement_Init(&ret->element, doc, nselem, &HTMLMetaElement_dispex);
256
257 *elem = &ret->element;
258 return S_OK;
259}
static dispex_static_data_t HTMLMetaElement_dispex
Definition: htmlmeta.c:237
static const NodeImplVtbl HTMLMetaElementImplVtbl
Definition: htmlmeta.c:222
static const IHTMLMetaElementVtbl HTMLMetaElementVtbl
Definition: htmlmeta.c:169

◆ HTMLObjectElement_Create()

HRESULT HTMLObjectElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 764 of file htmlobject.c.

765{
767 nsresult nsres;
768
769 ret = heap_alloc_zero(sizeof(*ret));
770 if(!ret)
771 return E_OUTOFMEMORY;
772
773 ret->IHTMLObjectElement_iface.lpVtbl = &HTMLObjectElementVtbl;
774 ret->IHTMLObjectElement2_iface.lpVtbl = &HTMLObjectElement2Vtbl;
775 ret->plugin_container.element.node.vtbl = &HTMLObjectElementImplVtbl;
776
777 HTMLElement_Init(&ret->plugin_container.element, doc, nselem, &HTMLObjectElement_dispex);
778
779 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLObjectElement, (void**)&ret->nsobject);
780 assert(nsres == NS_OK);
781
782 *elem = &ret->plugin_container.element;
783 return S_OK;
784}
static const IHTMLObjectElementVtbl HTMLObjectElementVtbl
Definition: htmlobject.c:447
static const IHTMLObjectElement2Vtbl HTMLObjectElement2Vtbl
Definition: htmlobject.c:608
static const NodeImplVtbl HTMLObjectElementImplVtbl
Definition: htmlobject.c:731
static dispex_static_data_t HTMLObjectElement_dispex
Definition: htmlobject.c:757

◆ HTMLOptionElement_Create()

HRESULT HTMLOptionElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 437 of file htmloption.c.

438{
440 nsresult nsres;
441
442 ret = heap_alloc_zero(sizeof(HTMLOptionElement));
443 if(!ret)
444 return E_OUTOFMEMORY;
445
446 ret->IHTMLOptionElement_iface.lpVtbl = &HTMLOptionElementVtbl;
447 ret->element.node.vtbl = &HTMLOptionElementImplVtbl;
448
449 HTMLElement_Init(&ret->element, doc, nselem, &HTMLOptionElement_dispex);
450
451 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLOptionElement, (void**)&ret->nsoption);
452 assert(nsres == NS_OK);
453
454 *elem = &ret->element;
455 return S_OK;
456}
static const IHTMLOptionElementVtbl HTMLOptionElementVtbl
Definition: htmloption.c:334
static dispex_static_data_t HTMLOptionElement_dispex
Definition: htmloption.c:430
static const NodeImplVtbl HTMLOptionElementImplVtbl
Definition: htmloption.c:405

◆ HTMLOptionElementFactory_Create()

HRESULT HTMLOptionElementFactory_Create ( HTMLInnerWindow window,
HTMLOptionElementFactory **  ret_ptr 
)

Definition at line 618 of file htmloption.c.

619{
621
622 ret = heap_alloc(sizeof(*ret));
623 if(!ret)
624 return E_OUTOFMEMORY;
625
626 ret->IHTMLOptionElementFactory_iface.lpVtbl = &HTMLOptionElementFactoryVtbl;
627 ret->ref = 1;
628 ret->window = window;
629
630 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLOptionElementFactory_iface,
632
633 *ret_ptr = ret;
634 return S_OK;
635}
static dispex_static_data_t HTMLOptionElementFactory_dispex
Definition: htmloption.c:611
static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl
Definition: htmloption.c:595

Referenced by HTMLWindow2_get_Option().

◆ HTMLOuterWindow_Create()

HRESULT HTMLOuterWindow_Create ( HTMLDocumentObj doc_obj,
nsIDOMWindow nswindow,
HTMLOuterWindow parent,
HTMLOuterWindow **  ret 
)

Definition at line 2945 of file htmlwindow.c.

2947{
2949 HRESULT hres;
2950
2952 if(!window)
2953 return E_OUTOFMEMORY;
2954
2955 window->base.outer_window = window;
2956 window->base.inner_window = NULL;
2957
2958 window->window_ref = heap_alloc(sizeof(windowref_t));
2959 if(!window->window_ref) {
2961 return E_OUTOFMEMORY;
2962 }
2963
2964 window->doc_obj = doc_obj;
2965
2966 window->window_ref->window = window;
2967 window->window_ref->ref = 1;
2968
2969 if(nswindow) {
2970 nsIDOMWindow_AddRef(nswindow);
2971 window->nswindow = nswindow;
2972 }
2973
2974 window->scriptmode = parent ? parent->scriptmode : SCRIPTMODE_GECKO;
2975 window->readystate = READYSTATE_UNINITIALIZED;
2976
2978 if(SUCCEEDED(hres))
2979 hres = update_window_doc(window->pending_window);
2980 if(FAILED(hres)) {
2981 IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
2982 return hres;
2983 }
2984
2986 if(FAILED(hres)) {
2987 IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
2988 return hres;
2989 }
2990
2991 window->task_magic = get_task_target_magic();
2992
2993 list_init(&window->children);
2994 list_add_head(&window_list, &window->entry);
2995
2996 if(parent) {
2997 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
2998
2999 window->parent = parent;
3000 list_add_tail(&parent->children, &window->sibling_entry);
3001 }
3002
3003 TRACE("%p inner_window %p\n", window, window->base.inner_window);
3004
3005 *ret = window;
3006 return S_OK;
3007}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
HRESULT WINAPI CoInternetCreateSecurityManager(IServiceProvider *pSP, IInternetSecurityManager **ppSM, DWORD dwReserved)
Definition: sec_mgr.c:1841
r parent
Definition: btrfs.c:3010
static struct list window_list
Definition: htmlwindow.c:23
HRESULT update_window_doc(HTMLInnerWindow *window)
Definition: htmlwindow.c:3033
static void * alloc_window(size_t size)
Definition: htmlwindow.c:2894
HRESULT create_pending_window(HTMLOuterWindow *outer_window, nsChannelBSC *channelbsc)
Definition: htmlwindow.c:3009
LONG get_task_target_magic(void) DECLSPEC_HIDDEN
Definition: task.c:139

Referenced by HTMLDocument_Create(), and set_frame_doc().

◆ HTMLScreen_Create()

HRESULT HTMLScreen_Create ( IHTMLScreen **  ret)

Definition at line 234 of file htmlscreen.c.

235{
237
238 screen = heap_alloc_zero(sizeof(HTMLScreen));
239 if(!screen)
240 return E_OUTOFMEMORY;
241
242 screen->IHTMLScreen_iface.lpVtbl = &HTMLSreenVtbl;
243 screen->ref = 1;
244
245 init_dispex(&screen->dispex, (IUnknown*)&screen->IHTMLScreen_iface, &HTMLScreen_dispex);
246
247 *ret = &screen->IHTMLScreen_iface;
248 return S_OK;
249}
static const IHTMLScreenVtbl HTMLSreenVtbl
Definition: htmlscreen.c:203
static dispex_static_data_t HTMLScreen_dispex
Definition: htmlscreen.c:227
char screen[SCREENY][SCREENX]
Definition: polytest.cpp:65

Referenced by HTMLWindow2_get_screen().

◆ HTMLScriptElement_Create()

HRESULT HTMLScriptElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 458 of file htmlscript.c.

459{
461 nsresult nsres;
462
463 ret = heap_alloc_zero(sizeof(HTMLScriptElement));
464 if(!ret)
465 return E_OUTOFMEMORY;
466
467 ret->IHTMLScriptElement_iface.lpVtbl = &HTMLScriptElementVtbl;
468 ret->element.node.vtbl = &HTMLScriptElementImplVtbl;
469
470 HTMLElement_Init(&ret->element, doc, nselem, &HTMLScriptElement_dispex);
471
472 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLScriptElement, (void**)&ret->nsscript);
473 assert(nsres == NS_OK);
474
475 *elem = &ret->element;
476 return S_OK;
477}
static const NodeImplVtbl HTMLScriptElementImplVtbl
Definition: htmlscript.c:405
static dispex_static_data_t HTMLScriptElement_dispex
Definition: htmlscript.c:451
static const IHTMLScriptElementVtbl HTMLScriptElementVtbl
Definition: htmlscript.c:323

◆ HTMLSelectElement_Create()

HRESULT HTMLSelectElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 709 of file htmlselect.c.

710{
712 nsresult nsres;
713
714 ret = heap_alloc_zero(sizeof(HTMLSelectElement));
715 if(!ret)
716 return E_OUTOFMEMORY;
717
718 ret->IHTMLSelectElement_iface.lpVtbl = &HTMLSelectElementVtbl;
719 ret->element.node.vtbl = &HTMLSelectElementImplVtbl;
720
721 HTMLElement_Init(&ret->element, doc, nselem, &HTMLSelectElement_dispex);
722
723 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLSelectElement,
724 (void**)&ret->nsselect);
725 assert(nsres == NS_OK);
726
727 *elem = &ret->element;
728 return S_OK;
729}
static const IHTMLSelectElementVtbl HTMLSelectElementVtbl
Definition: htmlselect.c:526
static dispex_static_data_t HTMLSelectElement_dispex
Definition: htmlselect.c:702
static const NodeImplVtbl HTMLSelectElementImplVtbl
Definition: htmlselect.c:676

◆ HTMLSelectionObject_Create()

HRESULT HTMLSelectionObject_Create ( HTMLDocumentNode doc,
nsISelection nsselection,
IHTMLSelectionObject **  ret 
)

Definition at line 325 of file selection.c.

326{
328
330 if(!selection)
331 return E_OUTOFMEMORY;
332
333 init_dispex(&selection->dispex, (IUnknown*)&selection->IHTMLSelectionObject_iface, &HTMLSelectionObject_dispex);
334
335 selection->IHTMLSelectionObject_iface.lpVtbl = &HTMLSelectionObjectVtbl;
336 selection->IHTMLSelectionObject2_iface.lpVtbl = &HTMLSelectionObject2Vtbl;
337 selection->ref = 1;
338 selection->nsselection = nsselection; /* We shouldn't call AddRef here */
339
340 selection->doc = doc;
341 list_add_head(&doc->selection_list, &selection->entry);
342
343 *ret = &selection->IHTMLSelectionObject_iface;
344 return S_OK;
345}
int selection
Definition: ctm.c:92
static dispex_static_data_t HTMLSelectionObject_dispex
Definition: selection.c:318
static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl
Definition: selection.c:213
static const IHTMLSelectionObject2Vtbl HTMLSelectionObject2Vtbl
Definition: selection.c:301
struct list selection_list

Referenced by HTMLDocument_get_selection().

◆ HTMLStyleElement_Create()

HRESULT HTMLStyleElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 359 of file htmlstyleelem.c.

360{
362 nsresult nsres;
363
364 ret = heap_alloc_zero(sizeof(*ret));
365 if(!ret)
366 return E_OUTOFMEMORY;
367
368 ret->IHTMLStyleElement_iface.lpVtbl = &HTMLStyleElementVtbl;
369 ret->element.node.vtbl = &HTMLStyleElementImplVtbl;
370
371 HTMLElement_Init(&ret->element, doc, nselem, &HTMLStyleElement_dispex);
372
373 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLStyleElement, (void**)&ret->nsstyle);
374 assert(nsres == NS_OK);
375
376 *elem = &ret->element;
377 return S_OK;
378}
static dispex_static_data_t HTMLStyleElement_dispex
static const IHTMLStyleElementVtbl HTMLStyleElementVtbl
static const NodeImplVtbl HTMLStyleElementImplVtbl

◆ HTMLStyleSheet_Create()

IHTMLStyleSheet * HTMLStyleSheet_Create ( nsIDOMStyleSheet nsstylesheet)

Definition at line 746 of file htmlstylesheet.c.

747{
749 nsresult nsres;
750
751 ret->IHTMLStyleSheet_iface.lpVtbl = &HTMLStyleSheetVtbl;
752 ret->ref = 1;
753 ret->nsstylesheet = NULL;
754
755 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLStyleSheet_iface, &HTMLStyleSheet_dispex);
756
757 if(nsstylesheet) {
758 nsres = nsIDOMStyleSheet_QueryInterface(nsstylesheet, &IID_nsIDOMCSSStyleSheet,
759 (void**)&ret->nsstylesheet);
760 if(NS_FAILED(nsres))
761 ERR("Could not get nsICSSStyleSheet interface: %08x\n", nsres);
762 }
763
764 return &ret->IHTMLStyleSheet_iface;
765}
static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl
static dispex_static_data_t HTMLStyleSheet_dispex

Referenced by HTMLDocument_createStyleSheet(), HTMLStyleElement_get_styleSheet(), and HTMLStyleSheetsCollection_item().

◆ HTMLStyleSheetsCollection_Create()

IHTMLStyleSheetsCollection * HTMLStyleSheetsCollection_Create ( nsIDOMStyleSheetList nslist)

Definition at line 375 of file htmlstylesheet.c.

376{
378
379 ret->IHTMLStyleSheetsCollection_iface.lpVtbl = &HTMLStyleSheetsCollectionVtbl;
380 ret->ref = 1;
381
382 if(nslist)
383 nsIDOMStyleSheetList_AddRef(nslist);
384 ret->nslist = nslist;
385
386 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLStyleSheetsCollection_iface,
388
389 return &ret->IHTMLStyleSheetsCollection_iface;
390}
static const IHTMLStyleSheetsCollectionVtbl HTMLStyleSheetsCollectionVtbl
static dispex_static_data_t HTMLStyleSheetsCollection_dispex

Referenced by HTMLDocument_get_styleSheets().

◆ HTMLTable_Create()

HRESULT HTMLTable_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 1065 of file htmltable.c.

1066{
1067 HTMLTable *ret;
1068 nsresult nsres;
1069
1070 ret = heap_alloc_zero(sizeof(HTMLTable));
1071 if(!ret)
1072 return E_OUTOFMEMORY;
1073
1074 ret->element.node.vtbl = &HTMLTableImplVtbl;
1075 ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
1076 ret->IHTMLTable2_iface.lpVtbl = &HTMLTable2Vtbl;
1077 ret->IHTMLTable3_iface.lpVtbl = &HTMLTable3Vtbl;
1078
1079 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
1080
1081 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableElement, (void**)&ret->nstable);
1082 assert(nsres == NS_OK);
1083
1084 *elem = &ret->element;
1085 return S_OK;
1086}
static const IHTMLTableVtbl HTMLTableVtbl
Definition: htmltable.c:710
static const IHTMLTable2Vtbl HTMLTable2Vtbl
Definition: htmltable.c:853
static const IHTMLTable3Vtbl HTMLTable3Vtbl
Definition: htmltable.c:956
static dispex_static_data_t HTMLTable_dispex
Definition: htmltable.c:1058
static const NodeImplVtbl HTMLTableImplVtbl
Definition: htmltable.c:1030

◆ HTMLTableCell_Create()

HRESULT HTMLTableCell_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 440 of file htmltablecell.c.

441{
443 nsresult nsres;
444
445 ret = heap_alloc_zero(sizeof(*ret));
446 if(!ret)
447 return E_OUTOFMEMORY;
448
449 ret->IHTMLTableCell_iface.lpVtbl = &HTMLTableCellVtbl;
450 ret->element.node.vtbl = &HTMLTableCellImplVtbl;
451
452 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableCell_dispex);
453
454 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableCellElement, (void**)&ret->nscell);
455 assert(nsres == NS_OK);
456
457 *elem = &ret->element;
458 return S_OK;
459}
static const IHTMLTableCellVtbl HTMLTableCellVtbl
static const NodeImplVtbl HTMLTableCellImplVtbl
static dispex_static_data_t HTMLTableCell_dispex

Referenced by HTMLTableRow_insertCell().

◆ HTMLTableRow_Create()

HRESULT HTMLTableRow_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 444 of file htmltablerow.c.

445{
447 nsresult nsres;
448
449 ret = heap_alloc_zero(sizeof(HTMLTableRow));
450 if(!ret)
451 return E_OUTOFMEMORY;
452
453 ret->IHTMLTableRow_iface.lpVtbl = &HTMLTableRowVtbl;
454 ret->element.node.vtbl = &HTMLTableRowImplVtbl;
455
456 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTableRow_dispex);
457
458 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTableRowElement, (void**)&ret->nsrow);
459 assert(nsres == NS_OK);
460
461 *elem = &ret->element;
462 return S_OK;
463}
static const NodeImplVtbl HTMLTableRowImplVtbl
Definition: htmltablerow.c:411
static const IHTMLTableRowVtbl HTMLTableRowVtbl
Definition: htmltablerow.c:334
static dispex_static_data_t HTMLTableRow_dispex
Definition: htmltablerow.c:437

Referenced by HTMLTable_insertRow().

◆ HTMLTextAreaElement_Create()

HRESULT HTMLTextAreaElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 498 of file htmltextarea.c.

499{
501 nsresult nsres;
502
503 ret = heap_alloc_zero(sizeof(HTMLTextAreaElement));
504 if(!ret)
505 return E_OUTOFMEMORY;
506
507 ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl;
508 ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
509
510 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex);
511
512 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, (void**)&ret->nstextarea);
513 assert(nsres == NS_OK);
514
515 *elem = &ret->element;
516 return S_OK;
517}
static const IHTMLTextAreaElementVtbl HTMLTextAreaElementVtbl
Definition: htmltextarea.c:361
static const NodeImplVtbl HTMLTextAreaElementImplVtbl
Definition: htmltextarea.c:464
static dispex_static_data_t HTMLTextAreaElement_dispex
Definition: htmltextarea.c:491

◆ HTMLTextContainer_Init()

void HTMLTextContainer_Init ( HTMLTextContainer This,
HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
dispex_static_data_t dispex_data 
)

Definition at line 172 of file htmltextcont.c.

174{
175 This->IHTMLTextContainer_iface.lpVtbl = &HTMLTextContainerVtbl;
176
177 HTMLElement_Init(&This->element, doc, nselem, dispex_data);
178}
static const IHTMLTextContainerVtbl HTMLTextContainerVtbl
Definition: htmltextcont.c:153

Referenced by HTMLBodyElement_Create().

◆ HTMLTitleElement_Create()

HRESULT HTMLTitleElement_Create ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
HTMLElement **  elem 
)

Definition at line 163 of file htmlhead.c.

164{
166
167 ret = heap_alloc_zero(sizeof(*ret));
168 if(!ret)
169 return E_OUTOFMEMORY;
170
171 ret->IHTMLTitleElement_iface.lpVtbl = &HTMLTitleElementVtbl;
172 ret->element.node.vtbl = &HTMLTitleElementImplVtbl;
173
174 HTMLElement_Init(&ret->element, doc, nselem, &HTMLTitleElement_dispex);
175
176 *elem = &ret->element;
177 return S_OK;
178}
static dispex_static_data_t HTMLTitleElement_dispex
Definition: htmlhead.c:156
static const IHTMLTitleElementVtbl HTMLTitleElementVtbl
Definition: htmlhead.c:103
static const NodeImplVtbl HTMLTitleElementImplVtbl
Definition: htmlhead.c:142

◆ HTMLTxtRange_Create()

HRESULT HTMLTxtRange_Create ( HTMLDocumentNode doc,
nsIDOMRange nsrange,
IHTMLTxtRange **  p 
)

Definition at line 1722 of file txtrange.c.

1723{
1725
1726 ret = heap_alloc(sizeof(HTMLTxtRange));
1727 if(!ret)
1728 return E_OUTOFMEMORY;
1729
1730 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLTxtRange_iface, &HTMLTxtRange_dispex);
1731
1732 ret->IHTMLTxtRange_iface.lpVtbl = &HTMLTxtRangeVtbl;
1733 ret->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl;
1734 ret->ref = 1;
1735
1736 if(nsrange)
1737 nsIDOMRange_AddRef(nsrange);
1738 ret->nsrange = nsrange;
1739
1740 ret->doc = doc;
1741 list_add_head(&doc->range_list, &ret->entry);
1742
1743 *p = &ret->IHTMLTxtRange_iface;
1744 return S_OK;
1745}
struct list range_list
static const IHTMLTxtRangeVtbl HTMLTxtRangeVtbl
Definition: txtrange.c:1576
static dispex_static_data_t HTMLTxtRange_dispex
Definition: txtrange.c:1715
static const IOleCommandTargetVtbl OleCommandTargetVtbl
Definition: txtrange.c:1703

Referenced by HTMLBodyElement_createTextRange(), HTMLSelectionObject_createRange(), and HTMLTxtRange_duplicate().

◆ HTMLXMLHttpRequestFactory_Create()

HRESULT HTMLXMLHttpRequestFactory_Create ( HTMLInnerWindow window,
HTMLXMLHttpRequestFactory **  ret_ptr 
)

Definition at line 790 of file xmlhttprequest.c.

791{
793
794 ret = heap_alloc(sizeof(*ret));
795 if(!ret)
796 return E_OUTOFMEMORY;
797
798 ret->IHTMLXMLHttpRequestFactory_iface.lpVtbl = &HTMLXMLHttpRequestFactoryVtbl;
799 ret->ref = 1;
800 ret->window = window;
801
802 init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLXMLHttpRequestFactory_iface,
804
805 *ret_ptr = ret;
806 return S_OK;
807}
static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex
static const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl

Referenced by HTMLWindow5_get_XMLHttpRequest().

◆ init_binding_ui()

void init_binding_ui ( HTMLDocumentObj doc)

Definition at line 935 of file view.c.

936{
938}
static const IWindowForBindingUIVtbl WindowForBindingUIVtbl
Definition: view.c:928
IWindowForBindingUI IWindowForBindingUI_iface

Referenced by HTMLDocument_Create().

◆ init_dispex()

void init_dispex ( DispatchEx dispex,
IUnknown outer,
dispex_static_data_t data 
)

Definition at line 1737 of file dispex.c.

1738{
1739 dispex->IDispatchEx_iface.lpVtbl = &DispatchExVtbl;
1740 dispex->outer = outer;
1741 dispex->data = data;
1742 dispex->dynamic_data = NULL;
1743}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static IDispatchExVtbl DispatchExVtbl
Definition: dispex.c:890
dispex_static_data_t * data
dispex_dynamic_data_t * dynamic_data
IUnknown * outer

◆ init_document_mutation()

void init_document_mutation ( HTMLDocumentNode doc)

Definition at line 726 of file mutation.c.

727{
728 nsIDocument *nsdoc;
729 nsresult nsres;
730
732
733 nsres = nsIDOMHTMLDocument_QueryInterface(doc->nsdoc, &IID_nsIDocument, (void**)&nsdoc);
734 if(NS_FAILED(nsres)) {
735 ERR("Could not get nsIDocument: %08x\n", nsres);
736 return;
737 }
738
739 nsIContentUtils_AddDocumentObserver(content_utils, nsdoc, &doc->nsIDocumentObserver_iface);
740 nsIDocument_Release(nsdoc);
741}
static const nsIDocumentObserverVtbl nsDocumentObserverVtbl
Definition: mutation.c:696
nsIDocumentObserver nsIDocumentObserver_iface

Referenced by create_doc_from_nsdoc().

◆ init_editor()

void init_editor ( HTMLDocument This)

Definition at line 1202 of file editor.c.

1203{
1205
1206 set_ns_fontname(This, "Times New Roman");
1207}
static void set_ns_fontname(HTMLDocument *This, const char *fontname)
Definition: editor.c:487

Referenced by parse_complete().

◆ init_mutation()

void init_mutation ( nsIComponentManager component_manager)

Definition at line 774 of file mutation.c.

775{
777 nsresult nsres;
778
779 if(!component_manager) {
780 if(content_utils) {
781 nsIContentUtils_Release(content_utils);
783 }
784 return;
785 }
786
787 nsres = nsIComponentManager_GetClassObject(component_manager, &NS_ICONTENTUTILS_CID,
788 &IID_nsIFactory, (void**)&factory);
789 if(NS_FAILED(nsres)) {
790 ERR("Could not create nsIContentUtils service: %08x\n", nsres);
791 return;
792 }
793
794 nsres = nsIFactory_CreateInstance(factory, NULL, &IID_nsIContentUtils, (void**)&content_utils);
795 nsIFactory_Release(factory);
796 if(NS_FAILED(nsres))
797 ERR("Could not create nsIContentUtils instance: %08x\n", nsres);
798}
static const IID NS_ICONTENTUTILS_CID
Definition: mutation.c:24
Definition: main.c:439

Referenced by close_gecko(), and init_xpcom().

◆ init_node_cc()

void init_node_cc ( void  )

Definition at line 1328 of file htmlnode.c.

1329{
1330 static const CCObjCallback node_ccp_callback = {
1334 };
1335
1336 ccp_init(&node_ccp, &node_ccp_callback);
1337}
static nsresult NSAPI HTMLDOMNode_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
Definition: htmlnode.c:1267
static nsresult NSAPI HTMLDOMNode_unlink(void *p)
Definition: htmlnode.c:1287
static void NSAPI HTMLDOMNode_delete_cycle_collectable(void *p)
Definition: htmlnode.c:1315

Referenced by init_xpcom().

◆ init_nsio()

void init_nsio ( nsIComponentManager component_manager,
nsIComponentRegistrar registrar 
)

Definition at line 4048 of file nsio.c.

4049{
4050 nsIFactory *old_factory = NULL;
4051 nsresult nsres;
4052
4053 nsres = nsIComponentManager_GetClassObject(component_manager, &NS_IOSERVICE_CID,
4054 &IID_nsIFactory, (void**)&old_factory);
4055 if(NS_FAILED(nsres)) {
4056 ERR("Could not get factory: %08x\n", nsres);
4057 return;
4058 }
4059
4060 nsres = nsIFactory_CreateInstance(old_factory, NULL, &IID_nsIIOService, (void**)&nsio);
4061 if(NS_FAILED(nsres)) {
4062 ERR("Couldn not create nsIOService instance %08x\n", nsres);
4063 nsIFactory_Release(old_factory);
4064 return;
4065 }
4066
4067 nsres = nsIIOService_QueryInterface(nsio, &IID_nsINetUtil, (void**)&net_util);
4068 if(NS_FAILED(nsres)) {
4069 WARN("Could not get nsINetUtil interface: %08x\n", nsres);
4070 nsIIOService_Release(nsio);
4071 return;
4072 }
4073
4074 nsres = nsIComponentRegistrar_UnregisterFactory(registrar, &NS_IOSERVICE_CID, old_factory);
4075 nsIFactory_Release(old_factory);
4076 if(NS_FAILED(nsres))
4077 ERR("UnregisterFactory failed: %08x\n", nsres);
4078
4079 nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_IOSERVICE_CID,
4081 if(NS_FAILED(nsres))
4082 ERR("RegisterFactory failed: %08x\n", nsres);
4083}
static const IID NS_IOSERVICE_CID
Definition: nsio.c:24
#define NS_IOSERVICE_CLASSNAME
Definition: nsio.c:21
static nsIFactory nsIOServiceFactory
Definition: nsio.c:3990
static nsIIOService * nsio
Definition: nsio.c:29
#define NS_IOSERVICE_CONTRACTID
Definition: nsio.c:22
static nsINetUtil * net_util
Definition: nsio.c:30

Referenced by init_xpcom().

◆ is_gecko_path()

BOOL is_gecko_path ( const char path)

Definition at line 1108 of file nsembed.c.

1109{
1110 WCHAR *buf, *ptr;
1111 BOOL ret;
1112
1114 if(!buf || strlenW(buf) < gecko_path_len)
1115 return FALSE;
1116
1117 for(ptr = buf; *ptr; ptr++) {
1118 if(*ptr == '\\')
1119 *ptr = '/';
1120 }
1121
1123 buf[gecko_path_len] = 0;
1124
1126 heap_free(buf);
1127 return ret;
1128}
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
Definition: url.c:1367
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
static WCHAR * heap_strdupUtoW(const char *str)
static unsigned gecko_path_len
Definition: nsembed.c:70
static WCHAR gecko_path[MAX_PATH]
Definition: nsembed.c:69
#define URL_UNESCAPE_INPLACE
Definition: shlwapi.h:1224

Referenced by is_gecko_special_uri().

◆ load_gecko()

BOOL load_gecko ( void  )

Definition at line 742 of file nsembed.c.

743{
744 PRUnichar gre_path[MAX_PATH];
745 BOOL ret = FALSE;
746
747 static DWORD loading_thread;
748
749 TRACE("()\n");
750
751 /* load_gecko may be called recursively */
752 if(loading_thread == GetCurrentThreadId())
753 return pCompMgr != NULL;
754
756
757 if(!loading_thread) {
758 loading_thread = GetCurrentThreadId();
759
760#ifdef __REACTOS__
761 if(load_wine_gecko(gre_path))
762#else
763 if(load_wine_gecko(gre_path)
764 || (install_wine_gecko() && load_wine_gecko(gre_path)))
765#endif
766 ret = init_xpcom(gre_path);
767 else
768 MESSAGE("Could not load wine-gecko. HTML rendering will be disabled.\n");
769 }else {
770 ret = pCompMgr != NULL;
771 }
772
774
775 return ret;
776}
#define MAX_PATH
Definition: compat.h:34
#define MESSAGE
Definition: options.h:86
static BOOL install_wine_gecko(void)
Definition: nsembed.c:387
static BOOL load_wine_gecko(PRUnichar *gre_path)
Definition: nsembed.c:583
static BOOL init_xpcom(const PRUnichar *gre_path)
Definition: nsembed.c:678
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by create_nscontainer(), and DllRegisterServer().

◆ node_addref()

static void node_addref ( HTMLDOMNode node)
inlinestatic

Definition at line 713 of file mshtml_private.h.

714{
715 IHTMLDOMNode_AddRef(&node->IHTMLDOMNode_iface);
716}

Referenced by create_all_collection(), get_node_obj(), HTMLElementCollection_item(), HTMLElementCollection_tags(), and HTMLObjectElement_QI().

◆ node_release()

◆ notif_focus()

void notif_focus ( HTMLDocumentObj This)

Definition at line 130 of file view.c.

131{
134
135 if(!This->client)
136 return;
137
138 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&site);
139 if(FAILED(hres))
140 return;
141
142 IOleControlSite_OnFocus(site, This->focus);
143 IOleControlSite_Release(site);
144}
static IActiveScriptSite * site
Definition: script.c:149
const GUID IID_IOleControlSite

Referenced by handle_blur(), handle_focus(), OleDocumentView_UIActivate(), and OleInPlaceObjectWindowless_InPlaceDeactivate().

◆ nsACString_Finish()

void nsACString_Finish ( nsACString str)

◆ nsACString_GetData()

◆ nsACString_Init()

BOOL nsACString_Init ( nsACString str,
const char data 
)

◆ nsACString_InitDepend()

void nsACString_InitDepend ( nsACString str,
const char data 
)

Definition at line 797 of file nsembed.c.

798{
799 NS_CStringContainerInit2(str, data, PR_UINT32_MAX, NS_CSTRING_CONTAINER_INIT_DEPEND);
800}
#define NS_CSTRING_CONTAINER_INIT_DEPEND
Definition: nsembed.c:40

Referenced by HTMLXMLHttpRequest_getResponseHeader(), parse_content_type(), and visit_http_headers().

◆ nsACString_SetData()

◆ nsalloc()

void * nsalloc ( size_t  size)

Definition at line 778 of file nsembed.c.

779{
780 return NS_Alloc(size);
781}
static nsIFile **static const PRUnichar cpp_bool *static const char cpp_bool *static void *CDECL * NS_Alloc(SIZE_T)

Referenced by nsTooltipTextProvider_GetNodeText().

◆ nsAString_Finish()

void nsAString_Finish ( nsAString str)

Definition at line 836 of file nsembed.c.

837{
838 NS_StringContainerFinish(str);
839}

Referenced by bind_event_scripts(), check_codebase(), check_event_attr(), check_style_attr_value(), create_nselem(), create_nsfile(), detach_nslistener(), detach_xhr_event_listener(), dispid_from_elem_name(), document_write(), elem_string_attr_getter(), elem_string_attr_setter(), exec_hyperlink(), fill_props(), find_event_target(), get_doc_elem_by_id(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_elem_clsid(), get_font_size(), get_frame_by_name(), get_nsstyle_attr(), get_nsstyle_attr_nsval(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), handle_htmlevent(), handle_link_click_event(), HTMLAnchorElement_get_href(), HTMLAnchorElement_handle_event(), HTMLAnchorElement_put_href(), HTMLAnchorElement_put_name(), HTMLAnchorElement_put_rel(), HTMLAnchorElement_put_search(), HTMLAnchorElement_put_target(), HTMLAreaElement_handle_event(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_text(), HTMLBodyElement_put_aLink(), HTMLBodyElement_put_background(), HTMLBodyElement_put_bgColor(), HTMLBodyElement_put_link(), HTMLBodyElement_put_text(), HTMLBodyElement_put_vLink(), HTMLButtonElement_put_name(), HTMLCurrentStyle_Create(), HTMLDocument3_createTextNode(), HTMLDocument3_getElementsByName(), HTMLDocument3_getElementsByTagName(), HTMLDocument5_createComment(), HTMLDocument_get_title(), HTMLDocument_put_title(), HTMLDocumentNode_invoke(), HTMLDOMAttribute_get_specified(), HTMLDOMNode_get_nodeValue(), HTMLDOMNode_put_nodeValue(), HTMLDOMTextNode2_appendData(), HTMLDOMTextNode_put_data(), HTMLElement2_getElementsByTagName(), HTMLElement2_put_dir(), HTMLElement3_put_contentEditable(), HTMLElement_Create(), HTMLElement_get_outerHTML(), HTMLElement_insertAdjacentHTML(), HTMLElement_insertAdjacentText(), HTMLElement_populate_props(), HTMLElement_put_className(), HTMLElement_put_id(), HTMLElement_put_innerHTML(), HTMLElement_put_innerText(), HTMLElement_put_title(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_put_action(), HTMLFormElement_put_encoding(), HTMLFormElement_put_method(), HTMLFormElement_put_name(), HTMLFormElement_put_target(), HTMLFormElement_submit(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_scrolling(), HTMLFrameBase_put_frameBorder(), HTMLFrameBase_put_marginHeight(), HTMLFrameBase_put_marginWidth(), HTMLFrameBase_put_name(), HTMLFrameBase_put_scrolling(), HTMLFrameBase_put_src(), HTMLIFrameElement2_put_height(), HTMLIFrameElement2_put_width(), HTMLImgElement_get_src(), HTMLImgElement_put_align(), HTMLImgElement_put_alt(), HTMLImgElement_put_src(), HTMLInputElement_get_src(), HTMLInputElement_is_text_edit(), HTMLInputElement_put_defaultValue(), HTMLInputElement_put_name(), HTMLInputElement_put_src(), HTMLInputElement_put_type(), HTMLInputElement_put_value(), HTMLLabelElement_put_htmlFor(), HTMLLinkElement_put_href(), HTMLLinkElement_put_media(), HTMLLinkElement_put_rel(), HTMLLinkElement_put_rev(), HTMLLinkElement_put_type(), HTMLObjectElement_get_height(), HTMLObjectElement_get_width(), HTMLObjectElement_put_height(), HTMLObjectElement_put_name(), HTMLObjectElement_put_width(), HTMLOptionElement_put_text(), HTMLOptionElement_put_value(), HTMLScriptElement_put_src(), HTMLScriptElement_put_text(), HTMLScriptElement_put_type(), HTMLSelectElement_put_name(), HTMLSelectElement_put_value(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_put_cssText(), HTMLStyle_removeAttribute(), HTMLStyleElement_put_media(), HTMLStyleElement_put_type(), HTMLStyleSheet_put_cssText(), HTMLTable3_put_summary(), HTMLTable_get_bgColor(), HTMLTable_get_width(), HTMLTable_put_align(), HTMLTable_put_bgColor(), HTMLTable_put_cellPadding(), HTMLTable_put_cellSpacing(), HTMLTable_put_frame(), HTMLTable_put_width(), HTMLTableCell_get_bgColor(), HTMLTableCell_put_align(), HTMLTableCell_put_bgColor(), HTMLTableRow_get_bgColor(), HTMLTableRow_put_align(), HTMLTableRow_put_bgColor(), HTMLTableRow_put_vAlign(), HTMLTextAreaElement_put_defaultValue(), HTMLTextAreaElement_put_value(), HTMLTxtRange_get_htmlText(), HTMLTxtRange_pasteHTML(), HTMLTxtRange_put_text(), HTMLWindow2_put_name(), HTMLXMLHttpRequest_bind_event(), HTMLXMLHttpRequest_open(), init_event(), is_elem_name(), is_elem_tag(), move_next_char(), move_prev_char(), navigate_fragment(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), query_align_status(), range_to_string(), remove_child_attr(), replace_node_by_html(), return_nscolor(), return_nsstr(), run_insert_comment(), set_event_info(), set_font_size(), set_nsstyle_attr(), set_opacity(), update_window_doc(), and wstrbuf_append_node().

◆ nsAString_GetData()

UINT32 nsAString_GetData ( const nsAString str,
const PRUnichar **  data 
)

Definition at line 831 of file nsembed.c.

832{
833 return NS_StringGetData(str, data, NULL);
834}

Referenced by check_style_attr_value(), find_event_target(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_font_size(), get_nsstyle_attr(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), get_target_window(), get_text_node_data(), handle_htmlevent(), HTMLAnchorElement_get_href(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_text(), HTMLDocument_get_title(), HTMLDOMNode_get_nodeValue(), HTMLElement_Create(), HTMLElement_get_outerHTML(), HTMLElement_populate_props(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_submit(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_scrolling(), HTMLImgElement_get_src(), HTMLInputElement_get_src(), HTMLInputElement_is_text_edit(), HTMLObjectElement_get_height(), HTMLObjectElement_get_width(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_removeAttribute(), HTMLTable_get_bgColor(), HTMLTableCell_get_bgColor(), HTMLTableRow_get_bgColor(), HTMLTxtRange_get_htmlText(), is_elem_name(), is_elem_tag(), navigate_href(), navigate_href_new_window(), nsstr_to_truncated_bstr(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), remove_child_attr(), return_nscolor(), return_nsstr(), run_insert_comment(), and wstrbuf_append_node().

◆ nsAString_Init()

BOOL nsAString_Init ( nsAString str,
const PRUnichar data 
)

Definition at line 817 of file nsembed.c.

818{
819 return NS_SUCCEEDED(NS_StringContainerInit2(str, data, PR_UINT32_MAX, 0));
820}

Referenced by check_style_attr_value(), find_event_target(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_font_size(), get_nsstyle_attr(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), get_text_node_data(), handle_htmlevent(), HTMLAnchorElement_get_hash(), HTMLAnchorElement_get_hostname(), HTMLAnchorElement_get_href(), HTMLAnchorElement_get_name(), HTMLAnchorElement_get_rel(), HTMLAnchorElement_get_search(), HTMLAnchorElement_get_target(), HTMLAnchorElement_handle_event(), HTMLAreaElement_handle_event(), HTMLBodyElement_get_aLink(), HTMLBodyElement_get_background(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_link(), HTMLBodyElement_get_text(), HTMLBodyElement_get_vLink(), HTMLButtonElement_get_name(), HTMLCurrentStyle_Create(), HTMLDocument5_get_compatMode(), HTMLDocument_get_charset(), HTMLDocument_get_title(), HTMLDOMNode_get_nodeName(), HTMLDOMNode_get_nodeValue(), HTMLDOMTextNode_get_data(), HTMLElement2_get_dir(), HTMLElement3_get_contentEditable(), HTMLElement_Create(), HTMLElement_get_className(), HTMLElement_get_id(), HTMLElement_get_innerHTML(), HTMLElement_get_outerHTML(), HTMLElement_get_tagName(), HTMLElement_get_title(), HTMLElement_populate_props(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_get_encoding(), HTMLFormElement_get_method(), HTMLFormElement_get_name(), HTMLFormElement_get_target(), HTMLFormElement_submit(), HTMLFrameBase_get_frameBorder(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_name(), HTMLFrameBase_get_scrolling(), HTMLFrameBase_get_src(), HTMLIFrameElement2_get_height(), HTMLIFrameElement2_get_width(), HTMLImgElement_get_align(), HTMLImgElement_get_alt(), HTMLImgElement_get_name(), HTMLImgElement_get_src(), HTMLInputElement_get_defaultValue(), HTMLInputElement_get_name(), HTMLInputElement_get_src(), HTMLInputElement_get_type(), HTMLInputElement_get_value(), HTMLInputElement_is_text_edit(), HTMLLinkElement_get_href(), HTMLLinkElement_get_media(), HTMLLinkElement_get_rel(), HTMLLinkElement_get_rev(), HTMLLinkElement_get_type(), HTMLObjectElement_get_height(), HTMLObjectElement_get_name(), HTMLObjectElement_get_width(), HTMLOptionElement_get_text(), HTMLOptionElement_get_value(), HTMLScriptElement_get_src(), HTMLScriptElement_get_text(), HTMLScriptElement_get_type(), HTMLScriptElement_put_type(), HTMLSelectElement_get_name(), HTMLSelectElement_get_type(), HTMLSelectElement_get_value(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_removeAttribute(), HTMLStyleElement_get_media(), HTMLStyleElement_get_type(), HTMLStyleSheet_get_cssText(), HTMLStyleSheet_get_href(), HTMLTable3_get_summary(), HTMLTable_get_align(), HTMLTable_get_bgColor(), HTMLTable_get_cellPadding(), HTMLTable_get_cellSpacing(), HTMLTable_get_frame(), HTMLTable_get_width(), HTMLTableCell_get_align(), HTMLTableCell_get_bgColor(), HTMLTableRow_get_align(), HTMLTableRow_get_bgColor(), HTMLTableRow_get_vAlign(), HTMLTextAreaElement_get_defaultValue(), HTMLTextAreaElement_get_name(), HTMLTextAreaElement_get_value(), HTMLTxtRange_get_htmlText(), HTMLWindow2_get_name(), HTMLXMLHttpRequest_get_responseText(), is_elem_name(), is_elem_tag(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), query_align_status(), remove_child_attr(), run_insert_comment(), var2str(), variant_to_nsastr(), variant_to_nscolor(), and wstrbuf_append_node().

◆ nsAString_InitDepend()

void nsAString_InitDepend ( nsAString str,
const PRUnichar data 
)

Definition at line 826 of file nsembed.c.

827{
828 NS_StringContainerInit2(str, data, PR_UINT32_MAX, NS_STRING_CONTAINER_INIT_DEPEND);
829}
#define NS_STRING_CONTAINER_INIT_DEPEND
Definition: nsembed.c:39

Referenced by bind_event_scripts(), create_nselem(), create_nsfile(), detach_nslistener(), detach_xhr_event_listener(), dispid_from_elem_name(), document_write(), elem_string_attr_setter(), exec_hyperlink(), fill_props(), get_doc_elem_by_id(), get_elem_attr_value(), get_frame_by_name(), get_nsstyle_attr_nsval(), HTMLAnchorElement_put_href(), HTMLAnchorElement_put_name(), HTMLAnchorElement_put_rel(), HTMLAnchorElement_put_search(), HTMLAnchorElement_put_target(), HTMLBodyElement_put_background(), HTMLButtonElement_put_name(), HTMLDocument3_createTextNode(), HTMLDocument3_getElementsByName(), HTMLDocument3_getElementsByTagName(), HTMLDocument5_createComment(), HTMLDocument_put_title(), HTMLDocumentNode_invoke(), HTMLDOMAttribute_get_specified(), HTMLDOMNode_put_nodeValue(), HTMLDOMTextNode2_appendData(), HTMLDOMTextNode_put_data(), HTMLElement2_getElementsByTagName(), HTMLElement2_put_dir(), HTMLElement3_put_contentEditable(), HTMLElement_insertAdjacentHTML(), HTMLElement_insertAdjacentText(), HTMLElement_put_className(), HTMLElement_put_id(), HTMLElement_put_innerHTML(), HTMLElement_put_innerText(), HTMLElement_put_title(), HTMLFormElement_put_action(), HTMLFormElement_put_encoding(), HTMLFormElement_put_method(), HTMLFormElement_put_name(), HTMLFormElement_put_target(), HTMLFrameBase_put_frameBorder(), HTMLFrameBase_put_marginHeight(), HTMLFrameBase_put_marginWidth(), HTMLFrameBase_put_name(), HTMLFrameBase_put_scrolling(), HTMLFrameBase_put_src(), HTMLIFrameElement2_put_height(), HTMLIFrameElement2_put_width(), HTMLImgElement_put_align(), HTMLImgElement_put_alt(), HTMLImgElement_put_src(), HTMLInputElement_put_defaultValue(), HTMLInputElement_put_name(), HTMLInputElement_put_src(), HTMLInputElement_put_type(), HTMLInputElement_put_value(), HTMLLabelElement_put_htmlFor(), HTMLLinkElement_put_href(), HTMLLinkElement_put_media(), HTMLLinkElement_put_rel(), HTMLLinkElement_put_rev(), HTMLLinkElement_put_type(), HTMLObjectElement_put_height(), HTMLObjectElement_put_name(), HTMLObjectElement_put_width(), HTMLOptionElement_put_text(), HTMLOptionElement_put_value(), HTMLScriptElement_put_src(), HTMLScriptElement_put_text(), HTMLSelectElement_put_name(), HTMLSelectElement_put_value(), HTMLStyle_put_cssText(), HTMLStyle_removeAttribute(), HTMLStyleElement_put_media(), HTMLStyleElement_put_type(), HTMLStyleSheet_put_cssText(), HTMLTable3_put_summary(), HTMLTable_put_align(), HTMLTable_put_cellSpacing(), HTMLTable_put_frame(), HTMLTableCell_put_align(), HTMLTableRow_put_align(), HTMLTableRow_put_vAlign(), HTMLTextAreaElement_put_defaultValue(), HTMLTextAreaElement_put_value(), HTMLTxtRange_pasteHTML(), HTMLTxtRange_put_text(), HTMLWindow2_put_name(), HTMLXMLHttpRequest_bind_event(), init_event(), navigate_fragment(), replace_node_by_html(), set_event_info(), set_font_size(), set_nsstyle_attr(), set_opacity(), update_window_doc(), and variant_to_nsastr().

◆ nscolor_to_str()

HRESULT nscolor_to_str ( LPCWSTR  color,
BSTR ret 
)

Definition at line 111 of file htmlbody.c.

112{
113 unsigned int i;
114 int rgb = -1;
115
116 static const WCHAR formatW[] = {'#','%','0','2','x','%','0','2','x','%','0','2','x',0};
117
118 if(!color || !*color) {
119 *ret = NULL;
120 return S_OK;
121 }
122
123 if(*color != '#') {
124 for(i=0; i < sizeof(keyword_table)/sizeof(keyword_table[0]); i++) {
127 }
128 }
129 if(rgb == -1)
131
133 if(!*ret)
134 return E_OUTOFMEMORY;
135
136 sprintfW(*ret, formatW, rgb>>16, (rgb>>8)&0xff, rgb&0xff);
137
138 TRACE("%s -> %s\n", debugstr_w(color), debugstr_w(*ret));
139 return S_OK;
140}
GLuint color
Definition: glext.h:6243
static const struct @488 keyword_table[]
static int loose_hex_to_rgb(const WCHAR *hex)
Definition: htmlbody.c:93
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define sprintfW
Definition: unicode.h:58
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3521

Referenced by HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_text(), HTMLTable_get_bgColor(), HTMLTableCell_get_bgColor(), and HTMLTableRow_get_bgColor().

◆ NSContainer_Release()

void NSContainer_Release ( NSContainer This)

Definition at line 2107 of file nsembed.c.

2108{
2109 TRACE("(%p)\n", This);
2110
2111 This->doc = NULL;
2112
2113 ShowWindow(This->hwnd, SW_HIDE);
2114 SetParent(This->hwnd, NULL);
2115
2116 nsIBaseWindow_SetVisibility(This->window, FALSE);
2117 nsIBaseWindow_Destroy(This->window);
2118
2119 nsIWebBrowser_SetContainerWindow(This->webbrowser, NULL);
2120
2121 nsIWebBrowser_Release(This->webbrowser);
2122 This->webbrowser = NULL;
2123
2124 nsIWebNavigation_Release(This->navigation);
2125 This->navigation = NULL;
2126
2127 nsIBaseWindow_Release(This->window);
2128 This->window = NULL;
2129
2130 nsIWebBrowserFocus_Release(This->focus);
2131 This->focus = NULL;
2132
2133 if(This->editor_controller) {
2134 nsIController_Release(This->editor_controller);
2135 This->editor_controller = NULL;
2136 }
2137
2138 if(This->editor) {
2139 nsIEditor_Release(This->editor);
2140 This->editor = NULL;
2141 }
2142
2143 if(This->content_listener) {
2144 nsIURIContentListener_Release(This->content_listener);
2145 This->content_listener = NULL;
2146 }
2147
2148 if(This->hwnd) {
2149 DestroyWindow(This->hwnd);
2150 This->hwnd = NULL;
2151 }
2152
2153 nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
2154}
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by CustomDoc_Release().

◆ nsfree()

void nsfree ( void mem)

Definition at line 783 of file nsembed.c.

784{
785 NS_Free(mem);
786}

Referenced by exec_fontname(), and is_supported_doc_mime().

◆ nsnode_to_nsstring()

HRESULT nsnode_to_nsstring ( nsIDOMNode nsnode,
nsAString str 
)

Definition at line 1000 of file nsembed.c.

1001{
1002 nsIContentSerializer *serializer;
1003 nsresult nsres;
1004 HRESULT hres;
1005
1006 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
1007 NS_HTMLSERIALIZER_CONTRACTID, NULL, &IID_nsIContentSerializer,
1008 (void**)&serializer);
1009 if(NS_FAILED(nsres)) {
1010 ERR("Could not get nsIContentSerializer: %08x\n", nsres);
1011 return E_FAIL;
1012 }
1013
1014 nsres = nsIContentSerializer_Init(serializer, 0, 100, NULL, FALSE, FALSE /* FIXME */);
1015 if(NS_FAILED(nsres))
1016 ERR("Init failed: %08x\n", nsres);
1017
1018 hres = nsnode_to_nsstring_rec(serializer, nsnode, str);
1019 if(SUCCEEDED(hres)) {
1020 nsres = nsIContentSerializer_Flush(serializer, str);
1021 if(NS_FAILED(nsres))
1022 ERR("Flush failed: %08x\n", nsres);
1023 }
1024
1025 nsIContentSerializer_Release(serializer);
1026 return hres;
1027}
static HRESULT nsnode_to_nsstring_rec(nsIContentSerializer *serializer, nsIDOMNode *nsnode, nsAString *str)
Definition: nsembed.c:922
#define NS_HTMLSERIALIZER_CONTRACTID
Definition: nsembed.c:29

Referenced by get_doc_string(), HTMLElement_get_outerHTML(), and HTMLTxtRange_get_htmlText().

◆ nsrefcnt()

nsrefcnt ( __cdecl ccref_incr)

◆ nsuri_to_url()

HRESULT nsuri_to_url ( LPCWSTR  nsuri,
BOOL  ret_empty,
BSTR ret 
)

Definition at line 175 of file nsio.c.

176{
177 const WCHAR *ptr = nsuri;
178
179 static const WCHAR wine_prefixW[] = {'w','i','n','e',':'};
180
181 if(!strncmpW(nsuri, wine_prefixW, sizeof(wine_prefixW)/sizeof(WCHAR)))
182 ptr += sizeof(wine_prefixW)/sizeof(WCHAR);
183
184 if(*ptr || ret_empty) {
186 if(!*ret)
187 return E_OUTOFMEMORY;
188 }else {
189 *ret = NULL;
190 }
191
192 TRACE("%s -> %s\n", debugstr_w(nsuri), debugstr_w(*ret));
193 return S_OK;
194}
#define strncmpW(s1, s2, n)
Definition: unicode.h:36

Referenced by HTMLAnchorElement_get_href(), HTMLFormElement_get_action(), HTMLImgElement_get_src(), and HTMLInputElement_get_src().

◆ nswindow_to_window()

HTMLOuterWindow * nswindow_to_window ( const nsIDOMWindow nswindow)

Definition at line 3099 of file htmlwindow.c.

3100{
3101 HTMLOuterWindow *iter;
3102
3104 if(iter->nswindow == nswindow)
3105 return iter;
3106 }
3107
3108 return NULL;
3109}
nsIDOMWindow * nswindow

Referenced by get_channel_window(), get_elem_window(), get_frame_by_index(), get_frame_by_name(), nsPromptService_Alert(), and set_frame_doc().

◆ OmNavigator_Create()

IOmNavigator * OmNavigator_Create ( void  )

Definition at line 1079 of file omnavigator.c.

1080{
1082
1083 ret = heap_alloc_zero(sizeof(*ret));
1084 if(!ret)
1085 return NULL;
1086
1087 ret->IOmNavigator_iface.lpVtbl = &OmNavigatorVtbl;
1088 ret->ref = 1;
1089
1090 init_dispex(&ret->dispex, (IUnknown*)&ret->IOmNavigator_iface, &OmNavigator_dispex);
1091
1092 return &ret->IOmNavigator_iface;
1093}
static const IOmNavigatorVtbl OmNavigatorVtbl
Definition: omnavigator.c:1038
static dispex_static_data_t OmNavigator_dispex
Definition: omnavigator.c:1072

Referenced by HTMLWindow2_get_navigator().

◆ ProtocolFactory_Create()

HRESULT ProtocolFactory_Create ( REFCLSID  rclsid,
REFIID  riid,
void **  ppv 
)

Definition at line 1038 of file protocol.c.

1039{
1041
1042 if(IsEqualGUID(&CLSID_AboutProtocol, rclsid))
1044 else if(IsEqualGUID(&CLSID_ResProtocol, rclsid))
1046 else if(IsEqualGUID(&CLSID_JSProtocol, rclsid))
1048
1049 if(!cf) {
1050 FIXME("not implemented protocol %s\n", debugstr_guid(rclsid));
1052 }
1053
1054 return IInternetProtocolInfo_QueryInterface(&cf->IInternetProtocolInfo_iface, riid, ppv);
1055}
static ProtocolFactory JSProtocolFactory
Definition: protocol.c:1033
static ProtocolFactory ResProtocolFactory
Definition: protocol.c:950
static ProtocolFactory AboutProtocolFactory
Definition: protocol.c:496
CLSID CLSID_AboutProtocol

Referenced by DllGetClassObject().

◆ push_task()

HRESULT push_task ( task_t task,
task_proc_t  proc,
task_proc_t  destr,
LONG  magic 
)

Definition at line 39 of file task.c.

40{
42
44 if(!thread_data) {
45 if(destr)
46 destr(task);
47 else
48 heap_free(task);
49 return E_OUTOFMEMORY;
50 }
51
52 task->target_magic = magic;
53 task->proc = proc;
54 task->destr = destr ? destr : default_task_destr;
55
56 list_add_tail(&thread_data->task_list, &task->entry);
57
58 PostMessageW(thread_data->thread_hwnd, WM_PROCESSTASK, 0, 0);
59 return S_OK;
60}
static void default_task_destr(task_t *task)
Definition: task.c:34
#define WM_PROCESSTASK
Definition: task.c:21
static HANDLE proc()
Definition: pdb.c:34
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by async_open(), async_start_doc_binding(), async_stop_request(), exec_refresh(), set_moniker(), set_ready_state(), set_script_elem_readystate(), and super_navigate().

◆ register_nsservice()

void register_nsservice ( nsIComponentRegistrar registrar,
nsIServiceManager service_manager 
)

Definition at line 372 of file nsservice.c.

373{
374 nsresult nsres;
375
376 nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_PROMPTSERVICE_CID,
378 if(NS_FAILED(nsres))
379 ERR("RegisterFactory failed: %08x\n", nsres);
380
381 nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_TOOLTIPTEXTPROVIDER_CID,
384 if(NS_FAILED(nsres))
385 ERR("RegisterFactory failed: %08x\n", nsres);
386}
static const nsIID NS_PROMPTSERVICE_CID
Definition: nsservice.c:26
#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME
Definition: nsservice.c:24
static nsServiceFactory nsTooltipTextFactory
Definition: nsservice.c:367
#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID
Definition: nsservice.c:22
#define NS_PROMPTSERVICE_CONTRACTID
Definition: nsservice.c:21
static const nsIID NS_TOOLTIPTEXTPROVIDER_CID
Definition: nsservice.c:28
static nsServiceFactory nsPromptServiceFactory
Definition: nsservice.c:362
nsIFactory nsIFactory_iface
Definition: nsservice.c:296

Referenced by init_xpcom().

◆ release_dispex()

void release_dispex ( DispatchEx This)

Definition at line 1706 of file dispex.c.

1707{
1708 dynamic_prop_t *prop;
1709
1710 if(!This->dynamic_data)
1711 return;
1712
1713 for(prop = This->dynamic_data->props; prop < This->dynamic_data->props + This->dynamic_data->prop_cnt; prop++) {
1714 VariantClear(&prop->var);
1715 heap_free(prop->name);
1716 }
1717
1718 heap_free(This->dynamic_data->props);
1719
1720 if(This->dynamic_data->func_disps) {
1721 func_obj_entry_t *iter;
1722
1723 for(iter = This->dynamic_data->func_disps; iter < This->dynamic_data->func_disps+This->data->data->func_disp_cnt; iter++) {
1724 if(iter->func_obj) {
1725 iter->func_obj->obj = NULL;
1726 IDispatchEx_Release(&iter->func_obj->dispex.IDispatchEx_iface);
1727 }
1728 VariantClear(&iter->val);
1729 }
1730
1731 heap_free(This->dynamic_data->func_disps);
1732 }
1733
1734 heap_free(This->dynamic_data);
1735}
LPWSTR name
Definition: dispex.c:59
DispatchEx dispex
Definition: dispex.c:66
DispatchEx * obj
Definition: dispex.c:69
Definition: dispex.c:73
VARIANT val
Definition: dispex.c:75
func_disp_t * func_obj
Definition: dispex.c:74

◆ release_document_mutation()

void release_document_mutation ( HTMLDocumentNode doc)

Definition at line 743 of file mutation.c.

744{
745 nsIDocument *nsdoc;
746 nsresult nsres;
747
748 nsres = nsIDOMHTMLDocument_QueryInterface(doc->nsdoc, &IID_nsIDocument, (void**)&nsdoc);
749 if(NS_FAILED(nsres)) {
750 ERR("Could not get nsIDocument: %08x\n", nsres);
751 return;
752 }
753
754 nsIContentUtils_RemoveDocumentObserver(content_utils, nsdoc, &doc->nsIDocumentObserver_iface);
755 nsIDocument_Release(nsdoc);
756}

Referenced by HTMLDocumentNode_unlink().

◆ release_nsio()

void release_nsio ( void  )

Definition at line 4085 of file nsio.c.

4086{
4087 if(net_util) {
4088 nsINetUtil_Release(net_util);
4089 net_util = NULL;
4090 }
4091
4092 if(nsio) {
4093 nsIIOService_Release(nsio);
4094 nsio = NULL;
4095 }
4096}

Referenced by close_gecko().

◆ release_typelib()

void release_typelib ( void  )

Definition at line 159 of file apps.c.

160{
161 unsigned i;
162
163 for (i = 0; i < ARRAY_SIZE(typeinfo); i++)
164 if (typeinfo[i])
165 ITypeInfo_Release(typeinfo[i]);
166
167 if (typelib)
168 ITypeLib_Release(typelib);
169}
static ITypeLib * typelib
Definition: apps.c:108
#define ARRAY_SIZE(A)
Definition: main.h:33

◆ remove_attribute()

HRESULT remove_attribute ( DispatchEx This,
DISPID  id,
VARIANT_BOOL success 
)

Definition at line 1249 of file dispex.c.

1250{
1251 switch(get_dispid_type(id)) {
1252 case DISPEXPROP_CUSTOM:
1253 FIXME("DISPEXPROP_CUSTOM not supported\n");
1254 return E_NOTIMPL;
1255
1256 case DISPEXPROP_DYNAMIC: {
1257 DWORD idx = id - DISPID_DYNPROP_0;
1258 dynamic_prop_t *prop;
1259
1260 prop = This->dynamic_data->props+idx;
1261 VariantClear(&prop->var);
1262 prop->flags |= DYNPROP_DELETED;
1263 *success = VARIANT_TRUE;
1264 return S_OK;
1265 }
1266 case DISPEXPROP_BUILTIN: {
1267 VARIANT var;
1268 DISPPARAMS dp = {&var,NULL,1,0};
1271 HRESULT hres;
1272
1274 if(!data)
1275 return E_FAIL;
1276
1277 hres = get_builtin_func(data, id, &func);
1278 if(FAILED(hres))
1279 return hres;
1280
1281 /* For builtin functions, we set their value to the original function. */
1282 if(func->func_disp_idx != -1) {
1284
1285 if(!This->dynamic_data || !This->dynamic_data->func_disps
1286 || !This->dynamic_data->func_disps[func->func_disp_idx].func_obj) {
1287 *success = VARIANT_FALSE;
1288 return S_OK;
1289 }
1290
1291 entry = This->dynamic_data->func_disps + func->func_disp_idx;
1292 if(V_VT(&entry->val) == VT_DISPATCH
1293 && V_DISPATCH(&entry->val) == (IDispatch*)&entry->func_obj->dispex.IDispatchEx_iface) {
1294 *success = VARIANT_FALSE;
1295 return S_OK;
1296 }
1297
1298 VariantClear(&entry->val);
1299 V_VT(&entry->val) = VT_DISPATCH;
1300 V_DISPATCH(&entry->val) = (IDispatch*)&entry->func_obj->dispex.IDispatchEx_iface;
1301 IDispatch_AddRef(V_DISPATCH(&entry->val));
1302 *success = VARIANT_TRUE;
1303 return S_OK;
1304 }
1305
1306 V_VT(&var) = VT_EMPTY;
1307 hres = builtin_propput(This, func, &dp, NULL);
1308 if(FAILED(hres))
1309 return hres;
1310
1311 *success = VARIANT_TRUE;
1312 return S_OK;
1313 }
1314 default:
1315 assert(0);
1316 return E_FAIL;
1317 }
1318}
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int idx
Definition: utils.c:41
GLenum func
Definition: glext.h:6028
static HRESULT builtin_propput(DispatchEx *This, func_info_t *func, DISPPARAMS *dp, IServiceProvider *caller)
Definition: dispex.c:983
static HRESULT get_builtin_func(dispex_data_t *data, DISPID id, func_info_t **ret)
Definition: dispex.c:848
#define DYNPROP_DELETED
Definition: dispex.c:63
dispex_prop_type_t get_dispid_type(DISPID id)
Definition: dispex.c:464
static dispex_data_t * get_dispex_data(DispatchEx *This)
Definition: dispex.c:439
DWORD flags
Definition: dispex.c:60
#define success(from, fromstr, to, tostr)

Referenced by HTMLElement_removeAttribute(), and HTMLStyle_removeAttribute().

◆ remove_target_tasks()

void remove_target_tasks ( LONG  target)

Definition at line 107 of file task.c.

108{
110 struct list *liter, *ltmp;
111 task_timer_t *timer;
112 task_t *task;
113
114 if(!thread_data)
115 return;
116
117 LIST_FOR_EACH_SAFE(liter, ltmp, &thread_data->timer_list) {
118 timer = LIST_ENTRY(liter, task_timer_t, entry);
119 if(timer->window->task_magic == target)
120 release_task_timer(thread_data->thread_hwnd, timer);
121 }
122
123 if(!list_empty(&thread_data->timer_list)) {
125
126 timer = LIST_ENTRY(list_head(&thread_data->timer_list), task_timer_t, entry);
127 SetTimer(thread_data->thread_hwnd, TIMER_ID, max( (int)(timer->time - tc), 0 ), NULL);
128 }
129
130 LIST_FOR_EACH_SAFE(liter, ltmp, &thread_data->task_list) {
131 task = LIST_ENTRY(liter, task_t, entry);
132 if(task->target_magic == target) {
133 list_remove(&task->entry);
134 task->destr(task);
135 }
136 }
137}
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
#define TIMER_ID
Definition: task.c:22
const GLfloat * tc
Definition: glext.h:8925
Definition: list.h:15
DWORD time
Definition: task.c:27
#define max(a, b)
Definition: svc.c:63
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)

Referenced by abort_window_bindings(), destroy_htmldoc(), detach_inner_window(), release_outer_window(), set_moniker(), and setup_edit_mode().

◆ replace_node_by_html()

HRESULT replace_node_by_html ( nsIDOMHTMLDocument nsdoc,
nsIDOMNode nsnode,
const WCHAR html 
)

Definition at line 98 of file htmlelem.c.

99{
100 nsIDOMDocumentFragment *nsfragment;
101 nsIDOMNode *nsparent;
104 nsresult nsres;
105 HRESULT hres = S_OK;
106
107 nsres = nsIDOMHTMLDocument_CreateRange(nsdoc, &range);
108 if(NS_FAILED(nsres)) {
109 ERR("CreateRange failed: %08x\n", nsres);
110 return E_FAIL;
111 }
112
114 nsIDOMRange_CreateContextualFragment(range, &html_str, &nsfragment);
115 nsIDOMRange_Release(range);
117 if(NS_FAILED(nsres)) {
118 ERR("CreateContextualFragment failed: %08x\n", nsres);
119 return E_FAIL;
120 }
121
122 nsres = nsIDOMNode_GetParentNode(nsnode, &nsparent);
123 if(NS_SUCCEEDED(nsres) && nsparent) {
124 nsIDOMNode *nstmp;
125
126 nsres = nsIDOMNode_ReplaceChild(nsparent, (nsIDOMNode*)nsfragment, nsnode, &nstmp);
127 nsIDOMNode_Release(nsparent);
128 if(NS_FAILED(nsres)) {
129 ERR("ReplaceChild failed: %08x\n", nsres);
130 hres = E_FAIL;
131 }else if(nstmp) {
132 nsIDOMNode_Release(nstmp);
133 }
134 }else {
135 ERR("GetParentNode failed: %08x\n", nsres);
136 hres = E_FAIL;
137 }
138
139 nsIDOMDocumentFragment_Release(nsfragment);
140 return hres;
141}
GLenum GLint * range
Definition: glext.h:7539
static const char html_str[]
Definition: atl.c:64

Referenced by HTMLElement_put_outerHTML(), and run_insert_comment().

◆ return_nsstr()

HRESULT return_nsstr ( nsresult  nsres,
nsAString nsstr,
BSTR p 
)

Definition at line 841 of file nsembed.c.

842{
843 const PRUnichar *str;
844
845 if(NS_FAILED(nsres)) {
846 ERR("failed: %08x\n", nsres);
847 nsAString_Finish(nsstr);
848 return E_FAIL;
849 }
850
851 nsAString_GetData(nsstr, &str);
852 TRACE("ret %s\n", debugstr_w(str));
853 if(*str) {
854 *p = SysAllocString(str);
855 if(!*p)
856 return E_OUTOFMEMORY;
857 }else {
858 *p = NULL;
859 }
860
861 nsAString_Finish(nsstr);
862 return S_OK;
863}
UINT32 nsAString_GetData(const nsAString *str, const PRUnichar **data)
Definition: nsembed.c:831

Referenced by HTMLAnchorElement_get_hash(), HTMLAnchorElement_get_hostname(), HTMLAnchorElement_get_name(), HTMLAnchorElement_get_rel(), HTMLAnchorElement_get_search(), HTMLAnchorElement_get_target(), HTMLBodyElement_get_background(), HTMLButtonElement_get_name(), HTMLDocument5_get_compatMode(), HTMLDocument_get_charset(), HTMLDOMNode_get_nodeName(), HTMLDOMTextNode_get_data(), HTMLElement2_get_dir(), HTMLElement3_get_contentEditable(), HTMLElement_get_className(), HTMLElement_get_id(), HTMLElement_get_innerHTML(), HTMLElement_get_tagName(), HTMLElement_get_title(), HTMLFormElement_get_encoding(), HTMLFormElement_get_method(), HTMLFormElement_get_name(), HTMLFormElement_get_target(), HTMLFrameBase_get_frameBorder(), HTMLFrameBase_get_name(), HTMLFrameBase_get_src(), HTMLIFrameElement2_get_height(), HTMLIFrameElement2_get_width(), HTMLImgElement_get_align(), HTMLImgElement_get_alt(), HTMLImgElement_get_name(), HTMLInputElement_get_defaultValue(), HTMLInputElement_get_name(), HTMLInputElement_get_type(), HTMLInputElement_get_value(), HTMLLinkElement_get_href(), HTMLLinkElement_get_media(), HTMLLinkElement_get_rel(), HTMLLinkElement_get_rev(), HTMLLinkElement_get_type(), HTMLObjectElement_get_name(), HTMLOptionElement_get_text(), HTMLOptionElement_get_value(), HTMLScriptElement_get_src(), HTMLScriptElement_get_text(), HTMLScriptElement_get_type(), HTMLSelectElement_get_name(), HTMLSelectElement_get_type(), HTMLSelectElement_get_value(), HTMLStyleElement_get_media(), HTMLStyleElement_get_type(), HTMLStyleSheet_get_cssText(), HTMLStyleSheet_get_href(), HTMLTable3_get_summary(), HTMLTable_get_align(), HTMLTable_get_cellSpacing(), HTMLTable_get_frame(), HTMLTableCell_get_align(), HTMLTableRow_get_align(), HTMLTableRow_get_vAlign(), HTMLTextAreaElement_get_defaultValue(), HTMLTextAreaElement_get_name(), HTMLTextAreaElement_get_value(), HTMLWindow2_get_name(), HTMLXMLHttpRequest_get_responseText(), and return_nsstr_variant().

◆ return_nsstr_variant()

static HRESULT return_nsstr_variant ( nsresult  nsres,
nsAString nsstr,
VARIANT p 
)
inlinestatic

Definition at line 896 of file mshtml_private.h.

897{
898 V_VT(p) = VT_BSTR;
899 return return_nsstr(nsres, nsstr, &V_BSTR(p));
900}
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841

Referenced by HTMLTable_get_cellPadding().

◆ search_window_props()

HRESULT search_window_props ( HTMLInnerWindow This,
BSTR  bstrName,
DWORD  grfdex,
DISPID pid 
)

Definition at line 2513 of file htmlwindow.c.

2514{
2515 DWORD i;
2516 ScriptHost *script_host;
2517 DISPID id;
2518
2519 for(i=0; i < This->global_prop_cnt; i++) {
2520 /* FIXME: case sensitivity */
2521 if(!strcmpW(This->global_props[i].name, bstrName)) {
2523 return S_OK;
2524 }
2525 }
2526
2527 if(find_global_prop(This->base.inner_window, bstrName, grfdex, &script_host, &id)) {
2528 global_prop_t *prop;
2529
2530 prop = alloc_global_prop(This, GLOBAL_SCRIPTVAR, bstrName);
2531 if(!prop)
2532 return E_OUTOFMEMORY;
2533
2534 prop->script_host = script_host;
2535 prop->id = id;
2536
2537 *pid = prop_to_dispid(This, prop);
2538 return S_OK;
2539 }
2540
2541 return DISP_E_UNKNOWNNAME;
2542}
BOOL find_global_prop(HTMLInnerWindow *, BSTR, DWORD, ScriptHost **, DISPID *) DECLSPEC_HIDDEN
Definition: script.c:1500
static global_prop_t * alloc_global_prop(HTMLInnerWindow *This, global_prop_type_t type, BSTR name)
Definition: htmlwindow.c:2481
static DWORD prop_to_dispid(HTMLInnerWindow *This, global_prop_t *prop)
Definition: htmlwindow.c:2508
#define MSHTML_DISPID_CUSTOM_MIN
#define strcmpW(s1, s2)
Definition: unicode.h:38
ScriptHost * script_host
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515

Referenced by HTMLFrameElement_get_dispid(), HTMLIFrame_get_dispid(), and WindowDispEx_GetDispID().

◆ set_dirty()

void set_dirty ( HTMLDocument This,
VARIANT_BOOL  dirty 
)

Definition at line 81 of file editor.c.

82{
83 nsresult nsres;
84
85 if(This->doc_obj->usermode != EDITMODE || !This->doc_obj->nscontainer || !This->doc_obj->nscontainer->editor)
86 return;
87
88 if(dirty) {
89 nsres = nsIEditor_IncrementModificationCount(This->doc_obj->nscontainer->editor, 1);
90 if(NS_FAILED(nsres))
91 ERR("IncrementModificationCount failed: %08x\n", nsres);
92 }else {
93 nsres = nsIEditor_ResetModificationCount(This->doc_obj->nscontainer->editor);
94 if(NS_FAILED(nsres))
95 ERR("ResetModificationCount failed: %08x\n", nsres);
96 }
97}
r dirty
Definition: btrfs.c:3004

Referenced by exec_setdirty(), and set_font_size().

◆ set_document_navigation()

void set_document_navigation ( HTMLDocumentObj doc,
BOOL  doc_can_navigate 
)

Definition at line 193 of file oleobj.c.

194{
195 VARIANT var;
196
197 if(!doc->client_cmdtrg)
198 return;
199
200 if(doc_can_navigate) {
201 V_VT(&var) = VT_UNKNOWN;
203 }
204
205 IOleCommandTarget_Exec(doc->client_cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0,
206 doc_can_navigate ? &var : NULL, NULL);
207}
@ VT_UNKNOWN
Definition: compat.h:2308
#define DOCHOST_DOCCANNAVIGATE
Definition: oleobj.c:21
#define V_UNKNOWN(A)
Definition: oleauto.h:281
IOleCommandTarget * client_cmdtrg

Referenced by handle_extern_mime_navigation(), and OleObject_SetClientSite().

◆ set_download_state()

void set_download_state ( HTMLDocumentObj doc,
int  state 
)

Definition at line 170 of file persist.c.

171{
172 if(doc->client) {
173 IOleCommandTarget *olecmd;
175
176 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
177 if(SUCCEEDED(hres)) {
178 VARIANT var;
179
180 V_VT(&var) = VT_I4;
181 V_I4(&var) = state;
182
183 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE,
184 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
185 IOleCommandTarget_Release(olecmd);
186 }
187 }
188
189 doc->download_state = state;
190}
static int state
Definition: maze.c:121
@ VT_I4
Definition: compat.h:2298
#define V_I4(A)
Definition: oleauto.h:247

Referenced by handle_docobj_load(), navigate_javascript_proc(), and set_downloading_proc().

◆ set_frame_doc()

HRESULT set_frame_doc ( HTMLFrameBase frame,
nsIDOMDocument nsdoc 
)

Definition at line 26 of file htmlframebase.c.

27{
28 nsIDOMWindow *nswindow;
30 nsresult nsres;
32
33 if(frame->content_window)
34 return S_OK;
35
36 nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
37 if(NS_FAILED(nsres) || !nswindow)
38 return E_FAIL;
39
40 window = nswindow_to_window(nswindow);
41 if(!window)
44 nsIDOMWindow_Release(nswindow);
45 if(FAILED(hres))
46 return hres;
47
48 frame->content_window = window;
49 window->frame_element = frame;
50 return S_OK;
51}
HTMLOuterWindow * content_window

Referenced by HTMLFrameElement_bind_to_tree(), and HTMLIFrame_bind_to_tree().

◆ set_ready_state()

void set_ready_state ( HTMLOuterWindow window,
READYSTATE  readystate 
)

Definition at line 450 of file persist.c.

451{
452 READYSTATE prev_state = window->readystate;
453
454 window->readystate = readystate;
455
456 if(window->readystate_locked) {
457 readystate_task_t *task;
459
460 if(window->readystate_pending || prev_state == readystate)
461 return;
462
463 task = heap_alloc(sizeof(*task));
464 if(!task)
465 return;
466
467 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
468 task->window = window;
469
471 if(SUCCEEDED(hres))
472 window->readystate_pending = TRUE;
473 return;
474 }
475
477}
static void notif_readystate_destr(task_t *_task)
Definition: persist.c:444
static void notif_readystate(HTMLOuterWindow *window)
Definition: persist.c:418
static void notif_readystate_proc(task_t *_task)
Definition: persist.c:438
HTMLOuterWindow * window
Definition: persist.c:435

Referenced by handle_load(), on_start_nsrequest(), run_end_load(), and set_moniker().

◆ set_statustext()

void set_statustext ( HTMLDocumentObj doc,
INT  id,
LPCWSTR  arg 
)

Definition at line 111 of file main.c.

112{
113 int index = id - IDS_STATUS_FIRST;
115 DWORD len;
116
117 if(!doc->frame)
118 return;
119
120 if(!p) {
121 len = 255;
122 p = heap_alloc(len * sizeof(WCHAR));
123 len = LoadStringW(hInst, id, p, len) + 1;
124 p = heap_realloc(p, len * sizeof(WCHAR));
126 heap_free(p);
128 }
129 }
130
131 if(arg) {
132 WCHAR *buf;
133
134 len = lstrlenW(p) + lstrlenW(arg) - 1;
135 buf = heap_alloc(len * sizeof(WCHAR));
136
137 snprintfW(buf, len, p, arg);
138
139 p = buf;
140 }
141
142 IOleInPlaceFrame_SetStatusText(doc->frame, p);
143
144 if(arg)
145 heap_free(p);
146}
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
#define index(s, c)
Definition: various.h:29
#define lstrlenW
Definition: compat.h:750
HINSTANCE hInst
Definition: main.c:30
static WCHAR * status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1]
Definition: main.c:42
#define IDS_STATUS_FIRST
Definition: resource.h:23
GLuint index
Definition: glext.h:6031
#define snprintfW
Definition: unicode.h:60
IOleInPlaceFrame * frame

Referenced by handle_load(), and set_downloading_proc().

◆ set_task_timer()

HRESULT set_task_timer ( HTMLInnerWindow window,
DWORD  msec,
BOOL  interval,
IDispatch disp,
LONG id 
)

Definition at line 169 of file task.c.

170{
172 task_timer_t *timer;
174
175 static DWORD id_cnt = 0x20000000;
176
178 if(!thread_data)
179 return E_OUTOFMEMORY;
180
181 timer = heap_alloc(sizeof(task_timer_t));
182 if(!timer)
183 return E_OUTOFMEMORY;
184
185 timer->id = id_cnt++;
186 timer->window = window;
187 timer->time = tc + msec;
188 timer->interval = interval ? msec : 0;
189 list_init(&timer->entry);
190
191 IDispatch_AddRef(disp);
192 timer->disp = disp;
193
194 if(queue_timer(thread_data, timer))
195 SetTimer(thread_data->thread_hwnd, TIMER_ID, msec, NULL);
196
197 *id = timer->id;
198 return S_OK;
199}
struct list entry
Definition: task.c:31
IDispatch * disp
Definition: task.c:29

Referenced by window_set_timer().

◆ set_viewer_zoom()

void set_viewer_zoom ( NSContainer nscontainer,
float  factor 
)

Definition at line 1130 of file nsembed.c.

1131{
1132 nsIContentViewer *content_viewer;
1133 nsIDocShell *doc_shell;
1134 nsresult nsres;
1135
1136 TRACE("Setting to %f\n", factor);
1137
1138 nsres = get_nsinterface((nsISupports*)nscontainer->navigation, &IID_nsIDocShell, (void**)&doc_shell);
1139 assert(nsres == NS_OK);
1140
1141 nsres = nsIDocShell_GetContentViewer(doc_shell, &content_viewer);
1142 assert(nsres == NS_OK && content_viewer);
1143 nsIDocShell_Release(doc_shell);
1144
1145 nsres = nsIContentViewer_SetFullZoom(content_viewer, factor);
1146 if(NS_FAILED(nsres))
1147 ERR("SetFullZoom failed: %08x\n", nsres);
1148
1149 nsIContentViewer_Release(content_viewer);
1150}
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 factor
Definition: glfuncs.h:178
nsIWebNavigation * navigation

Referenced by exec_optical_zoom(), and load_settings().

◆ setup_edit_mode()

HRESULT setup_edit_mode ( HTMLDocumentObj doc)

Definition at line 1221 of file editor.c.

1222{
1223 IMoniker *mon;
1224 HRESULT hres;
1225
1226 if(doc->usermode == EDITMODE)
1227 return S_OK;
1228
1229 doc->usermode = EDITMODE;
1230
1231 if(doc->basedoc.window->mon) {
1233 hres = IMoniker_GetClassID(doc->basedoc.window->mon, &clsid);
1234 if(SUCCEEDED(hres)) {
1235 /* We should use IMoniker::Save here */
1236 FIXME("Use CLSID %s\n", debugstr_guid(&clsid));
1237 }
1238 }
1239
1240 if(doc->frame)
1241 IOleInPlaceFrame_SetStatusText(doc->frame, NULL);
1242
1243 doc->basedoc.window->readystate = READYSTATE_UNINITIALIZED;
1244
1245 if(doc->client) {
1246 IOleCommandTarget *cmdtrg;
1247
1248 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
1249 if(SUCCEEDED(hres)) {
1250 VARIANT var;
1251
1252 V_VT(&var) = VT_I4;
1253 V_I4(&var) = 0;
1254 IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL);
1255
1256 IOleCommandTarget_Release(cmdtrg);
1257 }
1258 }
1259
1260 if(doc->hostui) {
1261 DOCHOSTUIINFO hostinfo;
1262
1263 memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO));
1264 hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
1265 hres = IDocHostUIHandler_GetHostInfo(doc->hostui, &hostinfo);
1266 if(SUCCEEDED(hres))
1267 /* FIXME: use hostinfo */
1268 TRACE("hostinfo = {%u %08x %08x %s %s}\n",
1269 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
1270 debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
1271 }
1272
1274
1275 if(doc->basedoc.window->mon) {
1276 /* FIXME: We should find nicer way to do this */
1278
1279 mon = doc->basedoc.window->mon;
1280 IMoniker_AddRef(mon);
1281 }else {
1282 static const WCHAR about_blankW[] = {'a','b','o','u','t',':','b','l','a','n','k',0};
1283
1285 if(FAILED(hres)) {
1286 FIXME("CreateURLMoniker failed: %08x\n", hres);
1287 return hres;
1288 }
1289 }
1290
1291 hres = IPersistMoniker_Load(&doc->basedoc.IPersistMoniker_iface, TRUE, mon, NULL, 0);
1292 IMoniker_Release(mon);
1293 if(FAILED(hres))
1294 return hres;
1295
1296 if(doc->ui_active) {
1297 if(doc->ip_window)
1299 if(doc->hostui)
1300 IDocHostUIHandler_HideUI(doc->hostui);
1301 }
1302
1303 if(doc->ui_active) {
1304 RECT rcBorderWidths;
1305
1306 if(doc->hostui)
1307 IDocHostUIHandler_ShowUI(doc->hostui, DOCHOSTUITYPE_AUTHOR,
1309 doc->frame, doc->ip_window);
1310
1311 if(doc->ip_window)
1313
1314 memset(&rcBorderWidths, 0, sizeof(rcBorderWidths));
1315 if(doc->frame)
1316 IOleInPlaceFrame_SetBorderSpace(doc->frame, &rcBorderWidths);
1317 }
1318
1319 return S_OK;
1320}
REFCLSID clsid
Definition: msctf.c:82
coclass HostDialogHelper DOCHOSTUITYPE_AUTHOR
static const WCHAR about_blankW[]
Definition: persist.c:24
HRESULT call_set_active_object(IOleInPlaceUIWindow *, IOleInPlaceActiveObject *) DECLSPEC_HIDDEN
Definition: view.c:398
#define memset(x, y, z)
Definition: compat.h:39
IOleInPlaceUIWindow * ip_window
IDocHostUIHandler * hostui
IPersistMoniker IPersistMoniker_iface
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface
IOleCommandTarget IOleCommandTarget_iface
READYSTATE readystate
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732

Referenced by exec_editmode(), and HTMLDocument_put_designMode().

◆ show_context_menu()

void show_context_menu ( HTMLDocumentObj This,
DWORD  dwID,
POINT ppt,
IDispatch elem 
)

Definition at line 936 of file olecmd.c.

937{
938 HMENU menu_res, menu;
939 DWORD cmdid;
940
941 if(This->hostui && S_OK == IDocHostUIHandler_ShowContextMenu(This->hostui,
942 dwID, ppt, (IUnknown*)&This->basedoc.IOleCommandTarget_iface, elem))
943 return;
944
946 menu = GetSubMenu(menu_res, dwID);
947
949 ppt->x, ppt->y, 0, This->hwnd, NULL);
950 DestroyMenu(menu_res);
951
952 if(cmdid)
953 IOleCommandTarget_Exec(&This->basedoc.IOleCommandTarget_iface, &CGID_MSHTML, cmdid, 0,
954 NULL, NULL);
955}
HINSTANCE get_shdoclc(void)
Definition: main.c:162
#define IDR_BROWSE_CONTEXT_MENU
Definition: resource.h:37
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define TPM_RIGHTBUTTON
Definition: winuser.h:2380
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define TPM_LEFTALIGN
Definition: winuser.h:2377
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define TPM_RETURNCMD
Definition: winuser.h:2387

Referenced by nsContextMenuListener_OnShowContextMenu().

◆ show_tooltip()

void show_tooltip ( HTMLDocumentObj This,
DWORD  x,
DWORD  y,
LPCWSTR  text 
)

Definition at line 368 of file view.c.

369{
370 TTTOOLINFOW toolinfo = {
371 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
372 {x>2 ? x-2 : 0, y>0 ? y-2 : 0, x+2, y+2}, /* FIXME */
373 NULL, (LPWSTR)text, 0};
374 MSG msg = {This->hwnd, WM_MOUSEMOVE, 0, MAKELPARAM(x,y), 0, {x,y}};
375
376 TRACE("(%p)->(%d %d %s)\n", This, x, y, debugstr_w(text));
377
378 if(!This->tooltips_hwnd)
380
381 SendMessageW(This->tooltips_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&toolinfo);
382 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, TRUE, 0);
383 SendMessageW(This->tooltips_hwnd, TTM_RELAYEVENT, 0, (LPARAM)&msg);
384}
#define msg(x)
Definition: auth_time.c:54
static void create_tooltips_window(HTMLDocumentObj *This)
Definition: view.c:349
const WCHAR * text
Definition: package.c:1799
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define TTM_RELAYEVENT
Definition: commctrl.h:1792
#define TTM_ADDTOOLW
Definition: commctrl.h:1787
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
#define WM_MOUSEMOVE
Definition: winuser.h:1775

Referenced by nsTooltipListener_OnShowTooltip().

◆ start_binding()

HRESULT start_binding ( HTMLInnerWindow inner_window,
BSCallback bscallback,
IBindCtx bctx 
)

Definition at line 762 of file navigate.c.

763{
764 IStream *str = NULL;
766
767 TRACE("(%p %p %p)\n", inner_window, bscallback, bctx);
768
769 bscallback->window = inner_window;
770
771 /* NOTE: IE7 calls IsSystemMoniker here*/
772
773 if(bctx) {
775 if(SUCCEEDED(hres))
776 IBindCtx_AddRef(bctx);
777 }else {
778 hres = CreateAsyncBindCtx(0, &bscallback->IBindStatusCallback_iface, NULL, &bctx);
779 }
780
781 if(FAILED(hres)) {
782 bscallback->window = NULL;
783 return hres;
784 }
785
786 hres = IMoniker_BindToStorage(bscallback->mon, bctx, NULL, &IID_IStream, (void**)&str);
787 IBindCtx_Release(bctx);
788 if(FAILED(hres)) {
789 WARN("BindToStorage failed: %08x\n", hres);
790 bscallback->window = NULL;
791 return hres;
792 }
793
794 if(str)
795 IStream_Release(str);
796
797 return S_OK;
798}
IMoniker * mon
Definition: binding.h:87
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbscPrevious, DWORD dwReserved)
Definition: bindctx.c:615
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
Definition: bindctx.c:899

Referenced by bind_script_to_text(), navigate_proc(), PersistMoniker_Load(), start_binding_proc(), start_doc_binding_proc(), and super_navigate().

◆ TargetContainer_Init()

void TargetContainer_Init ( HTMLDocumentObj This)

Definition at line 1121 of file oleobj.c.

1122{
1123 This->ITargetContainer_iface.lpVtbl = &TargetContainerVtbl;
1124}
static const ITargetContainerVtbl TargetContainerVtbl
Definition: oleobj.c:1113

Referenced by HTMLDocument_Create().

◆ unsafe_impl_from_IHTMLElement()

HTMLElement * unsafe_impl_from_IHTMLElement ( IHTMLElement *  iface)

Definition at line 1962 of file htmlelem.c.

1963{
1964 return iface->lpVtbl == &HTMLElementVtbl ? impl_from_IHTMLElement(iface) : NULL;
1965}
static HTMLElement * impl_from_IHTMLElement(IHTMLElement *iface)
Definition: htmlelem.c:241

Referenced by HTMLElement2_insertAdjacentElement(), HTMLElement_contains(), HTMLSelectElement_add(), and HTMLTxtRange_moveToElementText().

◆ update_doc()

◆ update_title()

void update_title ( HTMLDocumentObj This)

Definition at line 70 of file view.c.

71{
72 IOleCommandTarget *olecmd;
74
75 if(!(This->update & UPDATE_TITLE))
76 return;
77
78 This->update &= ~UPDATE_TITLE;
79
80 if(!This->client)
81 return;
82
83 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&olecmd);
84 if(SUCCEEDED(hres)) {
86 WCHAR empty[] = {0};
87
88 V_VT(&title) = VT_BSTR;
90 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETTITLE, OLECMDEXECOPT_DONTPROMPTUSER,
91 &title, NULL);
93
94 IOleCommandTarget_Release(olecmd);
95 }
96}
#define UPDATE_TITLE
static const WCHAR empty[]
Definition: main.c:47
static char title[]
Definition: ps.c:92

Referenced by handle_load(), and on_timer().

◆ update_window_doc()

HRESULT update_window_doc ( HTMLInnerWindow window)

Definition at line 3033 of file htmlwindow.c.

3034{
3035 HTMLOuterWindow *outer_window = window->base.outer_window;
3036 nsIDOMHTMLDocument *nshtmldoc;
3037 nsIDOMDocument *nsdoc;
3038 nsresult nsres;
3039 HRESULT hres;
3040
3041 assert(!window->doc);
3042
3043 if(!outer_window) {
3044 ERR("NULL outer window\n");
3045 return E_UNEXPECTED;
3046 }
3047
3048 nsres = nsIDOMWindow_GetDocument(outer_window->nswindow, &nsdoc);
3049 if(NS_FAILED(nsres) || !nsdoc) {
3050 ERR("GetDocument failed: %08x\n", nsres);
3051 return E_FAIL;
3052 }
3053
3054 nsres = nsIDOMDocument_QueryInterface(nsdoc, &IID_nsIDOMHTMLDocument, (void**)&nshtmldoc);
3055 nsIDOMDocument_Release(nsdoc);
3056 if(NS_FAILED(nsres)) {
3057 ERR("Could not get nsIDOMHTMLDocument iface: %08x\n", nsres);
3058 return E_FAIL;
3059 }
3060
3061 hres = create_doc_from_nsdoc(nshtmldoc, outer_window->doc_obj, window, &window->doc);
3062 nsIDOMHTMLDocument_Release(nshtmldoc);
3063 if(FAILED(hres))
3064 return hres;
3065
3066 if(outer_window->doc_obj->usermode == EDITMODE) {
3067 nsAString mode_str;
3068 nsresult nsres;
3069
3070 static const PRUnichar onW[] = {'o','n',0};
3071
3072 nsAString_InitDepend(&mode_str, onW);
3073 nsres = nsIDOMHTMLDocument_SetDesignMode(window->doc->nsdoc, &mode_str);
3074 nsAString_Finish(&mode_str);
3075 if(NS_FAILED(nsres))
3076 ERR("SetDesignMode failed: %08x\n", nsres);
3077 }
3078
3079 if(window != outer_window->pending_window) {
3080 ERR("not current pending window\n");
3081 return S_OK;
3082 }
3083
3084 if(outer_window->base.inner_window)
3085 detach_inner_window(outer_window->base.inner_window);
3086 outer_window->base.inner_window = window;
3087 outer_window->pending_window = NULL;
3088
3089 if(outer_window->doc_obj->basedoc.window == outer_window || !outer_window->doc_obj->basedoc.window) {
3090 if(outer_window->doc_obj->basedoc.doc_node)
3092 outer_window->doc_obj->basedoc.doc_node = window->doc;
3093 htmldoc_addref(&window->doc->basedoc);
3094 }
3095
3096 return hres;
3097}
HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_obj, HTMLInnerWindow *window, HTMLDocumentNode **ret)
Definition: htmldoc.c:4620
static void detach_inner_window(HTMLInnerWindow *window)
Definition: htmlwindow.c:87
HTMLDocumentObj * doc_obj
static const WCHAR onW[]
Definition: lex.c:72

Referenced by HTMLOuterWindow_Create(), and on_start_nsrequest().

◆ variant_to_nscolor()

BOOL variant_to_nscolor ( const VARIANT v,
nsAString nsstr 
)

Definition at line 142 of file htmlbody.c.

143{
144 switch(V_VT(v)) {
145 case VT_BSTR:
146 nsAString_Init(nsstr, V_BSTR(v));
147 return TRUE;
148
149 case VT_I4: {
150 PRUnichar buf[10];
151 static const WCHAR formatW[] = {'#','%','x',0};
152
153 wsprintfW(buf, formatW, V_I4(v));
154 nsAString_Init(nsstr, buf);
155 return TRUE;
156 }
157
158 default:
159 FIXME("invalid color %s\n", debugstr_variant(v));
160 }
161
162 return FALSE;
163
164}
const GLdouble * v
Definition: gl.h:2040
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)

Referenced by HTMLBodyElement_put_aLink(), HTMLBodyElement_put_bgColor(), HTMLBodyElement_put_link(), HTMLBodyElement_put_text(), HTMLBodyElement_put_vLink(), HTMLTable_put_bgColor(), HTMLTableCell_put_bgColor(), and HTMLTableRow_put_bgColor().

◆ void()

void ( __cdecl ccref_init)

◆ windowref_addref()

static void windowref_addref ( windowref_t ref)
inlinestatic

Definition at line 1277 of file mshtml_private.h.

1278{
1280}
Definition: send.c:48

Referenced by set_uri_window().

◆ windowref_release()

static void windowref_release ( windowref_t ref)
inlinestatic

Definition at line 1282 of file mshtml_private.h.

1283{
1284 if(!InterlockedDecrement(&ref->ref))
1285 heap_free(ref);
1286}
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)

Referenced by nsURI_Release(), release_outer_window(), and set_uri_window().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( mshtml  )

◆ wrap_iface()

HRESULT wrap_iface ( IUnknown iface,
IUnknown ref_unk,
IUnknown **  ret 
)

Definition at line 311 of file ifacewrap.c.

312{
313 iface_wrapper_t *wrapper;
314
315 wrapper = heap_alloc(sizeof(*wrapper));
316 if(!wrapper)
317 return E_OUTOFMEMORY;
318
319 wrapper->IUnknown_iface.lpVtbl = (const IUnknownVtbl*)wrapper_vtbl;
320 wrapper->ref = 1;
321
322 IUnknown_AddRef(iface);
323 wrapper->iface = iface;
324
325 IUnknown_AddRef(ref_unk);
326 wrapper->ref_unk = ref_unk;
327
328 *ret = &wrapper->IUnknown_iface;
329 return S_OK;
330}
static const void * wrapper_vtbl[]
Definition: ifacewrap.c:208
IUnknown IUnknown_iface
Definition: ifacewrap.c:28
IUnknown * ref_unk
Definition: ifacewrap.c:30
IUnknown * iface
Definition: ifacewrap.c:29

Referenced by HTMLObjectElement_QI().

Variable Documentation

◆ DECLSPEC_HIDDEN

HINSTANCE hInst DECLSPEC_HIDDEN

Definition at line 301 of file mshtml_private.h.

◆ len

Initial value:
{
#define HeapReAlloc
Definition: compat.h:734

Definition at line 1137 of file mshtml_private.h.

Referenced by heap_strdupAtoW(), heap_strdupUtoW(), and heap_strndupW().