mshtml: Added IHTMLTable::width property implementation. (try 3)

Zhenbo Li litimetal at gmail.com
Tue Apr 22 10:30:28 CDT 2014


Thank you for checking my patch.

try 3:
2014-04-21 17:30 GMT+08:00 Jacek Caban <jacek at codeweavers.com>:
 > val is not initialized here, so you shouldn't call nsAString_Finish 
on it.
I initialized val in var2str(). Maybe I should move that code to setter?
 > Did you ever see it being VT_I4 in real Windows? If my testing is tight,
 > this test hides a problem with your getter implementation.
You're right. I should follow test result, instead of MSDN.


2014-04-21 22:42 GMT+08:00 Qian Hong <fracting at gmail.com>:
 > Also it's not correct or at least not good to use nsresult  sres here,
Sorry, I forgot to fix that...

I have a question then:
As I use a switch to truncate the number in getter, getter seems to be 
too big. Should I move that code to another helper? Or do that when 
implementing other properties like height?

try 2:
Thanks for Jacek's suggestions.
   1. Convert float to int in getter, instead of setter.
   2. Make the helper more generic (var2str)
   3. Don't mistake HRESULT/nsresult
   4. Don't use return_nsst in the old way
   5. More strict in cmp_length

origin:

As my test case shows, windows would truncate float numbers.
I considered VarInt() in oleaut32.dll, but I think to declare
var2str_length() is more clear.

---
  dlls/mshtml/htmltable.c | 99 
+++++++++++++++++++++++++++++++++++++++++++++++--
  dlls/mshtml/tests/dom.c | 48 ++++++++++++++++++++++++
  2 files changed, 143 insertions(+), 4 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mshtml-Added-IHTMLTable-width-property-implementation.txt
Type: text/x-patch
Size: 5861 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140422/60b47549/attachment.bin>


More information about the wine-patches mailing list