Commit graph

500 commits

Author SHA1 Message Date
Gabriel Ivăncescu 47393c300e mshtml: Introduce query_interface in dispex vtbl and use it for DOM Nodes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-09-07 17:17:17 +02:00
Gabriel Ivăncescu c7f18c3118 mshtml: Return interface directly from node vtbl's QI instead of HRESULT, without AddRef.
This will simplify it when the QI moves to the dispex's vtbl. The node's
QI does have a temporary workaround right now that will get removed.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-09-07 17:17:11 +02:00
Gabriel Ivăncescu 41396b5bcc mshtml: Implement querySelectorAll for document fragments.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-09-05 16:57:28 +02:00
Gabriel Ivăncescu 833286f485 mshtml: Implement querySelector for document fragments.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-09-05 16:57:28 +02:00
Gabriel Ivăncescu 84847d7de9 mshtml: Implement Cycle Collection for objects that don't require traversal.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-21 22:47:42 +02:00
Gabriel Ivăncescu a54b322f6b mshtml: Implement node cycle collection using the dispex.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-16 08:51:27 +02:00
Gabriel Ivăncescu 965040f04b mshtml: Use designated initializers in node vtables.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-16 08:51:23 +02:00
Gabriel Ivăncescu b4f9aee68c mshtml: Use designated initializers in dispex and event target vtables.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-16 08:51:23 +02:00
Gabriel Ivăncescu dfd32a332a mshtml: Make all event target vtbls const.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-16 08:51:23 +02:00
Gabriel Ivăncescu c81c0aa7a3 mshtml: Use ASCII strings for dispex object names.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-16 08:51:21 +02:00
Gabriel Ivăncescu 6a2ca11c65 mshtml: Use unlink and destructor in the vtbl for function disps.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-02 19:59:26 +09:00
Gabriel Ivăncescu 3c92edfdf2 mshtml: Introduce unlink_ref helper.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-08-02 19:59:25 +09:00
Gabriel Ivăncescu 14db082f57 mshtml: Get rid of dispatch_nsevent_hook.
Since wine-gecko now implements synchronous events for image loads in legacy
modes, this is no longer needed.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-04-12 18:13:46 +02:00
Gabriel Ivăncescu 05f6885f62 mshtml: Share reference with the node for Gecko DOM Documents.
This simplifies the code and CC graph, like it's done for e.g. elements.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-03-20 21:03:40 +01:00
Gabriel Ivăncescu a62be201c8 mshtml: Hold ref to HTMLDocumentObj when calling external code.
It's possible for it (and the GeckoBrowser) to get detached and destroyed
while processing an external callback notification.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-03-09 17:31:26 +01:00
Gabriel Ivăncescu 97b509ea8b mshtml: Implement location props when there's no URI.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-01-27 13:39:06 +01:00
Santino Mazza 84f1b60e33 mshtml: Implement HTMLDocument_get_body for document fragments. 2023-01-26 22:05:13 +01:00
Santino Mazza 071f38b123 mshtml: Use This->node for HTMLDocument_get_all. 2023-01-26 22:05:13 +01:00
Gabriel Ivăncescu d38c1c1076 mshtml: Fix document fragment's inner window leak.
Document fragments own reference to the inner window, so it must be unlinked.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-12-15 18:30:38 +01:00
Gabriel Ivăncescu 144479afa1 mshtml: Send load event synchronously for img elements that loaded instantly in legacy modes.
Otherwise, script56.chm's javascript will keep reloading the image and
triggering onload events non-stop. It protects against this using a variable
"noReentry", which is only set temporarily while setting the source, so it
expects it to be triggered synchronously.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53927
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-30 20:48:20 +01:00
Gabriel Ivăncescu b99c89f383 mshtml: Return proper error for invalid selectors in IE8 mode.
More importantly it gets rid of the ERR since such failures are normal.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-28 21:01:55 +01:00
Alex Henrie 5c00a8a330 mshtml: Use standard C functions for memory allocation. 2022-11-24 22:20:20 +01:00
Evan Tang 0ba543acb4 mshtml: Hide things that were removed in IE11. 2022-11-17 16:35:54 +01:00
Gabriel Ivăncescu 67f07ffb3f mshtml: Use nsIDOMDocument instead of nsIDOMHTMLDocument where possible.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-08 20:09:13 +01:00
Gabriel Ivăncescu 33c4904363 mshtml: Implement document.importNode.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-07 21:16:10 +01:00
Gabriel Ivăncescu a3d08482ad mshtml: Implement document.referrer.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-31 21:23:47 +01:00
Gabriel Ivăncescu c25dfb7965 mshtml: Implement document.mimeType.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-31 21:23:47 +01:00
Gabriel Ivăncescu b5f48369bb mshtml: Get rid of the HTMLDocument basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-25 21:33:56 +02:00
Gabriel Ivăncescu 155969dcc9 mshtml: Get rid of the outer window in basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-25 21:33:56 +02:00
Gabriel Ivăncescu 46d4d263ba mshtml: Get rid of the outer_unk in basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-25 21:33:56 +02:00
Gabriel Ivăncescu f852f1a613 mshtml: Move the IDispatchEx interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-25 21:11:15 +02:00
Gabriel Ivăncescu 0c0efd3f63 mshtml: Move the IHTMLDocument7 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu 070cd2e82a mshtml: Move the IHTMLDocument6 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu 3b14acbd7f mshtml: Move the IHTMLDocument5 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu 527c2b286d mshtml: Move the IHTMLDocument4 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu 833a7a6202 mshtml: Move the IHTMLDocument3 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu eaaae51695 mshtml: Move the IHTMLDocument2 interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu 0759e86527 mshtml: Move the remaining non-IHTMLDocument* interfaces out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu c72686aec8 mshtml: Move HTMLDocumentObj implementation to oleobj.c.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-24 18:48:55 +02:00
Gabriel Ivăncescu da4a45cdaf mshtml: Move the OleObj interfaces out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-19 12:39:48 +02:00
Gabriel Ivăncescu 6c706e02ae mshtml: Move the IOleCommandTarget interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-19 12:39:48 +02:00
Gabriel Ivăncescu 07bf1d7304 mshtml: Move the Persist interfaces out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-19 12:39:48 +02:00
Gabriel Ivăncescu ac56d24e36 mshtml: Move the IServiceProvider interface out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-19 12:39:47 +02:00
Gabriel Ivăncescu 5e062a9948 mshtml: Move the ConnectionPointContainer out of basedoc.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-19 12:39:47 +02:00
Gabriel Ivăncescu fded20df6c mshtml: Don't create dynamic prop before checking if elem prop even exists.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-13 22:25:06 +02:00
Gabriel Ivăncescu d5c764e8c7 mshtml: Allow accessing some document elements as props via id.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-13 22:25:06 +02:00
Gabriel Ivăncescu 3216c04d71 mshtml: Expose props via element name only for specific element types.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-13 22:25:06 +02:00
Gabriel Ivăncescu 16c6c249a5 mshtml: Enumerate document elements with name.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-10 21:15:29 +02:00
Gabriel Ivăncescu 6420744c57 mshtml: Split the lookup for an element with name into a separate helper.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-10 21:15:29 +02:00
Gabriel Ivăncescu 8a2883d3e9 mshtml: Override document.URL's name when adding it from the mshtml typelib.
Because the typelib should contain the lowercase `url` symbol instead.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-29 17:59:14 +02:00