ReactOS 0.4.16-dev-106-g10b08aa
mutation.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
21#define IE_MAJOR_VERSION 7
22#define IE_MINOR_VERSION 0
23
25 {0x762C4AE7,0xB923,0x422F,{0xB9,0x7E,0xB9,0xBF,0xC1,0xEF,0x7B,0xF0}};
26
28
30{
31 int majorv = 0, minorv = 0;
32 const PRUnichar *ptr, *end;
34 DWORD len;
35
36 enum {
37 CMP_EQ,
38 CMP_LT,
39 CMP_LTE,
40 CMP_GT,
41 CMP_GTE
42 } cmpt = CMP_EQ;
43
44 static const PRUnichar endifW[] = {'<','!','[','e','n','d','i','f',']'};
45
46 if(comment[0] != '[' || comment[1] != 'i' || comment[2] != 'f')
47 return NULL;
48
49 ptr = comment+3;
50 while(isspaceW(*ptr))
51 ptr++;
52
53 if(ptr[0] == 'l' && ptr[1] == 't') {
54 ptr += 2;
55 if(*ptr == 'e') {
56 cmpt = CMP_LTE;
57 ptr++;
58 }else {
59 cmpt = CMP_LT;
60 }
61 }else if(ptr[0] == 'g' && ptr[1] == 't') {
62 ptr += 2;
63 if(*ptr == 'e') {
64 cmpt = CMP_GTE;
65 ptr++;
66 }else {
67 cmpt = CMP_GT;
68 }
69 }
70
71 if(!isspaceW(*ptr++))
72 return NULL;
73 while(isspaceW(*ptr))
74 ptr++;
75
76 if(ptr[0] != 'I' || ptr[1] != 'E')
77 return NULL;
78
79 ptr +=2;
80 if(!isspaceW(*ptr++))
81 return NULL;
82 while(isspaceW(*ptr))
83 ptr++;
84
85 if(!isdigitW(*ptr))
86 return NULL;
87 while(isdigitW(*ptr))
88 majorv = majorv*10 + (*ptr++ - '0');
89
90 if(*ptr == '.') {
91 ptr++;
92 if(!isdigitW(*ptr))
93 return NULL;
94 while(isdigitW(*ptr))
95 minorv = minorv*10 + (*ptr++ - '0');
96 }
97
98 while(isspaceW(*ptr))
99 ptr++;
100 if(ptr[0] != ']' || ptr[1] != '>')
101 return NULL;
102 ptr += 2;
103
104 len = strlenW(ptr);
105 if(len < sizeof(endifW)/sizeof(WCHAR))
106 return NULL;
107
108 end = ptr + len-sizeof(endifW)/sizeof(WCHAR);
109 if(memcmp(end, endifW, sizeof(endifW)))
110 return NULL;
111
112 switch(cmpt) {
113 case CMP_EQ:
114 if(majorv == IE_MAJOR_VERSION && minorv == IE_MINOR_VERSION)
115 break;
116 return NULL;
117 case CMP_LT:
118 if(majorv > IE_MAJOR_VERSION)
119 break;
120 if(majorv == IE_MAJOR_VERSION && minorv > IE_MINOR_VERSION)
121 break;
122 return NULL;
123 case CMP_LTE:
124 if(majorv > IE_MAJOR_VERSION)
125 break;
126 if(majorv == IE_MAJOR_VERSION && minorv >= IE_MINOR_VERSION)
127 break;
128 return NULL;
129 case CMP_GT:
130 if(majorv < IE_MAJOR_VERSION)
131 break;
132 if(majorv == IE_MAJOR_VERSION && minorv < IE_MINOR_VERSION)
133 break;
134 return NULL;
135 case CMP_GTE:
136 if(majorv < IE_MAJOR_VERSION)
137 break;
138 if(majorv == IE_MAJOR_VERSION && minorv <= IE_MINOR_VERSION)
139 break;
140 return NULL;
141 }
142
143 buf = heap_alloc((end-ptr+1)*sizeof(WCHAR));
144 if(!buf)
145 return NULL;
146
147 memcpy(buf, ptr, (end-ptr)*sizeof(WCHAR));
148 buf[end-ptr] = 0;
149
150 return buf;
151}
152
154{
155 const PRUnichar *comment;
156 nsIDOMComment *nscomment;
157 PRUnichar *replace_html;
158 nsAString comment_str;
159 nsresult nsres;
160
161 nsres = nsISupports_QueryInterface(comment_iface, &IID_nsIDOMComment, (void**)&nscomment);
162 if(NS_FAILED(nsres)) {
163 ERR("Could not get nsIDOMComment iface:%08x\n", nsres);
164 return nsres;
165 }
166
167 nsAString_Init(&comment_str, NULL);
168 nsres = nsIDOMComment_GetData(nscomment, &comment_str);
169 if(NS_FAILED(nsres))
170 return nsres;
171
172 nsAString_GetData(&comment_str, &comment);
173 replace_html = handle_insert_comment(doc, comment);
174 nsAString_Finish(&comment_str);
175
176 if(replace_html) {
178
179 hres = replace_node_by_html(doc->nsdoc, (nsIDOMNode*)nscomment, replace_html);
180 heap_free(replace_html);
181 if(FAILED(hres))
182 nsres = NS_ERROR_FAILURE;
183 }
184
185
186 nsIDOMComment_Release(nscomment);
187 return nsres;
188}
189
191{
192 nsIDOMNode *nsnode;
194 nsresult nsres;
196
197 TRACE("(%p)->(%p)\n", doc, nsiface);
198
199 nsres = nsISupports_QueryInterface(nsiface, &IID_nsIDOMNode, (void**)&nsnode);
200 if(NS_FAILED(nsres))
201 return nsres;
202
203 hres = get_node(doc, nsnode, TRUE, &node);
204 nsIDOMNode_Release(nsnode);
205 if(FAILED(hres)) {
206 ERR("Could not get node\n");
207 return nsres;
208 }
209
210 if(node->vtbl->bind_to_tree)
211 node->vtbl->bind_to_tree(node);
212
214 return nsres;
215}
216
217/* Calls undocumented 69 cmd of CGID_Explorer */
219{
220 IOleCommandTarget *olecmd;
221 VARIANT var;
223
224 if(!doc->client)
225 return;
226
227 hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
228 if(FAILED(hres))
229 return;
230
232 hres = IOleCommandTarget_Exec(olecmd, &CGID_Explorer, 69, 0, NULL, &var);
233 IOleCommandTarget_Release(olecmd);
234 if(SUCCEEDED(hres) && V_VT(&var) != VT_NULL)
235 FIXME("handle result\n");
236}
237
239{
240 TRACE("(%p)\n", doc);
241
242 if(doc->usermode == EDITMODE)
243 init_editor(&doc->basedoc);
244
245 call_explorer_69(doc);
246 if(doc->view_sink)
247 IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1);
249 call_explorer_69(doc);
250
251 if(doc->webbrowser && doc->usermode != EDITMODE && !(doc->basedoc.window->load_flags & BINDING_REFRESH))
252 IDocObjectService_FireNavigateComplete2(doc->doc_object_service, &doc->basedoc.window->base.IHTMLWindow2_iface, 0);
253
254 /* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
255}
256
258{
259 TRACE("(%p)\n", This);
260
261 if(!This->basedoc.doc_obj)
262 return NS_OK;
263
264 if(This == This->basedoc.doc_obj->basedoc.doc_node) {
265 /*
266 * This should be done in the worker thread that parses HTML,
267 * but we don't have such thread (Gecko parses HTML for us).
268 */
269 parse_complete(This->basedoc.doc_obj);
270 }
271
273 set_ready_state(This->basedoc.window, READYSTATE_INTERACTIVE);
274 return NS_OK;
275}
276
277static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_iface, nsISupports *parser_iface)
278{
279 nsIDOMHTMLScriptElement *nsscript;
280 HTMLScriptElement *script_elem;
281 nsIParser *nsparser = NULL;
284 nsresult nsres;
286
287 TRACE("(%p)->(%p)\n", doc, script_iface);
288
289 window = doc->window;
290 if(!window)
291 return NS_OK;
292
293 nsres = nsISupports_QueryInterface(script_iface, &IID_nsIDOMHTMLScriptElement, (void**)&nsscript);
294 if(NS_FAILED(nsres)) {
295 ERR("Could not get nsIDOMHTMLScriptElement: %08x\n", nsres);
296 return nsres;
297 }
298
299 if(parser_iface) {
300 nsres = nsISupports_QueryInterface(parser_iface, &IID_nsIParser, (void**)&nsparser);
301 if(NS_FAILED(nsres)) {
302 ERR("Could not get nsIParser iface: %08x\n", nsres);
303 nsparser = NULL;
304 }
305 }
306
307 hres = script_elem_from_nsscript(doc, nsscript, &script_elem);
308 nsIDOMHTMLScriptElement_Release(nsscript);
309 if(FAILED(hres))
310 return NS_ERROR_FAILURE;
311
312 if(nsparser) {
313 nsIParser_BeginEvaluatingParserInsertedScript(nsparser);
314 window->parser_callback_cnt++;
315 }
316
317 IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
318
319 doc_insert_script(window, script_elem);
320
321 while(!list_empty(&window->script_queue)) {
322 iter = LIST_ENTRY(list_head(&window->script_queue), script_queue_entry_t, entry);
323 list_remove(&iter->entry);
324 if(!iter->script->parsed)
326 IHTMLScriptElement_Release(&iter->script->IHTMLScriptElement_iface);
327 heap_free(iter);
328 }
329
330 IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
331
332 if(nsparser) {
333 window->parser_callback_cnt--;
334 nsIParser_EndEvaluatingParserInsertedScript(nsparser);
335 nsIParser_Release(nsparser);
336 }
337
338 IHTMLScriptElement_Release(&script_elem->IHTMLScriptElement_iface);
339
340 return NS_OK;
341}
342
343typedef struct nsRunnable nsRunnable;
344
346
349
351
353
357};
358
360{
361 return CONTAINING_RECORD(iface, nsRunnable, nsIRunnable_iface);
362}
363
365 nsIIDRef riid, void **result)
366{
368
369 if(IsEqualGUID(riid, &IID_nsISupports)) {
370 TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
371 *result = &This->nsIRunnable_iface;
372 }else if(IsEqualGUID(riid, &IID_nsIRunnable)) {
373 TRACE("(%p)->(IID_nsIRunnable %p)\n", This, result);
374 *result = &This->nsIRunnable_iface;
375 }else {
376 *result = NULL;
377 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
378 return NS_NOINTERFACE;
379 }
380
381 nsISupports_AddRef((nsISupports*)*result);
382 return NS_OK;
383}
384
386{
389
390 TRACE("(%p) ref=%d\n", This, ref);
391
392 return ref;
393}
394
396{
399
400 TRACE("(%p) ref=%d\n", This, ref);
401
402 if(!ref) {
403 htmldoc_release(&This->doc->basedoc);
404 if(This->arg1)
405 nsISupports_Release(This->arg1);
406 if(This->arg2)
407 nsISupports_Release(This->arg2);
409 }
410
411 return ref;
412}
413
415{
417
418 return This->proc(This->doc, This->arg1, This->arg2);
419}
420
421static const nsIRunnableVtbl nsRunnableVtbl = {
426};
427
429{
431
432 runnable = heap_alloc_zero(sizeof(*runnable));
433 if(!runnable)
434 return;
435
436 runnable->nsIRunnable_iface.lpVtbl = &nsRunnableVtbl;
437 runnable->ref = 1;
438
439 htmldoc_addref(&This->basedoc);
440 runnable->doc = This;
441 runnable->proc = proc;
442
443 if(arg1)
444 nsISupports_AddRef(arg1);
445 runnable->arg1 = arg1;
446
447 if(arg2)
448 nsISupports_AddRef(arg2);
449 runnable->arg2 = arg2;
450
451 nsIContentUtils_AddScriptRunner(content_utils, &runnable->nsIRunnable_iface);
452
453 nsIRunnable_Release(&runnable->nsIRunnable_iface);
454}
455
457{
458 return CONTAINING_RECORD(iface, HTMLDocumentNode, nsIDocumentObserver_iface);
459}
460
462 nsIIDRef riid, void **result)
463{
465
466 if(IsEqualGUID(&IID_nsISupports, riid)) {
467 TRACE("(%p)->(IID_nsISupports, %p)\n", This, result);
468 *result = &This->nsIDocumentObserver_iface;
469 }else if(IsEqualGUID(&IID_nsIMutationObserver, riid)) {
470 TRACE("(%p)->(IID_nsIMutationObserver %p)\n", This, result);
471 *result = &This->nsIDocumentObserver_iface;
472 }else if(IsEqualGUID(&IID_nsIDocumentObserver, riid)) {
473 TRACE("(%p)->(IID_nsIDocumentObserver %p)\n", This, result);
474 *result = &This->nsIDocumentObserver_iface;
475 }else {
476 *result = NULL;
477 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
478 return NS_NOINTERFACE;
479 }
480
481 htmldoc_addref(&This->basedoc);
482 return NS_OK;
483}
484
486{
488 return htmldoc_addref(&This->basedoc);
489}
490
492{
494 return htmldoc_release(&This->basedoc);
495}
496
498 nsIDocument *aDocument, nsIContent *aContent, void /*CharacterDataChangeInfo*/ *aInfo)
499{
500}
501
503 nsIDocument *aDocument, nsIContent *aContent, void /*CharacterDataChangeInfo*/ *aInfo)
504{
505}
506
508 nsIContent *aContent, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType)
509{
510}
511
513 nsIContent *aContent, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType)
514{
515}
516
518 void *aElement, LONG aNameSpaceID, nsIAtom *aAttribute)
519{
520}
521
523 nsIContent *aContainer, nsIContent *aFirstNewContent, LONG aNewIndexInContainer)
524{
525}
526
528 nsIContent *aContainer, nsIContent *aChild, LONG aIndexInContainer)
529{
530}
531
533 nsIContent *aContainer, nsIContent *aChild, LONG aIndexInContainer,
534 nsIContent *aProviousSibling)
535{
536}
537
539{
540}
541
543{
544}
545
547 nsUpdateType aUpdateType)
548{
549}
550
552 nsUpdateType aUpdateType)
553{
554}
555
557{
558}
559
561{
563
564 TRACE("(%p)\n", This);
565
566 if(This->skip_mutation_notif)
567 return;
568
569 This->content_ready = TRUE;
571}
572
574 nsIContent *aContent, EventStates aStateMask)
575{
576}
577
579 EventStates aStateMask)
580{
581}
582
584 nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet)
585{
586}
587
589 nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet)
590{
591}
592
594 nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, cpp_bool aApplicable)
595{
596}
597
599 nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleSheet *aNewStyleRule)
600{
601}
602
604 nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)
605{
606}
607
609 nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)
610{
611}
612
614 nsIContent *aContent)
615{
617 nsIDOMHTMLIFrameElement *nsiframe;
618 nsIDOMHTMLFrameElement *nsframe;
619 nsIDOMHTMLScriptElement *nsscript;
620 nsIDOMHTMLElement *nselem;
621 nsIDOMComment *nscomment;
622 nsresult nsres;
623
624 TRACE("(%p)->(%p %p)\n", This, aDocument, aContent);
625
626 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLElement, (void**)&nselem);
627 if(NS_SUCCEEDED(nsres)) {
628 check_event_attr(This, nselem);
629 nsIDOMHTMLElement_Release(nselem);
630 }
631
632 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMComment, (void**)&nscomment);
633 if(NS_SUCCEEDED(nsres)) {
634 TRACE("comment node\n");
635
637 nsIDOMComment_Release(nscomment);
638 return;
639 }
640
641 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLIFrameElement, (void**)&nsiframe);
642 if(NS_SUCCEEDED(nsres)) {
643 TRACE("iframe node\n");
644
646 nsIDOMHTMLIFrameElement_Release(nsiframe);
647 return;
648 }
649
650 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLFrameElement, (void**)&nsframe);
651 if(NS_SUCCEEDED(nsres)) {
652 TRACE("frame node\n");
653
655 nsIDOMHTMLFrameElement_Release(nsframe);
656 return;
657 }
658
659 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLScriptElement, (void**)&nsscript);
660 if(NS_SUCCEEDED(nsres)) {
661 HTMLScriptElement *script_elem;
663
664 TRACE("script element\n");
665
666 hres = script_elem_from_nsscript(This, nsscript, &script_elem);
667 nsIDOMHTMLScriptElement_Release(nsscript);
668 if(FAILED(hres))
669 return;
670
671 if(script_elem->parse_on_bind)
673
674 IHTMLScriptElement_Release(&script_elem->IHTMLScriptElement_iface);
675 }
676}
677
679 nsIParser *aParser, cpp_bool *aBlock)
680{
682 nsIDOMHTMLScriptElement *nsscript;
683 nsresult nsres;
684
685 TRACE("(%p)->(%p %p %p)\n", This, aContent, aParser, aBlock);
686
687 nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLScriptElement, (void**)&nsscript);
688 if(NS_SUCCEEDED(nsres)) {
689 TRACE("script node\n");
690
692 nsIDOMHTMLScriptElement_Release(nsscript);
693 }
694}
695
696static const nsIDocumentObserverVtbl nsDocumentObserverVtbl = {
724};
725
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}
742
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}
757
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}
773
774void init_mutation(nsIComponentManager *component_manager)
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}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define BINDING_REFRESH
Definition: binding.h:130
void call_property_onchanged(ConnectionPointContainer *container, DISPID dispid)
Definition: conpoint.c:342
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
unsigned char cpp_bool
Definition: atl.c:38
@ VT_NULL
Definition: compat.h:2296
void init_editor(HTMLDocument *This)
Definition: editor.c:1202
#define assert(x)
Definition: debug.h:53
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint end
Definition: gl.h:1545
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLuint64EXT * result
Definition: glext.h:11304
HRESULT replace_node_by_html(nsIDOMHTMLDocument *nsdoc, nsIDOMNode *nsnode, const WCHAR *html)
Definition: htmlelem.c:98
void check_event_attr(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
Definition: htmlevent.c:1559
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
HRESULT script_elem_from_nsscript(HTMLDocumentNode *doc, nsIDOMHTMLScriptElement *nsscript, HTMLScriptElement **ret)
Definition: htmlscript.c:425
void bind_event_scripts(HTMLDocumentNode *) DECLSPEC_HIDDEN
Definition: script.c:1423
void doc_insert_script(HTMLInnerWindow *, HTMLScriptElement *) DECLSPEC_HIDDEN
Definition: script.c:1172
REFIID riid
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_guid
Definition: kernel32.h:35
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
#define comment(fmt, arg1)
Definition: rebar.c:843
const char * var
Definition: shader.c:5666
HRESULT hres
Definition: protocol.c:465
static IHTMLWindow2 * window
Definition: events.c:77
static IRunnableObject * runnable
Definition: ole2.c:76
#define NS_OK
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
#define NSAPI
#define NS_NOINTERFACE
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
static void node_release(HTMLDOMNode *node)
static ULONG htmldoc_addref(HTMLDocument *This)
#define NS_ERROR_FAILURE
@ EDITMODE
static ULONG htmldoc_release(HTMLDocument *This)
#define NS_SUCCEEDED(res)
void set_ready_state(HTMLOuterWindow *, READYSTATE) DECLSPEC_HIDDEN
Definition: persist.c:450
#define NS_FAILED(res)
nsresult(* runnable_proc_t)(HTMLDocumentNode *, nsISupports *, nsISupports *)
Definition: mutation.c:345
static void NSAPI nsDocumentObserver_ContentAppended(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aFirstNewContent, LONG aNewIndexInContainer)
Definition: mutation.c:522
static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface)
Definition: mutation.c:414
static const nsIDocumentObserverVtbl nsDocumentObserverVtbl
Definition: mutation.c:696
static const nsIRunnableVtbl nsRunnableVtbl
Definition: mutation.c:421
static nsrefcnt NSAPI nsRunnable_AddRef(nsIRunnable *iface)
Definition: mutation.c:385
static void NSAPI nsDocumentObserver_StyleSheetRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet)
Definition: mutation.c:588
static nsrefcnt NSAPI nsRunnable_Release(nsIRunnable *iface)
Definition: mutation.c:395
static nsrefcnt NSAPI nsDocumentObserver_Release(nsIDocumentObserver *iface)
Definition: mutation.c:491
static void add_script_runner(HTMLDocumentNode *This, runnable_proc_t proc, nsISupports *arg1, nsISupports *arg2)
Definition: mutation.c:428
static void NSAPI nsDocumentObserver_AttributeChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType)
Definition: mutation.c:512
static void parse_complete(HTMLDocumentObj *doc)
Definition: mutation.c:238
static void NSAPI nsDocumentObserver_CharacterDataWillChange(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, void *aInfo)
Definition: mutation.c:497
static void NSAPI nsDocumentObserver_DocumentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, EventStates aStateMask)
Definition: mutation.c:578
static void NSAPI nsDocumentObserver_EndUpdate(nsIDocumentObserver *iface, nsIDocument *aDocument, nsUpdateType aUpdateType)
Definition: mutation.c:551
static void NSAPI nsDocumentObserver_ContentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, EventStates aStateMask)
Definition: mutation.c:573
void init_document_mutation(HTMLDocumentNode *doc)
Definition: mutation.c:726
static void NSAPI nsDocumentObserver_StyleSheetAdded(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, cpp_bool aDocumentSheet)
Definition: mutation.c:583
static PRUnichar * handle_insert_comment(HTMLDocumentNode *doc, const PRUnichar *comment)
Definition: mutation.c:29
static nsresult run_end_load(HTMLDocumentNode *This, nsISupports *arg1, nsISupports *arg2)
Definition: mutation.c:257
static const IID NS_ICONTENTUTILS_CID
Definition: mutation.c:24
static void NSAPI nsDocumentObserver_NodeWillBeDestroyed(nsIDocumentObserver *iface, const nsINode *aNode)
Definition: mutation.c:538
static void NSAPI nsDocumentObserver_ContentInserted(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, LONG aIndexInContainer)
Definition: mutation.c:527
static nsresult NSAPI nsDocumentObserver_QueryInterface(nsIDocumentObserver *iface, nsIIDRef riid, void **result)
Definition: mutation.c:461
static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDocument *aDocument)
Definition: mutation.c:556
static void NSAPI nsDocumentObserver_AttemptToExecuteScript(nsIDocumentObserver *iface, nsIContent *aContent, nsIParser *aParser, cpp_bool *aBlock)
Definition: mutation.c:678
static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent)
Definition: mutation.c:613
void release_document_mutation(HTMLDocumentNode *doc)
Definition: mutation.c:743
static void NSAPI nsDocumentObserver_StyleRuleChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleSheet *aNewStyleRule)
Definition: mutation.c:598
static void NSAPI nsDocumentObserver_CharacterDataChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, void *aInfo)
Definition: mutation.c:502
#define IE_MAJOR_VERSION
Definition: mutation.c:21
JSContext * get_context_from_document(nsIDOMHTMLDocument *nsdoc)
Definition: mutation.c:758
static nsrefcnt NSAPI nsDocumentObserver_AddRef(nsIDocumentObserver *iface)
Definition: mutation.c:485
static void NSAPI nsDocumentObserver_ParentChainChanged(nsIDocumentObserver *iface, nsIContent *aContent)
Definition: mutation.c:542
static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocument *aDocument)
Definition: mutation.c:560
static void NSAPI nsDocumentObserver_BeginUpdate(nsIDocumentObserver *iface, nsIDocument *aDocument, nsUpdateType aUpdateType)
Definition: mutation.c:546
static HTMLDocumentNode * impl_from_nsIDocumentObserver(nsIDocumentObserver *iface)
Definition: mutation.c:456
static void NSAPI nsDocumentObserver_AttributeWillChange(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContent, LONG aNameSpaceID, nsIAtom *aAttribute, LONG aModType)
Definition: mutation.c:507
static nsresult NSAPI nsRunnable_QueryInterface(nsIRunnable *iface, nsIIDRef riid, void **result)
Definition: mutation.c:364
static nsIContentUtils * content_utils
Definition: mutation.c:27
static void call_explorer_69(HTMLDocumentObj *doc)
Definition: mutation.c:218
static void NSAPI nsDocumentObserver_ContentRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild, LONG aIndexInContainer, nsIContent *aProviousSibling)
Definition: mutation.c:532
static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_iface, nsISupports *parser_iface)
Definition: mutation.c:277
#define IE_MINOR_VERSION
Definition: mutation.c:22
static nsRunnable * impl_from_nsIRunnable(nsIRunnable *iface)
Definition: mutation.c:359
static void NSAPI nsDocumentObserver_StyleRuleAdded(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)
Definition: mutation.c:603
static nsresult run_bind_to_tree(HTMLDocumentNode *doc, nsISupports *nsiface, nsISupports *arg2)
Definition: mutation.c:190
void init_mutation(nsIComponentManager *component_manager)
Definition: mutation.c:774
static void NSAPI nsDocumentObserver_StyleRuleRemoved(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)
Definition: mutation.c:608
static void NSAPI nsDocumentObserver_StyleSheetApplicableStateChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, cpp_bool aApplicable)
Definition: mutation.c:593
static nsresult run_insert_comment(HTMLDocumentNode *doc, nsISupports *comment_iface, nsISupports *arg2)
Definition: mutation.c:153
static void NSAPI nsDocumentObserver_AttributeSetToCurrentValue(nsIDocumentObserver *iface, nsIDocument *aDocument, void *aElement, LONG aNameSpaceID, nsIAtom *aAttribute)
Definition: mutation.c:517
REFIID nsIIDRef
Definition: nsiface.idl:45
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48
ULONG nsrefcnt
Definition: nsiface.idl:40
#define V_VT(A)
Definition: oleauto.h:211
static HANDLE proc()
Definition: pdb.c:34
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define isdigitW(n)
Definition: unicode.h:56
#define strlenW(s)
Definition: unicode.h:34
#define isspaceW(n)
Definition: unicode.h:58
#define TRACE(s)
Definition: solgame.cpp:4
nsIDocumentObserver nsIDocumentObserver_iface
nsIDOMHTMLDocument * nsdoc
HTMLInnerWindow * window
IOleClientSite * client
IUnknown * webbrowser
IDocObjectService * doc_object_service
HTMLDocument basedoc
IAdviseSink * view_sink
HTMLOuterWindow * window
ConnectionPointContainer cp_container
IHTMLScriptElement IHTMLScriptElement_iface
Definition: htmlscript.h:24
IHTMLWindow2 IHTMLWindow2_iface
Definition: main.c:439
Definition: list.h:15
nsISupports * arg2
Definition: mutation.c:356
nsISupports * arg1
Definition: mutation.c:355
LONG ref
Definition: mutation.c:350
HTMLDocumentNode * doc
Definition: mutation.c:354
nsIRunnable nsIRunnable_iface
Definition: mutation.c:348
runnable_proc_t proc
Definition: mutation.c:352
Definition: send.c:48
Definition: htmlscript.h:33
struct list entry
Definition: htmlscript.h:34
HTMLScriptElement * script
Definition: htmlscript.h:35
#define LIST_ENTRY(type)
Definition: queue.h:175
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
Definition: dlist.c:348
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
__wchar_t WCHAR
Definition: xmlstorage.h:180