Commit graph

490 commits

Author SHA1 Message Date
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
Gabriel Ivăncescu e64ab65a5e mshtml: Don't expose document.onstorage for IE9+ modes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-14 22:38:35 +02:00
Gabriel Ivăncescu 720c671dac mshtml: Implement StorageEvent and send it when clearing the storage.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-14 22:38:35 +02:00
Gabriel Ivăncescu d44a32ba72 mshtml: Implement props enumeration for Storage.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-01 17:46:18 +02:00
Gabriel Ivăncescu c3c55c7fb7 mshtml: Implement GetMemberName for custom props.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-01 17:46:18 +02:00
Gabriel Ivăncescu f8bb1d7e4a mshtml: Implement deleting props for Storage.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-09-01 17:46:18 +02:00
Gabriel Ivăncescu 6b75f93002 mshtml: Return DISP_E_MEMBERNOTFOUND when not finding member by DISPID.
DISP_E_UNKNOWNNAME is for when retrieving the DISPID itself.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-08-12 22:13:05 +02:00
Gabriel Ivăncescu a4d6dc79b1 mshtml: Implement document.location with a hook.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-08-12 22:13:04 +02:00
Gabriel Ivăncescu 4cc16ada4b mshtml: Forward Document's Invoke to InvokeEx.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-08-12 22:13:04 +02:00
Gabriel Ivăncescu f48709cfe4 mshtml: Handle lack of window in methods for detached documents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-07-29 18:56:04 +02:00
Gabriel Ivăncescu 144b30d941 mshtml: Implement DocumentType node's name prop.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-07-29 18:56:04 +02:00