Ideas about mshtml for GSoC 2014

Jacek Caban jacek at
Tue Mar 11 04:35:05 CDT 2014

Hi Zhenbo,

On 03/10/14 05:21, Zhenbo Li wrote:
> Hello,
> I'm Zhenbo Li, a student in Shanghai JiaoTong University, China. I
> have been a Wine user for almost 4 years, and I've been preparing for
> GSoC for several month.
> Since 2013, I've translated some wiki pages into Chinese[1], reported
> nearly 40 bugs[2], involved in Appdb[3], and sent few patches[4]. I'm
> glad to do more contribution to Wine in 2014.
> While using Wine, it is common to face a bug in mshtml[5]. Native
> iexplore may be a workaround, but it can cause other problems, too. So
> my idea is to implement some functions in mshtml.dll.
> I have a rough plan now, and I wish to get your advice. As I have
> about 3 months, I want to implement some functions in IHTMLTable,
> IHTMLTableCol, etc., and write testcaes for them. I've written some
> draft patches for IHTMLTableRow, and I'll send them to wine-patches
> after improving them with your advice. I hope I can establish a proper
> schedule after communicating with my mentor.
> I'm also open to any suggestion, and any comment or advice is great appreciated.

I think that MSHTML may make a good GSoC project. The application will
probably need some more concrete task. We will also need to see that
you're prepared to the task and sending those patches is a good start.
Here are some comments to your patches:

+    ret = nsAString_Init(&val, v);
+    if (!ret){
+        ERR("nsAString_Init(%s) failed!\n", debugstr_w(v));
+        return E_FAIL;
+    }

In case where you control the value assigned to nsAString, like in this
case, use nsAString_InitDepend to avoid unneeded alloc and copy. This is
also infailable, so no error checks are needed.

+    nsres = nsIDOMHTMLTableRowElement_SetAlign(This->nsrow, &val);
+    if (NS_FAILED(nsres)){
+        ERR("Set Align(%s) failed!\n", debugstr_w(v));
+        nsAString_Finish(&val);
+        return E_FAIL;
+    }
+    nsAString_Finish(&val);

Release the string just after SetAlign call so that you don't need to do that on each branch.

Same for other patches and they are ready to go to wine-patches.


More information about the wine-devel mailing list