ReactOS  0.4.14-dev-49-gfb4591c
htmltextnode.c
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include "mshtml_private.h"
20 
23  IHTMLDOMTextNode IHTMLDOMTextNode_iface;
24  IHTMLDOMTextNode2 IHTMLDOMTextNode2_iface;
25 
27 };
28 
29 static inline HTMLDOMTextNode *impl_from_IHTMLDOMTextNode(IHTMLDOMTextNode *iface)
30 {
31  return CONTAINING_RECORD(iface, HTMLDOMTextNode, IHTMLDOMTextNode_iface);
32 }
33 
34 static HRESULT WINAPI HTMLDOMTextNode_QueryInterface(IHTMLDOMTextNode *iface,
35  REFIID riid, void **ppv)
36 {
38 
39  return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
40 }
41 
42 static ULONG WINAPI HTMLDOMTextNode_AddRef(IHTMLDOMTextNode *iface)
43 {
45 
46  return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface);
47 }
48 
49 static ULONG WINAPI HTMLDOMTextNode_Release(IHTMLDOMTextNode *iface)
50 {
52 
53  return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface);
54 }
55 
56 static HRESULT WINAPI HTMLDOMTextNode_GetTypeInfoCount(IHTMLDOMTextNode *iface, UINT *pctinfo)
57 {
59  return IDispatchEx_GetTypeInfoCount(&This->node.event_target.dispex.IDispatchEx_iface, pctinfo);
60 }
61 
62 static HRESULT WINAPI HTMLDOMTextNode_GetTypeInfo(IHTMLDOMTextNode *iface, UINT iTInfo,
63  LCID lcid, ITypeInfo **ppTInfo)
64 {
66  return IDispatchEx_GetTypeInfo(&This->node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
67 }
68 
69 static HRESULT WINAPI HTMLDOMTextNode_GetIDsOfNames(IHTMLDOMTextNode *iface, REFIID riid,
70  LPOLESTR *rgszNames, UINT cNames,
71  LCID lcid, DISPID *rgDispId)
72 {
74  return IDispatchEx_GetIDsOfNames(&This->node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
75  lcid, rgDispId);
76 }
77 
78 static HRESULT WINAPI HTMLDOMTextNode_Invoke(IHTMLDOMTextNode *iface, DISPID dispIdMember,
79  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
80  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
81 {
83  return IDispatchEx_Invoke(&This->node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
84  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
85 }
86 
87 static HRESULT WINAPI HTMLDOMTextNode_put_data(IHTMLDOMTextNode *iface, BSTR v)
88 {
90  nsAString nsstr;
91  nsresult nsres;
92 
93  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
94 
95  nsAString_InitDepend(&nsstr, v);
96  nsres = nsIDOMText_SetData(This->nstext, &nsstr);
97  nsAString_Finish(&nsstr);
98  return NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
99 }
100 
101 static HRESULT WINAPI HTMLDOMTextNode_get_data(IHTMLDOMTextNode *iface, BSTR *p)
102 {
104  nsAString nsstr;
105  nsresult nsres;
106 
107  TRACE("(%p)->(%p)\n", This, p);
108 
109  nsAString_Init(&nsstr, NULL);
110  nsres = nsIDOMText_GetData(This->nstext, &nsstr);
111  return return_nsstr(nsres, &nsstr, p);
112 }
113 
114 static HRESULT WINAPI HTMLDOMTextNode_toString(IHTMLDOMTextNode *iface, BSTR *String)
115 {
117  FIXME("(%p)->(%p)\n", This, String);
118  return E_NOTIMPL;
119 }
120 
121 static HRESULT WINAPI HTMLDOMTextNode_get_length(IHTMLDOMTextNode *iface, LONG *p)
122 {
124  UINT32 length = 0;
125  nsresult nsres;
126 
127  TRACE("(%p)->(%p)\n", This, p);
128 
129  nsres = nsIDOMText_GetLength(This->nstext, &length);
130  if(NS_FAILED(nsres))
131  ERR("GetLength failed: %08x\n", nsres);
132 
133  *p = length;
134  return S_OK;
135 }
136 
137 static HRESULT WINAPI HTMLDOMTextNode_splitText(IHTMLDOMTextNode *iface, LONG offset, IHTMLDOMNode **pRetNode)
138 {
140  HTMLDOMNode *node;
141  nsIDOMText *text;
142  nsresult nsres;
143  HRESULT hres;
144 
145  TRACE("(%p)->(%d %p)\n", This, offset, pRetNode);
146 
147  nsres = nsIDOMText_SplitText(This->nstext, offset, &text);
148  if(NS_FAILED(nsres)) {
149  ERR("SplitText failed: %x08x\n", nsres);
150  return E_FAIL;
151  }
152 
153  if(!text) {
154  *pRetNode = NULL;
155  return S_OK;
156  }
157 
158  hres = get_node(This->node.doc, (nsIDOMNode*)text, TRUE, &node);
159  nsIDOMText_Release(text);
160  if(FAILED(hres))
161  return hres;
162 
163  *pRetNode = &node->IHTMLDOMNode_iface;
164  return S_OK;
165 }
166 
167 static const IHTMLDOMTextNodeVtbl HTMLDOMTextNodeVtbl = {
180 };
181 
182 static inline HTMLDOMTextNode *impl_from_IHTMLDOMTextNode2(IHTMLDOMTextNode2 *iface)
183 {
184  return CONTAINING_RECORD(iface, HTMLDOMTextNode, IHTMLDOMTextNode2_iface);
185 }
186 
187 static HRESULT WINAPI HTMLDOMTextNode2_QueryInterface(IHTMLDOMTextNode2 *iface, REFIID riid, void **ppv)
188 {
190 
191  return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
192 }
193 
194 static ULONG WINAPI HTMLDOMTextNode2_AddRef(IHTMLDOMTextNode2 *iface)
195 {
197 
198  return IHTMLDOMNode_AddRef(&This->node.IHTMLDOMNode_iface);
199 }
200 
201 static ULONG WINAPI HTMLDOMTextNode2_Release(IHTMLDOMTextNode2 *iface)
202 {
204 
205  return IHTMLDOMNode_Release(&This->node.IHTMLDOMNode_iface);
206 }
207 
208 static HRESULT WINAPI HTMLDOMTextNode2_GetTypeInfoCount(IHTMLDOMTextNode2 *iface, UINT *pctinfo)
209 {
211  return IDispatchEx_GetTypeInfoCount(&This->node.event_target.dispex.IDispatchEx_iface, pctinfo);
212 }
213 
214 static HRESULT WINAPI HTMLDOMTextNode2_GetTypeInfo(IHTMLDOMTextNode2 *iface, UINT iTInfo,
215  LCID lcid, ITypeInfo **ppTInfo)
216 {
218  return IDispatchEx_GetTypeInfo(&This->node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
219 }
220 
221 static HRESULT WINAPI HTMLDOMTextNode2_GetIDsOfNames(IHTMLDOMTextNode2 *iface, REFIID riid,
222  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
223 {
225  return IDispatchEx_GetIDsOfNames(&This->node.event_target.dispex.IDispatchEx_iface, riid, rgszNames, cNames,
226  lcid, rgDispId);
227 }
228 
229 static HRESULT WINAPI HTMLDOMTextNode2_Invoke(IHTMLDOMTextNode2 *iface, DISPID dispIdMember,
230  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
231  EXCEPINFO *pExcepInfo, UINT *puArgErr)
232 {
234  return IDispatchEx_Invoke(&This->node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid, lcid,
235  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
236 }
237 
238 static HRESULT WINAPI HTMLDOMTextNode2_substringData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count, BSTR *string)
239 {
241  FIXME("(%p)->(%d %d %p)\n", This, offset, count, string);
242  return E_NOTIMPL;
243 }
244 
245 static HRESULT WINAPI HTMLDOMTextNode2_appendData(IHTMLDOMTextNode2 *iface, BSTR string)
246 {
248  nsAString nsstr;
249  nsresult nsres;
250 
251  TRACE("(%p)->(%s)\n", This, debugstr_w(string));
252 
253  nsAString_InitDepend(&nsstr, string);
254  nsres = nsIDOMText_AppendData(This->nstext, &nsstr);
255  nsAString_Finish(&nsstr);
256  if(NS_FAILED(nsres)) {
257  ERR("AppendData failed: %08x\n", nsres);
258  return E_FAIL;
259  }
260 
261  return S_OK;
262 }
263 
264 static HRESULT WINAPI HTMLDOMTextNode2_insertData(IHTMLDOMTextNode2 *iface, LONG offset, BSTR string)
265 {
267  FIXME("(%p)->(%d %s)\n", This, offset, debugstr_w(string));
268  return E_NOTIMPL;
269 }
270 
271 static HRESULT WINAPI HTMLDOMTextNode2_deleteData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count)
272 {
274  FIXME("(%p)->(%d %d)\n", This, offset, count);
275  return E_NOTIMPL;
276 }
277 
278 static HRESULT WINAPI HTMLDOMTextNode2_replaceData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count, BSTR string)
279 {
281  FIXME("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(string));
282  return E_NOTIMPL;
283 }
284 
285 static const IHTMLDOMTextNode2Vtbl HTMLDOMTextNode2Vtbl = {
298 };
299 
301 {
302  return CONTAINING_RECORD(iface, HTMLDOMTextNode, node);
303 }
304 
306 {
308 
309  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
310 
311  if(IsEqualGUID(&IID_IHTMLDOMTextNode, riid))
312  *ppv = &This->IHTMLDOMTextNode_iface;
313  else if(IsEqualGUID(&IID_IHTMLDOMTextNode2, riid))
314  *ppv = &This->IHTMLDOMTextNode2_iface;
315  else
316  return HTMLDOMNode_QI(&This->node, riid, ppv);
317 
318  IUnknown_AddRef((IUnknown*)*ppv);
319  return S_OK;
320 }
321 
323 {
325 
326  return HTMLDOMTextNode_Create(This->node.doc, nsnode, ret);
327 }
328 
329 static const cpc_entry_t HTMLDOMTextNode_cpc[] = {{NULL}};
330 
336 };
337 
339  IHTMLDOMNode_tid,
340  IHTMLDOMNode2_tid,
341  IHTMLDOMTextNode_tid,
342  IHTMLDOMTextNode2_tid,
343  0
344 };
346  NULL,
347  DispHTMLDOMTextNode_tid,
348  0,
350 };
351 
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 }
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
static HTMLDOMTextNode * impl_from_IHTMLDOMTextNode2(IHTMLDOMTextNode2 *iface)
Definition: htmltextnode.c:182
void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsnode)
Definition: htmlnode.c:1196
static const tid_t HTMLDOMTextNode_iface_tids[]
Definition: htmltextnode.c:338
static const NodeImplVtbl HTMLDOMTextNodeImplVtbl
Definition: htmltextnode.c:331
REFIID riid
Definition: precomp.h:44
const WCHAR * text
Definition: package.c:1827
GLuint GLuint GLsizei count
Definition: gl.h:1545
tid_t
Definition: ieframe.h:311
static HRESULT WINAPI HTMLDOMTextNode_toString(IHTMLDOMTextNode *iface, BSTR *String)
Definition: htmltextnode.c:114
GLintptr offset
Definition: glext.h:5920
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define assert(x)
Definition: debug.h:53
static WCHAR String[]
Definition: stringtable.c:55
DWORD LCID
Definition: nls.h:13
HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNode **node)
Definition: htmltextnode.c:352
OLECHAR * BSTR
Definition: compat.h:1934
IHTMLDOMTextNode2 IHTMLDOMTextNode2_iface
Definition: htmltextnode.c:24
static LPOLESTR
Definition: stg_prop.c:27
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT WINAPI HTMLDOMTextNode_put_data(IHTMLDOMTextNode *iface, BSTR v)
Definition: htmltextnode.c:87
static HTMLDOMTextNode * impl_from_IHTMLDOMTextNode(IHTMLDOMTextNode *iface)
Definition: htmltextnode.c:29
static ULONG WINAPI HTMLDOMTextNode_AddRef(IHTMLDOMTextNode *iface)
Definition: htmltextnode.c:42
static const IHTMLDOMTextNode2Vtbl HTMLDOMTextNode2Vtbl
Definition: htmltextnode.c:285
static HRESULT WINAPI HTMLDOMTextNode2_GetTypeInfoCount(IHTMLDOMTextNode2 *iface, UINT *pctinfo)
Definition: htmltextnode.c:208
static HRESULT WINAPI HTMLDOMTextNode2_appendData(IHTMLDOMTextNode2 *iface, BSTR string)
Definition: htmltextnode.c:245
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
static HRESULT WINAPI HTMLDOMTextNode_Invoke(IHTMLDOMTextNode *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmltextnode.c:78
#define NS_OK
struct node node
static HRESULT WINAPI HTMLDOMTextNode_GetTypeInfo(IHTMLDOMTextNode *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmltextnode.c:62
nsIDOMText * nstext
Definition: htmltextnode.c:26
static ULONG WINAPI HTMLDOMTextNode2_Release(IHTMLDOMTextNode2 *iface)
Definition: htmltextnode.c:201
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int UINT32
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI HTMLDOMTextNode2_replaceData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count, BSTR string)
Definition: htmltextnode.c:278
static const IHTMLDOMTextNodeVtbl HTMLDOMTextNodeVtbl
Definition: htmltextnode.c:167
static HRESULT WINAPI HTMLDOMTextNode2_substringData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count, BSTR *string)
Definition: htmltextnode.c:238
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static HTMLDOMTextNode * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmltextnode.c:300
#define NS_FAILED(res)
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
static HRESULT WINAPI HTMLDOMTextNode_get_length(IHTMLDOMTextNode *iface, LONG *p)
Definition: htmltextnode.c:121
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
void HTMLDOMNode_destructor(HTMLDOMNode *This)
Definition: htmlnode.c:1172
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
#define NS_SUCCEEDED(res)
HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
Definition: htmlnode.c:1142
static const cpc_entry_t HTMLDOMTextNode_cpc[]
Definition: htmltextnode.c:329
int ret
static HRESULT WINAPI HTMLDOMTextNode_GetIDsOfNames(IHTMLDOMTextNode *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmltextnode.c:69
static HRESULT WINAPI HTMLDOMTextNode_GetTypeInfoCount(IHTMLDOMTextNode *iface, UINT *pctinfo)
Definition: htmltextnode.c:56
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ERR(fmt,...)
Definition: debug.h:109
static HRESULT WINAPI HTMLDOMTextNode2_QueryInterface(IHTMLDOMTextNode2 *iface, REFIID riid, void **ppv)
Definition: htmltextnode.c:187
struct stdole::EXCEPINFO EXCEPINFO
#define S_OK
Definition: intsafe.h:59
static VARIANTARG static DISPID
Definition: ordinal.c:49
const GLdouble * v
Definition: gl.h:2040
static HRESULT WINAPI HTMLDOMTextNode2_GetTypeInfo(IHTMLDOMTextNode2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmltextnode.c:214
static ULONG WINAPI HTMLDOMTextNode2_AddRef(IHTMLDOMTextNode2 *iface)
Definition: htmltextnode.c:194
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
static dispex_static_data_t HTMLDOMTextNode_dispex
Definition: htmltextnode.c:345
#define E_NOTIMPL
Definition: ddrawi.h:99
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:940
static HRESULT WINAPI HTMLDOMTextNode_QueryInterface(IHTMLDOMTextNode *iface, REFIID riid, void **ppv)
Definition: htmltextnode.c:34
static HRESULT WINAPI HTMLDOMTextNode2_insertData(IHTMLDOMTextNode2 *iface, LONG offset, BSTR string)
Definition: htmltextnode.c:264
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
static HRESULT HTMLDOMTextNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
Definition: htmltextnode.c:322
static HRESULT WINAPI HTMLDOMTextNode2_Invoke(IHTMLDOMTextNode2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmltextnode.c:229
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
struct stdole::DISPPARAMS DISPPARAMS
HRESULT nsresult
Definition: nsiface.idl:39
unsigned int ULONG
Definition: retypes.h:1
IHTMLDOMTextNode IHTMLDOMTextNode_iface
Definition: htmltextnode.c:23
static HRESULT WINAPI HTMLDOMTextNode_splitText(IHTMLDOMTextNode *iface, LONG offset, IHTMLDOMNode **pRetNode)
Definition: htmltextnode.c:137
static ULONG WINAPI HTMLDOMTextNode_Release(IHTMLDOMTextNode *iface)
Definition: htmltextnode.c:49
GLfloat GLfloat p
Definition: glext.h:8902
static HRESULT WINAPI HTMLDOMTextNode2_GetIDsOfNames(IHTMLDOMTextNode2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmltextnode.c:221
static HRESULT WINAPI HTMLDOMTextNode2_deleteData(IHTMLDOMTextNode2 *iface, LONG offset, LONG count)
Definition: htmltextnode.c:271
Definition: dlist.c:348
HTMLDOMNode node
Definition: htmltextnode.c:22
static HRESULT HTMLDOMTextNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmltextnode.c:305
static HRESULT WINAPI HTMLDOMTextNode_get_data(IHTMLDOMTextNode *iface, BSTR *p)
Definition: htmltextnode.c:101