[PATCH 0/1] MR3409: mshtml: add some clarification to dispex_static_data_vtbl_t
Split from !3391, @insn -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3409
From: Yuxuan Shui <yshui(a)codeweavers.com> --- dlls/mshtml/mshtml_private.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 59d652a828b..76a07d20506 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -337,7 +337,12 @@ typedef struct dispex_dynamic_data_t dispex_dynamic_data_t; typedef struct DispatchEx DispatchEx; +/** + * vtable for DispatchEx, used for overriding default implementation of IDispatchEx, except for + * those specifically noted. + */ typedef struct { + /* Handler for `InvokeEx` with specifically DISPID_VALUE dispid. */ HRESULT (*value)(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*); HRESULT (*get_dispid)(DispatchEx*,BSTR,DWORD,DISPID*); HRESULT (*get_name)(DispatchEx*,DISPID,BSTR*); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3409
I think this comment is not truly accurate; the vtbl is more than just overriding (it doesn't really always override though), I can probably describe them properly if Jacek doesn't mind such comments though. (for starters, something like "dispex is our common IDispatchEx implementation for all mshtml objects, and the vtbl allows customizing the behavior depending on the object." would be more accurate; I could also briefly describe builtin props, dynamic props, and custom props) For "value" I'd say something like "called when the object wants to handle DISPID_VALUE". For "get_dispid" I'd say something like "called when the object wants to return DISPIDs for custom props." and so on. But let's see what Jacek thinks first. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3409#note_40283
Generally, improving MSHTML documentation sounds good to me. Just please don't overdo it (no esseys in comments, no stating obvious things, etc...). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3409#note_40290
I created !3417, so closing this, thanks. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3409#note_40296
This merge request was closed by Gabriel Ivăncescu. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3409
participants (4)
-
Gabriel Ivăncescu -
Jacek Caban (@jacek) -
Yuxuan Shui -
Yuxuan Shui (@yshui)