ieframe:add app: protocol support to make mshtml triggerBeforeNavigate2event when handle app: hyperlink

Changhui Liu liuchanghui at linuxdeepin.com
Sun Feb 1 21:51:50 CST 2015


Hi Jacek:
The latest wine can call BeforeNavigate2event now. 
But on windows the BeforeNavigate2event can be called two times,
the first is : "BeforeNavigate2:app:meihua ", 
the second is: "BeforeNavigate2:res://ieframe.dll/unknownprotocol.htm#app:meihua"
I will try to add a handle as you advice.



Thank you very much.








------------------
Regards,
Changhui.
 

 
 
 
------------------ Original ------------------
From:  "Jacek Caban"<jacek at codeweavers.com>;
Date:  Fri, Jan 30, 2015 08:24 PM
To:  "Changhui Liu"<liuchanghui at linuxdeepin.com>; "wine-devel"<wine-devel at winehq.org>; 

Subject:  Re: ieframe:add app: protocol support to make mshtml triggerBeforeNavigate2event when handle app: hyperlink

 
                   Hi Changhui,
       
       No, there is no such thing as app protocol handler on Windows and       we shouldn't have one. This means that loading will (correctly)       fail for this protocol, but BeforeNavigate2 should happen before       it has a chance to fail. To support that, we have our own onclick       handler for anchor elements, where we initiate loading. See       HTMLAnchorElement_handle_event in htmlanchor.c.
       
       I tried your test app and it works find for me with recent Wine.       Are you testing it against current Git?
       
       Jacek
       
       On 01/30/15 09:53, Changhui Liu wrote:
     
            Hi Jacek:
       I found that the real reason is urlmon!get_protocol_cf return         MK_E_SYNTAX(0x800401e4) when it open this registry key “HKEY_CLASSES_ROOT\PROTOCOLS\Handler\app” failed.
       Do you think the right way is implement a new 'app:' protocol         handle like "HKEY_CLASSES_ROOT\PROTOCOLS\Handler\http"?
       
       
       Thank you!
                  
             
             
             
             ------------------
                        Regards,
             Changhui.
           
         
        
                   
            
                        ------------------ Original ------------------
                            From:  "Jacek                 Caban"<jacek at codeweavers.com>;
               Date:  Thu, Jan 15, 2015 05:55 PM
               To:  "wine-devel"<wine-devel at winehq.org>;                 
               Subject:  Re: ieframe:add app: protocol                 support to make mshtml triggerBeforeNavigate2 event when                 handle app: hyperlink
             
              
             Hi Changhui,
               
               On 01/15/15 02:39, Changhui Liu wrote:
             
                            Hi, this verify test need the user click the app:                 hyperlink in browser, 
               so it is hard to write a test in dlls/ieframe/tests.
               
               
               I upload the test html file and a test exe here:
               http://www.imakevideo.com/app.html
               http://www.imakevideo.com/mfc_web.zip
               
               
               To run the test, extract mfc_web.zip, then run the                 mfc_web.exe, click the                   Go button;
               A message "BeforeNavigate2 app:xxx" will popup                 when click the app: hyperlink 
               if                   the BeforeNavigate2 event was triggered as like IE in                   windows, or nothing.
                          
             It doesn't seem right. There is nothing special about app:             protocol handling, BeforeNavigate2 should be called in this             case the same way as for any other protocol. You need to             find the real reason why it's not called instead of calling             it in an error case. The bug is likely to be in mshtml.
             
             Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150202/1fbaaabb/attachment.html>


More information about the wine-devel mailing list