<?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>99751</bug_id>
          
          <creation_ts>2012-10-18 13:28:01 -0700</creation_ts>
          <short_desc>PageViewportController::m_rawAttributes.devicePixelRatio is not initialized</short_desc>
          <delta_ts>2012-10-19 05:27:51 -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>Layout and Rendering</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="Yael">yael</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abecsi</cc>
    
    <cc>kenneth</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>745507</commentid>
    <comment_count>0</comment_count>
    <who name="Yael">yael</who>
    <bug_when>2012-10-18 13:28:01 -0700</bug_when>
    <thetext>PageViewportController::m_rawAttributes.devicePixelRatio is not initialized and can cause the zoom level to become infinity.
It seems in qt port it starts with garbage value but in EFL port starts with 0, and then the zoom level is set to infinity in computeMinimumScaleFactorForContentContained . Once minimum scale starts as infinity, it never goes down.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>745512</commentid>
    <comment_count>1</comment_count>
      <attachid>169458</attachid>
    <who name="Yael">yael</who>
    <bug_when>2012-10-18 13:37:58 -0700</bug_when>
    <thetext>Created attachment 169458
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>745569</commentid>
    <comment_count>2</comment_count>
      <attachid>169458</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-18 14:20:20 -0700</bug_when>
    <thetext>Comment on attachment 169458
Patch

Clearing flags on attachment: 169458

Committed r131802: &lt;http://trac.webkit.org/changeset/131802&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>745570</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-18 14:20:23 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746125</commentid>
    <comment_count>4</comment_count>
      <attachid>169458</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-10-19 01:34:08 -0700</bug_when>
    <thetext>Comment on attachment 169458
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169458&amp;action=review

&gt; Source/WebKit2/UIProcess/PageViewportController.cpp:74
&gt; +    m_rawAttributes.devicePixelRatio = 1;

ARgh, this device pixel ratio should be removed from here instead and we should use Page::deviceScaleFactor like everyone else</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746145</commentid>
    <comment_count>5</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-10-19 02:08:07 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 169458 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=169458&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/PageViewportController.cpp:74
&gt; &gt; +    m_rawAttributes.devicePixelRatio = 1;
&gt; 
&gt; ARgh, this device pixel ratio should be removed from here instead and we should use Page::deviceScaleFactor like everyone else

Since the recent refactor, we do not use m_rawAttributes.devicePixelRatio any more, so this patch does not really have an effect.

I&apos;ll prepare a patch to remove it from the attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746231</commentid>
    <comment_count>6</comment_count>
    <who name="Yael">yael</who>
    <bug_when>2012-10-19 05:17:25 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (From update of attachment 169458 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=169458&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebKit2/UIProcess/PageViewportController.cpp:74
&gt; &gt; &gt; +    m_rawAttributes.devicePixelRatio = 1;
&gt; &gt; 
&gt; &gt; ARgh, this device pixel ratio should be removed from here instead and we should use Page::deviceScaleFactor like everyone else
&gt; 
&gt; Since the recent refactor, we do not use m_rawAttributes.devicePixelRatio any more, so this patch does not really have an effect.
&gt; 
&gt; I&apos;ll prepare a patch to remove it from the attributes.

Well, without this patch, I saw a black screen in my version of EFL MIniBrowser, after hooking it up with PageViewController.
The reason was that the zoom level was infinity.

m_rawAttributes.devicePixelRatio is actually used in computeMinimumScaleFactorForContentContained (ViewportAgruments.cpp)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>746233</commentid>
    <comment_count>7</comment_count>
    <who name="Andras Becsi">abecsi</who>
    <bug_when>2012-10-19 05:27:51 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; (From update of attachment 169458 [details] [details] [details])
&gt; &gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=169458&amp;action=review
&gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Source/WebKit2/UIProcess/PageViewportController.cpp:74
&gt; &gt; &gt; &gt; +    m_rawAttributes.devicePixelRatio = 1;
&gt; &gt; &gt; 
&gt; &gt; &gt; ARgh, this device pixel ratio should be removed from here instead and we should use Page::deviceScaleFactor like everyone else
&gt; &gt; 
&gt; &gt; Since the recent refactor, we do not use m_rawAttributes.devicePixelRatio any more, so this patch does not really have an effect.
&gt; &gt; 
&gt; &gt; I&apos;ll prepare a patch to remove it from the attributes.
&gt; 
&gt; Well, without this patch, I saw a black screen in my version of EFL MIniBrowser, after hooking it up with PageViewController.
&gt; The reason was that the zoom level was infinity.
&gt; 
&gt; m_rawAttributes.devicePixelRatio is actually used in computeMinimumScaleFactorForContentContained (ViewportAgruments.cpp)

Yes, you are right restrictMinimumScaleFactorToViewportSize and computeMinimumScaleFactorForContentContained could be called before didChangeViewportAttributes.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>169458</attachid>
            <date>2012-10-18 13:37:58 -0700</date>
            <delta_ts>2012-10-19 01:34:08 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>99751.patch</filename>
            <type>text/plain</type>
            <size>1759</size>
            <attacher name="Yael">yael</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL1VJUHJvY2Vzcy9QYWdlVmlld3BvcnRDb250cm9sbGVyLmNw
cAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2ViS2l0Mi9VSVByb2Nlc3MvUGFnZVZpZXdwb3J0Q29u
dHJvbGxlci5jcHAJKHJldmlzaW9uIDEzMDY1MCkKKysrIFNvdXJjZS9XZWJLaXQyL1VJUHJvY2Vz
cy9QYWdlVmlld3BvcnRDb250cm9sbGVyLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNjksOCArNjks
OSBAQAogICAgICwgbV9oYWRVc2VySW50ZXJhY3Rpb24oZmFsc2UpCiAgICAgLCBtX2VmZmVjdGl2
ZVNjYWxlKDEpCiB7Ci0gICAgLy8gSW5pdGlhbGl6aW5nIFZpZXdwb3J0IFJhdyBBdHRyaWJ1dGVz
IHRvIGF2b2lkIHJhbmRvbSBuZWdhdGl2ZSBzY2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WV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisK
KyAgICAgICAgUGFnZVZpZXdwb3J0Q29udHJvbGxlcjo6bV9yYXdBdHRyaWJ1dGVzLmRldmljZVBp
eGVsUmF0aW8gbmVlZHMgdG8gYmUgaW5pdGlhbGl6ZWQuCisgICAgICAgIER1ZSB0byByYWNlIGNv
bmRpdGlvbiwgd2UgY291bGQgc2V0IHRoZSB2aWV3cG9ydCBhdHRyaWJ1dGVzIGJlZm9yZSB0aGUg
Zmlyc3QgbGF5b3V0LgorICAgICAgICBJZiB0aGF0IGhhcHBlbnMsIFBhZ2VWaWV3cG9ydENvbnRy
b2xsZXI6Om1fcmF3QXR0cmlidXRlcy5kZXZpY2VQaXhlbFJhdGlvCisgICAgICAgIGlzIHVzZWQg
d2l0aG91dCBiZWluZyBpbml0aWFsaXplZC4KKworICAgICAgICAqIFVJUHJvY2Vzcy9QYWdlVmll
d3BvcnRDb250cm9sbGVyLmNwcDoKKyAgICAgICAgKFdlYktpdDo6UGFnZVZpZXdwb3J0Q29udHJv
bGxlcjo6UGFnZVZpZXdwb3J0Q29udHJvbGxlcik6CisKIDIwMTItMTAtMTggIEFuZGVycyBDYXJs
c3NvbiAgPGFuZGVyc2NhQGFwcGxlLmNvbT4KIAogICAgICAgICBCdWlsZCBmaXguCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>