<?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>127090</bug_id>
          
          <creation_ts>2014-01-16 02:16:30 -0800</creation_ts>
          <short_desc>[WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage</short_desc>
          <delta_ts>2014-01-20 15:34:56 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>1</everconfirmed>
          <reporter name="Thiago de Barros Lacerda">thiago.lacerda</reporter>
          <assigned_to name="Thiago de Barros Lacerda">thiago.lacerda</assigned_to>
          <cc>benjamin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>jinwoo7.song</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>968658</commentid>
    <comment_count>0</comment_count>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2014-01-16 02:16:30 -0800</bug_when>
    <thetext>When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by WebPageProxy::pageScaleFactor.
This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968662</commentid>
    <comment_count>1</comment_count>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2014-01-16 02:19:35 -0800</bug_when>
    <thetext>*** Bug 126261 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968702</commentid>
    <comment_count>2</comment_count>
      <attachid>221363</attachid>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2014-01-16 04:07:17 -0800</bug_when>
    <thetext>Created attachment 221363
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969940</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2014-01-20 11:36:49 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by WebPageProxy::pageScaleFactor.
&gt; This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.

What&apos;s the user-visible symptom of getting the wrong scale factor in the UI process?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969978</commentid>
    <comment_count>4</comment_count>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2014-01-20 13:18:52 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #0)
&gt; &gt; When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by WebPageProxy::pageScaleFactor.
&gt; &gt; This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized.
&gt; 
&gt; What&apos;s the user-visible symptom of getting the wrong scale factor in the UI process?

I can imagine a scenario that the user double clicks the WebView, in order to zoom the page, then WKViewSetContentScaleFactor gets called. Right after that it may need to set the position of the contents inside the view, so it gets centralized where the user has clicked. Without this patch he will not get the correct scale factor and the position may not be set correctly, unless the user caches the scale, which in my opinion is just an unnecessary duplication of information.
Besides that, I think is not good to have the UIProcess in a inconsistent state with the WebProcess, even for a short period of time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>970044</commentid>
    <comment_count>5</comment_count>
      <attachid>221363</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-20 15:34:53 -0800</bug_when>
    <thetext>Comment on attachment 221363
Patch

Clearing flags on attachment: 221363

Committed r162382: &lt;http://trac.webkit.org/changeset/162382&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>970045</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-20 15:34:56 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>221363</attachid>
            <date>2014-01-16 04:07:17 -0800</date>
            <delta_ts>2014-01-20 15:34:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-127090-20140116090716.patch</filename>
            <type>text/plain</type>
            <size>1606</size>
            <attacher name="Thiago de Barros Lacerda">thiago.lacerda</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTYyMTIyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggNjc2ODBhZTNmM2EyNGZl
NzcxMjBiNTRmNjZmYWNmOTQwMmY1MGY2Zi4uZjQ1Mzg4MDMzZDdiMGNiZGU0MzI2ZTY0NWI4ZWJm
ZGRiMTY0YTMzNCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE4IEBACisyMDE0LTAxLTE2ICBUaGlh
Z28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