<?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>103889</bug_id>
          
          <creation_ts>2012-12-03 06:51:37 -0800</creation_ts>
          <short_desc>[Qt][WK2] REGRESSION(r135399): It made qmltests::DoubleTapToZoom::test_double_zoomInAndBack() API test fail</short_desc>
          <delta_ts>2012-12-05 08:29:43 -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>New Bugs</component>
          <version>420+</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>70236</blocked>
    
    <blocked>102801</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Andras Becsi">abecsi</assigned_to>
          <cc>abecsi</cc>
    
    <cc>allan.jensen</cc>
    
    <cc>jturcotte</cc>
    
    <cc>kenneth</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>781410</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-12-03 06:51:37 -0800</bug_when>
    <thetext>FAIL!  : qmltests::DoubleTapToZoom::test_double_zoomInAndBack() &apos;wait for signal contentsScaleCommitted&apos; returned FALSE. ()
   Loc: [/home/webkitbuildbot/slaves/release64bitWebKit2_EC2/buildslave/qt-linux-64-release-webkit2/build/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml(80)]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>782573</commentid>
    <comment_count>1</comment_count>
      <attachid>177492</attachid>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-04 08:35:00 -0800</bug_when>
    <thetext>Created attachment 177492
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783567</commentid>
    <comment_count>2</comment_count>
      <attachid>177492</attachid>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-12-05 02:30:33 -0800</bug_when>
    <thetext>Comment on attachment 177492
Patch

I had a chat with Allan and maybe it is wrong that we call clearRelativeZoomState() in PageViewportControllerClientQt::didChangeViewportAttributes. I think that the initial intention was to catch when the controller adjust the content to fit because of it being zoomed out too much.
The fact that we are mixing those things together is leading to this kind of bug, so maybe we should put that line somewhere else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783644</commentid>
    <comment_count>3</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-05 04:28:00 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 177492 [details])
&gt; I had a chat with Allan and maybe it is wrong that we call clearRelativeZoomState() in PageViewportControllerClientQt::didChangeViewportAttributes. I think that the initial intention was to catch when the controller adjust the content to fit because of it being zoomed out too much.
&gt; The fact that we are mixing those things together is leading to this kind of bug, so maybe we should put that line somewhere else.

In the original design we used to clean the stack when applying the initial scale, but a lot of things changed since then.
We might need to add a new function to the client interface to be able to explicitly clear the stack without relying on the viewport attributes changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783647</commentid>
    <comment_count>4</comment_count>
      <attachid>177492</attachid>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-05 04:32:53 -0800</bug_when>
    <thetext>Comment on attachment 177492
Patch

Clearing flags on attachment: 177492

Committed r136668: &lt;http://trac.webkit.org/changeset/136668&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783648</commentid>
    <comment_count>5</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-05 04:32:57 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783693</commentid>
    <comment_count>6</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-12-05 06:09:45 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; In the original design we used to clean the stack when applying the initial scale, but a lot of things changed since then.
&gt; We might need to add a new function to the client interface to be able to explicitly clear the stack without relying on the viewport attributes changes.

loadCommitted might be more appropriate then.
PageViewportControllerClientQt::setContentsScale also resets the stack for the initial scale, which might be the case you are talking about.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783698</commentid>
    <comment_count>7</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-05 06:26:25 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #3)
&gt; &gt; In the original design we used to clean the stack when applying the initial scale, but a lot of things changed since then.
&gt; &gt; We might need to add a new function to the client interface to be able to explicitly clear the stack without relying on the viewport attributes changes.
&gt; 
&gt; loadCommitted might be more appropriate then.
&gt; PageViewportControllerClientQt::setContentsScale also resets the stack for the initial scale, which might be the case you are talking about.

(In reply to comment #6)
&gt; (In reply to comment #3)
&gt; &gt; In the original design we used to clean the stack when applying the initial scale, but a lot of things changed since then.
&gt; &gt; We might need to add a new function to the client interface to be able to explicitly clear the stack without relying on the viewport attributes changes.
&gt; 
&gt; loadCommitted might be more appropriate then.
&gt; PageViewportControllerClientQt::setContentsScale also resets the stack for the initial scale, which might be the case you are talking about.

Yes, but since we defer setting the scale to didRenderFrame we do not actually use the isInitial flag in setContentsScale, so this information is lost.

The problem with load committed is that on complex pages the user might still double-tap _after_ loadCommitted but _before_ pageTransitionViewportReady and the stack would not be reset.
So I guess the right spot for explicitly clearing the scale stack would be in pageTransitionViewportReady, or to be more precise: we should reset if we apply the initial scale.
I will try to clean this up after the release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783720</commentid>
    <comment_count>8</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2012-12-05 07:23:09 -0800</bug_when>
    <thetext>(In reply to comment #7)
Ok I see, that makes sense.

pageTransitionViewportReady is still something that has no direct effect on the client, the user is still seeing the old page at this point. We could also try to carry the flag through applyScaleAfterRenderingContents.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>783780</commentid>
    <comment_count>9</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-12-05 08:29:43 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; Ok I see, that makes sense.
&gt; 
&gt; pageTransitionViewportReady is still something that has no direct effect on the client, the user is still seeing the old page at this point. We could also try to carry the flag through applyScaleAfterRenderingContents.

Yepp, that&apos;s what I actually meant by &quot;we should reset if we apply the initial scale.&quot;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>177492</attachid>
            <date>2012-12-04 08:35:00 -0800</date>
            <delta_ts>2012-12-05 04:32:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-103889-20121204173153.patch</filename>
            <type>text/plain</type>
            <size>3511</size>
            <attacher name="Andras Becsi">abecsi</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTM2NTEwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggYmZkY2ZiOGE4MGRlZjA3
ZDIwMmVhNjg2YzcyNmJlMTk4OGVlZTk5ZC4uOGE2ZDU0OGU3MGM3ZTM5MDk1OWQwM2ZiNDdkYzUx
YzdiYWRlZGE2NSAxMDA2NDQKLS0tIGEvU291cm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bmRlZFNjYWxlLCBtX2VmZmVjdGl2ZVNjYWxlLCAwLjAwMDEpKQogICAg
ICAgICAgICAgICAgICAgICBhcHBseVNjYWxlQWZ0ZXJSZW5kZXJpbmdDb250ZW50cyhib3VuZGVk
U2NhbGUpOwogICAgICAgICAgICAgfQogICAgICAgICB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>