[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: ieframe:add app: protocol support to make mshtml triggerBeforeNavigate2 event when handle app: h
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2015-01-30 12:24:40
Message-ID: 54CB7808.6010901 () codeweavers ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@codeweavers.com>;
> *Date: * Thu, Jan 15, 2015 05:55 PM
> *To: * "wine-devel"<wine-devel@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


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Changhui,<br>
      <br>
      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.<br>
      <br>
      I tried your test app and it works find for me with recent Wine.
      Are you testing it against current Git?<br>
      <br>
      Jacek<br>
      <br>
      On 01/30/15 09:53, Changhui Liu wrote:<br>
    </div>
    <blockquote cite="mid:tencent_43736252551BA93915E9C0F2@qq.com"
      type="cite">
      <div>Hi Jacek:</div>
      <div>I found that the real reason is urlmon!get_protocol_cf return
        MK_E_SYNTAX(0x800401e4<span style="line-height: 1.5;">) </span><span
          style="line-height: 1.5;">when it open this registry key </span><span
          style="line-height: 1.5;">“HKEY_CLASSES_ROOT\PROTOCOLS\Handler\</span><span
          style="line-height: 1.5;">app” failed.</span></div>
      <div>Do you think the right way is implement a new 'app:' protocol
        handle like "<span style="line-height: \
1.5;">HKEY_CLASSES_ROOT\PROTOCOLS\Handler\</span><span  style="line-height: \
1.5;">http"?</span></div>  <div><br>
      </div>
      <div>Thank you!</div>
      <div><sign signid="0">
          <div style="color:#909090;font-family:Arial
            Narrow;font-size:12px"><br>
            <br>
            <br>
            <br>
            ------------------</div>
          <div style="font-size:14px;font-family:Verdana;color:#000;">
            <div>Regards,</div>
            <div>Changhui.</div>
          </div>
        </sign></div>
      <div> </div>
      <div><includetail>
          <div> </div>
          <div> </div>
          <div style="font:Verdana normal 14px;color:#000;">
            <div style="FONT-SIZE: 12px;FONT-FAMILY: Arial
              Narrow;padding:2px 0 2px 0;">------------------ Original \
------------------</div>  <div style="FONT-SIZE: \
12px;background:#efefef;padding:8px;">  <div id="menu_sender"><b>From: </b> "Jacek
                Caban"<a class="moz-txt-link-rfc2396E" \
href="mailto:jacek@codeweavers.com">&lt;jacek@codeweavers.com&gt;</a>;</div>  \
                <div><b>Date: </b> Thu, Jan 15, 2015 05:55 PM</div>
              <div><b>To: </b> "wine-devel"<a class="moz-txt-link-rfc2396E" \
href="mailto:wine-devel@winehq.org">&lt;wine-devel@winehq.org&gt;</a>;  <wbr></div>
              <div><b>Subject: </b> Re: ieframe:add app: protocol
                support to make mshtml triggerBeforeNavigate2 event when
                handle app: hyperlink</div>
            </div>
            <div> </div>
            <div class="moz-cite-prefix">Hi Changhui,<br>
              <br>
              On 01/15/15 02:39, Changhui Liu wrote:<br>
            </div>
            <blockquote
              cite="mid:tencent_361F1D250B0D4A5D74CF8031@qq.com"
              type="cite">
              <div>Hi, this verify test need the user click the app:
                hyperlink in browser, </div>
              <div>so it is hard to write a test in dlls/ieframe/tests.</div>
              <div><br>
              </div>
              <div>I upload the test html file and a test exe here:</div>
              <div><a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://www.imakevideo.com/app.html">http://www.imakevideo.com/app.html</a></div>
  <div><a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="http://www.imakevideo.com/mfc_web.zip">http://www.imakevideo.com/mfc_web.zip</a></div>
  <div><br>
              </div>
              <div>To run the test, extract mfc_web.zip, then run the
                mfc_web.exe, <span style="line-height: 1.5;">click the
                  Go button;</span></div>
              <div>A message "BeforeNavigate2 <a moz-do-not-send="true"
                  class="moz-txt-link-freetext">app:xxx</a>" will popup
                when click the app: <span style="line-height: \
1.5;">hyperlink</span><span  style="line-height: 1.5;"> </span></div>
              <div><span style="line-height: 1.5;">if
                  the BeforeNavigate2 event was triggered as like IE in
                  windows, or nothing.</span></div>
            </blockquote>
            <br>
            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.<br>
            <br>
            Jacek<br>
          </div>
          <!--<![endif]--></includetail></div>
    </blockquote>
    <br>
  </body>
</html>





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic