<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>27690</bug_id>
          
          <creation_ts>2009-07-26 06:22:15 -0700</creation_ts>
          <short_desc>Don&apos;t override m_allowGeolocation set by ChromeClient::requestGeolocationPermissionForFrame</short_desc>
          <delta_ts>2009-08-07 13:45:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>26993</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Kwang Yul Seo">skyul</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bolsinga</cc>
    
    <cc>eric</cc>
    
    <cc>staikos</cc>
    
    <cc>steveblock</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>134807</commentid>
    <comment_count>0</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2009-07-26 06:22:15 -0700</bug_when>
    <thetext>In Geolocation::requestPermission, m_allowGeolocation is overriden to InProgress after page-&gt;chrome()-&gt;requestGeolocationPermissionForFrame(m_frame, this) is called. 

In case requestGeolocationPermissionForFrame is implemented with a modal dialog and calls Geolocation::setIsAllowed(true) directly, m_allowGeolocation never becomes Yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134808</commentid>
    <comment_count>1</comment_count>
      <attachid>33509</attachid>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2009-07-26 06:25:38 -0700</bug_when>
    <thetext>Created attachment 33509
Geolocation patch

Don&apos;t override m_allowGeolocation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>135279</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-07-28 11:02:27 -0700</bug_when>
    <thetext>Whoever wrote the geolocation stuff should review this.

I assume this client call is expected to be async not synchronous?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136669</commentid>
    <comment_count>3</comment_count>
    <who name="Steve Block">steveblock</who>
    <bug_when>2009-08-03 09:52:51 -0700</bug_when>
    <thetext>&gt; I assume this client call is expected to be async not synchronous?
That&apos;s correct.  I&apos;m not sure if there&apos;s any need to support synchronous client calls.

&gt; Whoever wrote the geolocation stuff should review this.
This was written by Greg. However, I&apos;m pretty sure that this patch doesn&apos;t fix the problem correctly.

If the supplied patch is used, and requestGeolocationPermissionsForFrame is implemented synchronously, watches will be called back twice, rather than once.

geolocationServicePositionChanged() assumes that if requestPermission() calls requestGeolocationPermissionsForFrame(), isAllowed() will return false immediately after requestPermission() returns. If requestGeolocationPermissionsForFrame() is implemented synchronously. this is not true.

So from geolocationServicePositionChanged(), requestPermission() will call requestGeolocationPermissionsForFrame(), which will synchronously call setIsAllowed(), call back into geolocationServicePositionChanged() and call back the one-shots and watchers. When requestPermission returns, isAllowed() will return true and the watchers will be called back a second time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>138103</commentid>
    <comment_count>4</comment_count>
      <attachid>33509</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-08-07 13:34:05 -0700</bug_when>
    <thetext>Comment on attachment 33509
Geolocation patch

r- per above comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>138114</commentid>
    <comment_count>5</comment_count>
    <who name="George Staikos">staikos</who>
    <bug_when>2009-08-07 13:45:16 -0700</bug_when>
    <thetext>This is identical to Yong&apos;s patch from our git repo which was checked in a while ago.

*** This bug has been marked as a duplicate of bug 26993 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>33509</attachid>
            <date>2009-07-26 06:25:38 -0700</date>
            <delta_ts>2009-08-07 13:34:04 -0700</delta_ts>
            <desc>Geolocation patch</desc>
            <filename>geolocation.patch</filename>
            <type>text/plain</type>
            <size>1380</size>
            <attacher name="Kwang Yul Seo">skyul</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0NjQwMSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMDktMDctMjYgIEt3YW5nIFl1bCBTZW8gIDxza3l1bEBjb21wYW55
MTAwLm5ldD4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBEb24ndCBvdmVycmlkZSBtX2FsbG93R2VvbG9jYXRpb24gc2V0IGJ5IENocm9tZUNsaWVudDo6
cmVxdWVzdEdlb2xvY2F0aW9uUGVybWlzc2lvbkZvckZyYW1lCisgICAgICAgIGh0dHBzOi8vYnVn
cy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0yNzY5MAorCisgICAgICAgIG1fYWxsb3dHZW9s
b2NhdGlvbiBpcyBvdmVycmlkZW4gdG8KKyAgICAgICAgSW5Qcm9ncmVzcyBhZnRlciBDaHJvbWVD
bGllbnQ6OnJlcXVlc3RHZW9sb2NhdGlvblBlcm1pc3Npb25Gb3JGcmFtZQorICAgICAgICBpcy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ydmljZSkK
</data>
<flag name="review"
          id="17775"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>