[PATCH] mshtml: Implemented numeral parsing in get_frame_by_name (try 2).

Qian Hong qhong at codeweavers.com
Tue Apr 1 15:08:07 CDT 2014


Try 2:
- Fixed a typo, kudos to Andre.
- Superseded patch 103603

Hi all,

When passing a numeral like string as array index to the window object, 
native IE correctly parses the string into an integer value while Wine 
doesn't. This patch fix the problem. Here is one simply test case:

Testcase:
   1 <html>
   2 <body>
   3 </body>
   4 <script type="text/javascript">
   5     var iframeEl = document.createElement('iframe');
   6     document.body.appendChild(iframeEl);
   7     document.write(window["0"]); //buggy in Wine builtin iexplore
   8 </script>
   9 </html>

In theory this patch need some more tests, because the above test case 
is far from perfect, fortunately we have the open source ECMAScript 3 
Conformance Test Suite ver. 0.2:
http://kangax.github.io/sputniktests-webrunner/

Before this patch, Wine builtin iexplore hangs on the first test case of 
the ECMAScript 3 Conformance Test Suite, after the patch, the 
Conformance Test Suite begin to run. Guess how far does it gone? To 
everyone's surprise, now Wine builtin iexplore passes all 5228 tests in 
the test case:

     Current test: 
15_Native_ECMA_Script_Objects/15.11_Error_Objects/15.11.4_Properties_of_the_Error_Prototype_Object/S15.11.4_A4
     Tests completed: 5228
     Total errors: 0
     Total failures: 0
     Elapsed time: 7:40
     Status: Completed. Final score (errors + failures; less is better): 0


This is definitely a great step of our Wine buitin iexplore, now our 
version beats Microsoft IE7 a lot.

Since now all ECMAScript 3 conformance tests passed, it is safe to 
assume that this patch is absolutely correct and no extra test cases 
needed, so I'm not going to contribute any C test case for it into our 
test framework because it is just duplicate work and waste of time - 
What can you worry if even the whole test suite passed?

I appreciate for any comments on the coding side part of my patch, but 
please don't comment on the correctness part before actually running the 
test suite with the patch, thanks a lot.

While I understand this patch is valuable, I promise I won't apply 
patent for this patch, really.



---
  dlls/mshtml/htmlwindow.c |   14 ++++++++++++++
  1 file changed, 14 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mshtml-Implemented-numeral-parsing-in-get_frame_by_nam.txt
Type: text/x-patch
Size: 801 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140402/29ac5ca1/attachment.bin>


More information about the wine-patches mailing list