<?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>87407</bug_id>
          
          <creation_ts>2012-05-24 11:11:23 -0700</creation_ts>
          <short_desc>window.devicePixelRatio should return the device&apos;s pixel ratio not a value dependent on the viewport</short_desc>
          <delta_ts>2012-06-15 20:54:22 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          
          <blocked>66687</blocked>
    
    <blocked>88114</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Barth">abarth</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>aelias</cc>
    
    <cc>bdakin</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>dev+webkit</cc>
    
    <cc>dino</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>feature-media-reviews</cc>
    
    <cc>fsamuel</cc>
    
    <cc>joepeck</cc>
    
    <cc>johnme</cc>
    
    <cc>kenneth</cc>
    
    <cc>kpiascik</cc>
    
    <cc>macpherson</cc>
    
    <cc>menard</cc>
    
    <cc>peter</cc>
    
    <cc>pnormand</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>632964</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 11:11:23 -0700</bug_when>
    <thetext>window.devicePixelRatio should return the device&apos;s pixel ratio, not the configured device scale factor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632965</commentid>
    <comment_count>1</comment_count>
      <attachid>143854</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 11:11:51 -0700</bug_when>
    <thetext>Created attachment 143854
work in progress</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632982</commentid>
    <comment_count>2</comment_count>
      <attachid>143859</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 11:25:04 -0700</bug_when>
    <thetext>Created attachment 143859
Work in progres</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632983</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 11:25:48 -0700</bug_when>
    <thetext>Apparently this matches what iOS does more closely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632991</commentid>
    <comment_count>4</comment_count>
      <attachid>143859</attachid>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-05-24 11:30:26 -0700</bug_when>
    <thetext>Comment on attachment 143859
Work in progres

This version looks great. Only question is whether all ports actually set defaultDeviceScaleFactor; I get the feeling it&apos;s currently somewhat optional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>632992</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 11:33:39 -0700</bug_when>
    <thetext>&gt; Only question is whether all ports actually set defaultDeviceScaleFactor; I get the feeling it&apos;s currently somewhat optional.

My next step is to write a test, which will hopefully help answer this question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633058</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 12:34:13 -0700</bug_when>
    <thetext>Note to folks looking at this bug: I&apos;m still very much learning about how we do scaling and/or pixel ratios.  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633068</commentid>
    <comment_count>7</comment_count>
      <attachid>143859</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-24 12:41:14 -0700</bug_when>
    <thetext>Comment on attachment 143859
Work in progres

I&apos;m confused by this change. Why is the old way wrong?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633074</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 12:50:11 -0700</bug_when>
    <thetext>&gt; I&apos;m confused by this change. Why is the old way wrong?

Here is what johnme wrote when he made this in the chromium-android branch: 

---8&lt;---
Tweak device-pixel-ratio &amp; device-width/height metrics.

   1. Always return the default devicePixelRatio (e.g. 2 on Galaxy Nexus)
   instead of changing it based on the viewport tag. This matches both
   iOS and Android Browser behavior, as well as being more useful.

   2. Use device-independent pixels for @media query &amp; CSSOM View
   widths/heights. This matches iOS, and arguably better matches specs,
   as well as being more useful.
---&gt;8---

My understanding is that these locations shouldn&apos;t be affected by the viewport tag, which is why we need to use the defaultDeviceScaleFactor rather than the current deviceScaleFactor.

As I wrote above, I&apos;m just learning about these mechanisms, so please be gentle.  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633081</commentid>
    <comment_count>9</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 12:56:39 -0700</bug_when>
    <thetext>Note: http://trac.webkit.org/browser/trunk/LayoutTests/fast/viewport/viewport-133.html seems to imply that devicePixelRatio should be affected by the viewport tag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633082</commentid>
    <comment_count>10</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-24 12:58:01 -0700</bug_when>
    <thetext>I see, but I think there&apos;s a misunderstanding about frame-&gt;page()-&gt;deviceScaleFactor(). This doesn&apos;t change with scaling; it&apos;s the screen pixel ratio (1 or 2), and nothing else.

That test looks wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633092</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:05:21 -0700</bug_when>
    <thetext>http://trac.webkit.org/browser/trunk/Source/WebCore/page/Page.cpp#L674 seems to have a bunch of machinery for handling dynamic updates, which doesn&apos;t seem that useful if the value is a constant.

I&apos;m tracking down who calls that function now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633104</commentid>
    <comment_count>12</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:16:01 -0700</bug_when>
    <thetext>&gt; I&apos;m tracking down who calls that function now.

It looks like at least Qt and Chromium call setDeviceScaleFactor when processing the viewport.

How does PLATFORM(MAC) handle scaling things for the viewport?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633106</commentid>
    <comment_count>13</comment_count>
    <who name="Konrad Piascik">kpiascik</who>
    <bug_when>2012-05-24 13:18:31 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; &gt; I&apos;m tracking down who calls that function now.
&gt; 
&gt; It looks like at least Qt and Chromium call setDeviceScaleFactor when processing the viewport.
&gt; 
&gt; How does PLATFORM(MAC) handle scaling things for the viewport?

BlackBerry does so as well
http://trac.webkit.org/browser/trunk/Source/WebKit/blackberry/Api/WebPage.cpp#L3338</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633108</commentid>
    <comment_count>14</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:21:05 -0700</bug_when>
    <thetext>&gt; How does PLATFORM(MAC) handle scaling things for the viewport?

Looks like PLATFORM(MAC) doesn&apos;t implement viewport:

http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm#L239</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633109</commentid>
    <comment_count>15</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:22:20 -0700</bug_when>
    <thetext>smfr: It looks like this value does change, which means that we&apos;ll need something like this patch to restore the unchanging nature of window.devicePixelRatio.

It sounds like I should change viewport-133.html to expect the correct behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633118</commentid>
    <comment_count>16</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-24 13:28:13 -0700</bug_when>
    <thetext>I guess we all have different notions of what deviceScaleFactor means :(

The zooming that mobile devices and Safari do on desktop should not affect deviceScaleFactor. They show up in pageScaleFactor etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633125</commentid>
    <comment_count>17</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:30:27 -0700</bug_when>
    <thetext>Fascinating.  Should we change viewport to affect the pageScaleFactor rather than the deviceScaleFactor?  We could potentially eliminate the defaultDeviceScaleFactor in that case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633162</commentid>
    <comment_count>18</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:41:59 -0700</bug_when>
    <thetext>Using the page scale factor for the viewport appear problematic because the page scale factor is settable via a public API.  For example, WKPageSetScaleFactor appears to set the page scale factor directly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633171</commentid>
    <comment_count>19</comment_count>
    <who name="Konrad Piascik">kpiascik</who>
    <bug_when>2012-05-24 13:48:08 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; &gt; I&apos;m confused by this change. Why is the old way wrong?
&gt; 
&gt; Here is what johnme wrote when he made this in the chromium-android branch: 
&gt; 
&gt; ---8&lt;---
&gt; Tweak device-pixel-ratio &amp; device-width/height metrics.
&gt; 
&gt;    1. Always return the default devicePixelRatio (e.g. 2 on Galaxy Nexus)
&gt;    instead of changing it based on the viewport tag. This matches both
&gt;    iOS and Android Browser behavior, as well as being more useful.
Why do we want this change?  A port can change its implementation to do what it wants with the results of computeViewportAttributes.

&gt; 
&gt;    2. Use device-independent pixels for @media query &amp; CSSOM View
&gt;    widths/heights. This matches iOS, and arguably better matches specs,
&gt;    as well as being more useful.

Aren&apos;t device-independent pixels independent from the default devicePixelRatio.  I thought they were supposed to be the viewport&apos;s value?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633181</commentid>
    <comment_count>20</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 13:53:13 -0700</bug_when>
    <thetext>kpiascik, I&apos;m sorry, I didn&apos;t understand your questions.

&gt; &gt;    1. Always return the default devicePixelRatio (e.g. 2 on Galaxy Nexus)
&gt; &gt;    instead of changing it based on the viewport tag. This matches both
&gt; &gt;    iOS and Android Browser behavior, as well as being more useful.
&gt;
&gt; Why do we want this change?  A port can change its implementation to do what it wants with the results of computeViewportAttributes.

I&apos;m not sure I understand.  Presumably whether window.devicePixelRatio is affected by viewport meta tag is something that should work the same in every browser.  My understanding is that window.devicePixelRatio should be a constant property of the device and not dependent on the configured viewport.  smfr appears to confirm that understanding in Comment #10.
 
&gt; &gt;    2. Use device-independent pixels for @media query &amp; CSSOM View
&gt; &gt;    widths/heights. This matches iOS, and arguably better matches specs,
&gt; &gt;    as well as being more useful.
&gt; 
&gt; Aren&apos;t device-independent pixels independent from the default devicePixelRatio.  I thought they were supposed to be the viewport&apos;s value?

I don&apos;t understand this question either, but I&apos;m inclined to sort out window.devicePixelRatio first and then figure out what the right thing to do with media queries second.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633228</commentid>
    <comment_count>21</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-24 14:30:24 -0700</bug_when>
    <thetext>(In reply to comment #20)
&gt; kpiascik, I&apos;m sorry, I didn&apos;t understand your questions.
&gt; 
&gt; &gt; &gt;    1. Always return the default devicePixelRatio (e.g. 2 on Galaxy Nexus)
&gt; &gt; &gt;    instead of changing it based on the viewport tag. This matches both
&gt; &gt; &gt;    iOS and Android Browser behavior, as well as being more useful.
&gt; &gt;
&gt; &gt; Why do we want this change?  A port can change its implementation to do what it wants with the results of computeViewportAttributes.
&gt; 
&gt; I&apos;m not sure I understand.  Presumably whether window.devicePixelRatio is affected by viewport meta tag is something that should work the same in every browser.  My understanding is that window.devicePixelRatio should be a constant property of the device and not dependent on the configured viewport.  smfr appears to confirm that understanding in Comment #10.

devicePixelRatio is basically the adjustment ratio. Like most mobile pages have been designed with a width of 320 in mind, and thus on iPhone4 it is 2x as 2x320 == 640. On many other devices such as android and firefox with device widths (in portrait mode) of 480, this value is often 1.5.

When the target-densitydpi is set to something differently from 160 dpi, say device-dpi on a 480x... Android device, no scale adjustment is applied to the content, thus it might make sense to expose different device-pixel-ratio.

I wonder what Android actually does here. John?

&gt; 
&gt; &gt; &gt;    2. Use device-independent pixels for @media query &amp; CSSOM View
&gt; &gt; &gt;    widths/heights. This matches iOS, and arguably better matches specs,
&gt; &gt; &gt;    as well as being more useful.
&gt; &gt; 
&gt; &gt; Aren&apos;t device-independent pixels independent from the default devicePixelRatio.  I thought they were supposed to be the viewport&apos;s value?
&gt; 
&gt; I don&apos;t understand this question either, but I&apos;m inclined to sort out window.devicePixelRatio first and then figure out what the right thing to do with media queries second.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633262</commentid>
    <comment_count>22</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-24 14:53:48 -0700</bug_when>
    <thetext>(In reply to comment #21)
&gt; (In reply to comment #20)
&gt; &gt; kpiascik, I&apos;m sorry, I didn&apos;t understand your questions.
&gt; &gt; 
&gt; &gt; &gt; &gt;    1. Always return the default devicePixelRatio (e.g. 2 on Galaxy Nexus)
&gt; &gt; &gt; &gt;    instead of changing it based on the viewport tag. This matches both
&gt; &gt; &gt; &gt;    iOS and Android Browser behavior, as well as being more useful.
&gt; &gt; &gt;
&gt; &gt; &gt; Why do we want this change?  A port can change its implementation to do what it wants with the results of computeViewportAttributes.
&gt; &gt; 
&gt; &gt; I&apos;m not sure I understand.  Presumably whether window.devicePixelRatio is affected by viewport meta tag is something that should work the same in every browser.  My understanding is that window.devicePixelRatio should be a constant property of the device and not dependent on the configured viewport.  smfr appears to confirm that understanding in Comment #10.
&gt; 
&gt; devicePixelRatio is basically the adjustment ratio. Like most mobile pages have been designed with a width of 320 in mind, and thus on iPhone4 it is 2x as 2x320 == 640. On many other devices such as android and firefox with device widths (in portrait mode) of 480, this value is often 1.5.

This is not how iOS treats it. It&apos;s simply a multiplier between device pixels and &quot;UI&quot; pixels (== CSS pixels on an unscaled page). It does not change with zooming or viewport settings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633273</commentid>
    <comment_count>23</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-24 15:00:04 -0700</bug_when>
    <thetext>
&gt; &gt; devicePixelRatio is basically the adjustment ratio. Like most mobile pages have been designed with a width of 320 in mind, and thus on iPhone4 it is 2x as 2x320 == 640. On many other devices such as android and firefox with device widths (in portrait mode) of 480, this value is often 1.5.
&gt; 
&gt; This is not how iOS treats it. It&apos;s simply a multiplier between device pixels and &quot;UI&quot; pixels (== CSS pixels on an unscaled page). It does not change with zooming or viewport settings.

iOS also doesn&apos;t support the target-densitydpi argument, which is the only one that modified the device-pixel-ratio. Android supports that, but if it doesn&apos;t modify the device-pixel-ratio we should fix this, I just wonder whether that actually makes sense since target-densitydpi = device-dpi means that there is no upscaling of the content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633276</commentid>
    <comment_count>24</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-24 15:01:25 -0700</bug_when>
    <thetext>&gt; &gt; This is not how iOS treats it. It&apos;s simply a multiplier between device pixels and &quot;UI&quot; pixels (== CSS pixels on an unscaled page). It does not change with zooming or viewport settings.

I don&apos;t think anyone changes this with zooming, but only when the target-densitydpi is set as it affects the upscaling of the contents.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633283</commentid>
    <comment_count>25</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 15:06:10 -0700</bug_when>
    <thetext>@kenneth: We&apos;re talking about this in #webkit now if you&apos;d like to talk more interactively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633309</commentid>
    <comment_count>26</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 15:42:34 -0700</bug_when>
    <thetext>We had a long discussion about this topic in IRC, and the net result is that we believe this patch is incorrect and should be reverted from the chromium-android branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633318</commentid>
    <comment_count>27</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-24 15:50:09 -0700</bug_when>
    <thetext>http://menacingcloud.com/?c=highPixelDensityDisplays is a good resource for people not knowing what device-pixel-ratio is used for.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633320</commentid>
    <comment_count>28</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-24 15:52:07 -0700</bug_when>
    <thetext>Other good resources mentioning this:

http://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/
http://developer.android.com/guide/webapps/targeting.html
http://developer.android.com/reference/android/webkit/WebView.html
http://dev.w3.org/csswg/css-device-adapt/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>633378</commentid>
    <comment_count>29</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-24 16:52:36 -0700</bug_when>
    <thetext>More fun with pixel ratios in Bug 87440 for those who are interested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636031</commentid>
    <comment_count>30</comment_count>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-05-29 08:04:41 -0700</bug_when>
    <thetext>Adam Barth wrote:
&gt; We had a long discussion about this topic in IRC, and the
&gt; net result is that we believe this patch is incorrect (...)

Unfortunately I missed this due to timezones. Let me try to explain the reason for this change.

On mobile pages with a &quot;width=device-width&quot; viewport, everyone agrees that window.devicePixelRatio and the corresponding media query should return the defaultDeviceScaleFactor, i.e. approximately (physical screen dpi / 160). That already works, with or without this patch.

There are two controversial cases:

  1. Desktop page with no viewport (or &quot;width=980&quot;).
  2. Mobile page with &quot;width=device-width, target-densitydpi=device=dpi&quot;.

In both these cases WebCore currently always returns 1 for window.devicePixelRatio and the corresponding media query, but it would be better to return defaultDevicePixelRatio.

Since there&apos;s no spec for devicePixelRatio, we need to choose our behavior based on:
  a) the de facto standard behavior
  b) usefulness


A) First, let&apos;s try to work out the defacto standard behavior.

I wrote a test page for both of the controversial cases above:

  1. http://jsbin.com/urowoh/33#none
  2. http://jsbin.com/urowoh/33#device-width,device-dpi

and tested on high dpi devices with recent copies of Android Browser, Chrome for Android, Firefox, IE Mobile, Nokia N9 browser, Opera Mobile and Mobile Safari.

On the 1st test page (no viewport):

- IE9 Mobile doesn&apos;t support window.devicePixelRatio or the media query.
- Android Browser, Chrome for Android, Opera Mobile and Mobile Safari all return the defaultDeviceScaleFactor (2.0 on a Samsung Galaxy Nexus, except Opera which returns 2.25 because they prefer to force their device-width metric to 320 instead of 360).
- Firefox Mobile and Nokia N9 browser return 1 (Firefox only for the media query; it seems not to support window.devicePixelRatio).

On the 2nd test page (width=device-width, target-densitydpi=device=dpi):

- IE Mobile, Mobile Firefox and Mobile Safari don&apos;t support target-densitydpi.
- Android Browser, Chrome for Android and Opera Mobile all return the defaultDeviceScaleFactor (2.0 on a Samsung Galaxy Nexus, except Opera which returns 2.25 because they prefer to force their device-width metric to 320 instead of 360).
- Nokia N9 browser is the only browser that returns 1.

In both cases it&apos;s clear that the de facto standard behavior is to return defaultDeviceScaleFactor, not 1.


B) Now let&apos;s consider which behavior is actually useful to web developers.

It&apos;s clear that always returning 1 when you are on a desktop page or a page with target-densitydpi=device-dpi provides no useful information. So what are we missing out on? Quite a lot, it turns out.

On desktop pages that can be viewed on high dpi devices, authors use the defaultDeviceScaleFactor to determine whether to load high dpi images etc (window.devicePixelRatio can be used to provide polyfills for img srcset).

On target-densitydpi=device-dpi pages, it&apos;s *crucial* for webpages to know the defaultDeviceScaleFactor, as they have taken on responsibility for scaling the page content appropriately for the device&apos;s dpi, e.g. they have to scale buttons in proportion to the defaultDeviceScaleFactor.


Conclusion: both because it&apos;s the de facto standard implemented by 4 browsers (including 3 based on WebKit), and because it&apos;s much more useful to web developers, we should always return the fixed defaultDeviceScaleFactor value for window.devicePixelRatio and device-pixel-ratio media queries instead of returning 1.

I&apos;m ambivalent about the actual implementation details though. If we can make deviceScaleFactor constant so it doesn&apos;t depend on the viewport, then I&apos;d be more than happy to get rid of defaultDeviceScaleFactor and use that instead. This might be cleaner, as I suspect there are several places where WebKit currently uses deviceScaleFactor where they intended to use defaultDeviceScaleFactor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636037</commentid>
    <comment_count>31</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-29 08:10:51 -0700</bug_when>
    <thetext>
&gt; On desktop pages that can be viewed on high dpi devices, authors use the defaultDeviceScaleFactor to determine whether to load high dpi images etc (window.devicePixelRatio can be used to provide polyfills for img srcset).

How does that help? You are painting one css units as one device pixel? How would loading higher resolution images and down-scaling them help?

&gt; On target-densitydpi=device-dpi pages, it&apos;s *crucial* for webpages to know the defaultDeviceScaleFactor, as they have taken on responsibility for scaling the page content appropriately for the device&apos;s dpi, e.g. they have to scale buttons in proportion to the defaultDeviceScaleFactor.

That is a pretty good point.

&gt; Conclusion: both because it&apos;s the de facto standard implemented by 4 browsers (including 3 based on WebKit), and because it&apos;s much more useful to web developers, we should always return the fixed defaultDeviceScaleFactor value for window.devicePixelRatio and device-pixel-ratio media queries instead of returning 1.

I am pretty OK with it, I just wanted to know the advantages of always returning it.

Now, how can I make use of the second use case if I do target-densitydpi=low-dpi? How will I know the actual difference in this case?


When we agree on this, can you send an email to the www-style?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636057</commentid>
    <comment_count>32</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-05-29 08:33:12 -0700</bug_when>
    <thetext>Did you not test iOS because it doesn&apos;t support target-densitydpi?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636208</commentid>
    <comment_count>33</comment_count>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-05-29 10:40:00 -0700</bug_when>
    <thetext>(In reply to comment #31)
&gt; &gt; On desktop pages that can be viewed on high dpi devices, authors use the defaultDeviceScaleFactor to determine whether to load high dpi images etc (window.devicePixelRatio can be used to provide polyfills for img srcset).
&gt; 
&gt; How does that help? You are painting one css units as one device pixel? How would loading higher resolution images and down-scaling them help?

But we&apos;re not painting one CSS unit per device pixel: we&apos;re scaling the page by a pageScaleFactor which is less than one (e.g. 320/980 = 0.327) in overview mode, and often greater than one when zoomed in and reading content. In particular, when pageScaleFactor == defaultDeviceScaleFactor the content will appear the same size as it does on a desktop monitor, and so this is an important zoom level to allow the page to optimize for.

This is complicated a little by Font Boosting / text size adjust, which means the user often doesn&apos;t need to zoom in so much on wide paragraphs, but defaultDeviceScaleFactor still provides a useful upper bound on how much a user is likely to need to zoom in.

&gt; Now, how can I make use of the second use case if I do target-densitydpi=low-dpi? How will I know the actual difference in this case?

I never quite worked out why people would ever use values other than auto or device-dpi for this; I&apos;d be keen to hear use cases where this is useful. In fact according to http://dev.w3.org/csswg/css-device-adapt/#the-target-densitydpi-property values other than device-dpi may be dropped.

In any case, on browsers that default to target-densitydpi=160 (i.e. most phone browsers other than Opera on Galaxy Nexus) web developers can calculate desired ratios by noting that low-dpi, medium-dpi and high-dpi are fixed at 120, 160 and 240, so on low-dpi with width=device-width the ratio of CSS pixels to device pixels is approximately (window.devicePixelRatio * 160/120).

I guess on devices with default target densities other than 160 (e.g. tablets and laptops, where distance from the screen is greater hence CSS pixels are larger due to http://www.w3.org/TR/css3-values/#reference-pixel) it might be useful to know what the default value of target-densitydpi=auto would have been if you hadn&apos;t overridden it with a fixed value, but generally if you&apos;re asking such questions you shouldn&apos;t have overridden it in the first place. So this may be a useful number to expose somehow, but it&apos;s pretty niche, and I don&apos;t think it&apos;s worth breaking the useful and commonplace uses of window.devicePixelRatio to achieve that.

&gt; When we agree on this, can you send an email to the www-style?

Sure, I&apos;ve been meaning to do that for a while.


(In reply to comment #32)
&gt; Did you not test iOS because it doesn&apos;t support target-densitydpi?

I did test iOS. Mobile Safari is included in the results for the no viewport test page (it returned the defaultDeviceScaleFactor, which was 2 on an iPod touch 4th gen). Obviously it wasn&apos;t possible to see what it would report when displaying a target-densitydpi page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636232</commentid>
    <comment_count>34</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2012-05-29 10:55:14 -0700</bug_when>
    <thetext>(In reply to comment #30)

&gt; In both cases it&apos;s clear that the de facto standard behavior is to return defaultDeviceScaleFactor, not 1.

[snip]

&gt; Conclusion: both because it&apos;s the de facto standard implemented by 4 browsers (including 3 based on WebKit), and because it&apos;s much more useful to web developers, we should always return the fixed defaultDeviceScaleFactor value for window.devicePixelRatio and device-pixel-ratio media queries instead of returning 1.

I&apos;m sorry, but we (Apple) can&apos;t change what we&apos;ve been returning for devicePixelRatio. As Simon mentioned, for us that exposes the scaling from CSS pixels to device pixels under no zoom (1 on normal resolution, 2 when we do pixel doubling for &quot;retina&quot; screens). The value never changes on a device.

If you want to expose something more useful to developers, then it would have to be a new property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636354</commentid>
    <comment_count>35</comment_count>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-05-29 12:59:19 -0700</bug_when>
    <thetext>(In reply to comment #34)
&gt; I&apos;m sorry, but we (Apple) can&apos;t change what we&apos;ve been returning for devicePixelRatio. As Simon mentioned, for us that exposes the scaling from CSS pixels to device pixels under no zoom (1 on normal resolution, 2 when we do pixel doubling for &quot;retina&quot; screens). The value never changes on a device.

We seem to be talking at cross purposes. I am calling for upstream WebKit to match downstream iOS whose behavior is to return the defaultDeviceScaleFactor, which is fixed per device (i.e. 2 on retina displays). Apple doesn&apos;t need to change iOS, we just need to change upstream WebKit to match what most of the ports are already doing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636424</commentid>
    <comment_count>36</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2012-05-29 14:15:05 -0700</bug_when>
    <thetext>(In reply to comment #35)
&gt; (In reply to comment #34)
&gt; &gt; I&apos;m sorry, but we (Apple) can&apos;t change what we&apos;ve been returning for devicePixelRatio. As Simon mentioned, for us that exposes the scaling from CSS pixels to device pixels under no zoom (1 on normal resolution, 2 when we do pixel doubling for &quot;retina&quot; screens). The value never changes on a device.
&gt; 
&gt; We seem to be talking at cross purposes. I am calling for upstream WebKit to match downstream iOS whose behavior is to return the defaultDeviceScaleFactor, which is fixed per device (i.e. 2 on retina displays). Apple doesn&apos;t need to change iOS, we just need to change upstream WebKit to match what most of the ports are already doing.

Excellent. Apologies for my confusion!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636558</commentid>
    <comment_count>37</comment_count>
      <attachid>143859</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 16:45:47 -0700</bug_when>
    <thetext>Comment on attachment 143859
Work in progres

Based on this discussion, it sounds like this patch is the one we should go with.

There&apos;s a separate question of whether target-densitydpi is a good API, but that&apos;s something to worry about in a different bug.  I&apos;ll spin up a new version of the patch that updates the test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636578</commentid>
    <comment_count>38</comment_count>
      <attachid>144644</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 17:05:55 -0700</bug_when>
    <thetext>Created attachment 144644
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636581</commentid>
    <comment_count>39</comment_count>
      <attachid>144644</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 17:06:43 -0700</bug_when>
    <thetext>Comment on attachment 144644
Patch

Note: I&apos;m not sure how to actually run that test, so I&apos;ll likely need to pull the right value off the bot after landing this patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636588</commentid>
    <comment_count>40</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-29 17:10:26 -0700</bug_when>
    <thetext>Attachment 144644 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;LayoutTests/ChangeLog&apos;, u&apos;LayoutTests/fast...&quot; exit_code: 1
Source/WebCore/css/MediaQueryEvaluator.cpp:297:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636606</commentid>
    <comment_count>41</comment_count>
      <attachid>144644</attachid>
    <who name="Build Bot">buildbot</who>
    <bug_when>2012-05-29 17:20:36 -0700</bug_when>
    <thetext>Comment on attachment 144644
Patch

Attachment 144644 did not pass win-ews (win):
Output: http://queues.webkit.org/results/12846655</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636610</commentid>
    <comment_count>42</comment_count>
      <attachid>144654</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 17:25:12 -0700</bug_when>
    <thetext>Created attachment 144654
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636618</commentid>
    <comment_count>43</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-05-29 17:29:30 -0700</bug_when>
    <thetext>Attachment 144654 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;LayoutTests/ChangeLog&apos;, u&apos;LayoutTests/fast...&quot; exit_code: 1
Source/WebCore/css/MediaQueryEvaluator.cpp:298:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636619</commentid>
    <comment_count>44</comment_count>
      <attachid>144654</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2012-05-29 17:31:00 -0700</bug_when>
    <thetext>Comment on attachment 144654
Patch

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

&gt; Source/WebCore/ChangeLog:16
&gt; +        There&apos;s been some confusing about this patch because the Android

typo: confusion</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636634</commentid>
    <comment_count>45</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 17:37:25 -0700</bug_when>
    <thetext>Thanks Dean.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636635</commentid>
    <comment_count>46</comment_count>
      <attachid>144661</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 17:38:50 -0700</bug_when>
    <thetext>Created attachment 144661
Patch for landing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636638</commentid>
    <comment_count>47</comment_count>
    <who name="Beth Dakin">bdakin</who>
    <bug_when>2012-05-29 17:41:51 -0700</bug_when>
    <thetext>This patch looks like it will break the Mac because I don&apos;t see setDefaultDeviceScaleFactor() ever called in the Mac port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636703</commentid>
    <comment_count>48</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2012-05-29 18:39:20 -0700</bug_when>
    <thetext>(In reply to comment #47)
&gt; This patch looks like it will break the Mac because I don&apos;t see setDefaultDeviceScaleFactor() ever called in the Mac port.

Settings::Settings has m_defaultDeviceScaleFactor(1). We&apos;d need to call setDefaultDeviceScaleFactor for retina.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636713</commentid>
    <comment_count>49</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-05-29 18:50:24 -0700</bug_when>
    <thetext>I&apos;m composing an email to webkit-dev about this topic.  I think we need to delete Settings::defaultDeviceScaleFactor and store three floats on Page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>636971</commentid>
    <comment_count>50</comment_count>
      <attachid>144661</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-30 00:37:38 -0700</bug_when>
    <thetext>Comment on attachment 144661
Patch for landing

Is it possible to make a test which sets it to 2.0 and then for a page without viewport meta tag, one with, etc?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>637104</commentid>
    <comment_count>51</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2012-05-30 04:21:34 -0700</bug_when>
    <thetext>I guess we should remove the devicePixelRatio from the WebCore::ViewportAttributes as part of this patch, as well?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>639568</commentid>
    <comment_count>52</comment_count>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-06-01 11:52:26 -0700</bug_when>
    <thetext>See also bug 88114 which covers how the (default) deviceScaleFactor is calculated in the first place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>650715</commentid>
    <comment_count>53</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-06-15 20:54:22 -0700</bug_when>
    <thetext>defaultDeviceScaleFactor no longer exists</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>143854</attachid>
            <date>2012-05-24 11:11:51 -0700</date>
            <delta_ts>2012-05-24 11:25:00 -0700</delta_ts>
            <desc>work in progress</desc>
            <filename>bug-87407-20120524111150.patch</filename>
            <type>text/plain</type>
            <size>3164</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci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1TY3JlZW4uaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2ViQ29yZS9wbGF0
Zm9ybS9QbGF0Zm9ybVNjcmVlbi5oCShyZXZpc2lvbiAxMTgzOTApCisrKyBTb3VyY2UvV2ViQ29y
ZS9wbGF0Zm9ybS9QbGF0Zm9ybVNjcmVlbi5oCSh3b3JraW5nIGNvcHkpCkBAIC01MSw2ICs1MSwx
MyBAQCBuYW1lc3BhY2UgV2ViQ29yZSB7CiAgICAgRmxvYXRSZWN0IHNjcmVlblJlY3QoV2lkZ2V0
Kik7CiAgICAgRmxvYXRSZWN0IHNjcmVlbkF2YWlsYWJsZVJlY3QoV2lkZ2V0Kik7CiAKKyAgICBm
bG9hdCBkZWZhdWx0RGV2aWNlUGl4ZWxSYXRpbyhXaWRnZXQqIHdpZGdldCkKKyAgICB7CisgICAg
ICAgIC8vIGRldmljZVBpeGVsUmF0aW8gaXMgZGUgZmFjdG8gcmVsYXRpdmUgdG8gMTYwZHBpLiBT
ZWUgYWxzbworICAgICAgICAvLyBjb21wdXRlVmlld3BvcnRBdHRyaWJ1dGVzIGluIFZpZXdwb3J0
QXJndW1lbnRzLmNwcC4KKyAgICAgICAgcmV0dXJuIHNjcmVlbkhvcml6b250YWxEUEkod2lkZ2V0
KSAvIDE2MC4wZjsKKyAgICB9CisKICNpZiBQTEFURk9STShNQUMpCiAgICAgTlNTY3JlZW4gKnNj
cmVlbkZvcldpbmRvdyhOU1dpbmRvdyAqKTsKIAo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>143859</attachid>
            <date>2012-05-24 11:25:04 -0700</date>
            <delta_ts>2012-05-29 17:05:51 -0700</delta_ts>
            <desc>Work in progres</desc>
            <filename>bug-87407-20120524112503.patch</filename>
            <type>text/plain</type>
            <size>2271</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExODM5NCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDEyLTA1LTI0ICBBZGFtIEJh
cnRoICA8YWJhcnRoQHdlYmtpdC5vcmc+CisKKyAgICAgICAgd2luZG93LmRldmljZVBpeGVsUmF0
aW8gc2hvdWxkIHJldHVybiB0aGUgZGV2aWNlJ3MgcGl4ZWwgcmF0aW8sIG5vdCB0aGUgY29uZmln
dXJlZCBkZXZpY2Ugc2NhbGUgZmFjdG9yCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3Jn
L3Nob3dfYnVnLmNnaT9pZD04NzQwNworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09Q
UyEpLgorCisgICAgICAgIE5vIG5ldyB0ZXN0cy4gKE9PUFMhKQorCisgICAgICAgICogY3NzL01l
ZGlhUXVlcnlFdmFsdWF0b3IuY3BwOgorICAgICAgICAoV2ViQ29yZTo6ZGV2aWNlX3BpeGVsX3Jh
dGlvTWVkaWFGZWF0dXJlRXZhbCk6CisgICAgICAgICogcGFnZS9ET01XaW5kb3cuY3BwOgorICAg
ICAgICAoV2ViQ29yZTo6RE9NV2luZG93OjpkZXZpY2VQaXhlbFJhdGlvKToKKwogMjAxMi0wNS0y
NCAgS2ludWtvIFlhc3VkYSAgPGtpbnVrb0BjaHJvbWl1bS5vcmc+CiAKICAgICAgICAgQ2xlYW51
cDogaW50cm9kdWNlIHRvRmlsZSgpIHRvIHJlZHVjZSBzdGF0aWMgY2FzdCBmcm9tIEJsb2IgdG8g
RmlsZQpJbmRleD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HVlKCksIG9wKTsKIAotICAgIHJldHVybiBmcmFtZS0+cGFnZSgpLT5kZXZpY2VT
Y2FsZUZhY3RvcigpICE9IDA7CisgICAgcmV0dXJuIHNjYWxlRmFjdG9yICE9IDA7CiB9CiAKIHN0
YXRpYyBib29sIGdyaWRNZWRpYUZlYXR1cmVFdmFsKENTU1ZhbHVlKiB2YWx1ZSwgUmVuZGVyU3R5
bGUqLCBGcmFtZSosIE1lZGlhRmVhdHVyZVByZWZpeCBvcCkKSW5kZXg6IFNvdXJjZS9XZWJDb3Jl
L3BhZ2UvRE9NV2luZG93LmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2ViQ29yZS9wYWdlL0RP
TVdpbmRvdy5jcHAJKHJldmlzaW9uIDExODM5MCkKKysrIFNvdXJjZS9XZWJDb3JlL3BhZ2UvRE9N
V2luZG93LmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTM4Miw3ICsxMzgyLDcgQEAgZG91YmxlIERP
TVdpbmRvdzo6ZGV2aWNlUGl4ZWxSYXRpbygpIGNvbgogICAgIGlmICghcGFnZSkKICAgICAgICAg
cmV0dXJuIDAuMDsKIAotICAgIHJldHVybiBwYWdlLT5kZXZpY2VTY2FsZUZhY3RvcigpOworICAg
IHJldHVybiBwYWdlLT5zZXR0aW5ncygpLT5kZWZhdWx0RGV2aWNlU2NhbGVGYWN0b3IoKTsKIH0K
IAogdm9pZCBET01XaW5kb3c6OnNjcm9sbEJ5KGludCB4LCBpbnQgeSkgY29uc3QK
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>144644</attachid>
            <date>2012-05-29 17:05:55 -0700</date>
            <delta_ts>2012-05-29 17:25:06 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-87407-20120529170554.patch</filename>
            <type>text/plain</type>
            <size>5105</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExODg1OSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDMwIEBACisyMDEyLTA1LTI5ICBBZGFtIEJh
cnRoICA8YWJhcnRoQHdlYmtpdC5vcmc+CisKKyAgICAgICAgd2luZG93LmRldmljZVBpeGVsUmF0
aW8gc2hvdWxkIHJldHVybiB0aGUgZGV2aWNlJ3MgcGl4ZWwgcmF0aW8gbm90IGEgdmFsdWUgZGVw
ZW5kZW50IG9uIHRoZSB2aWV3cG9ydAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9ODc0MDcKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMh
KS4KKworICAgICAgICBUaGVyZSdzIGJlZW4gYSBsb3Qgb2YgZGlzY3Vzc2lvbiBhYm91dCB0aGlz
IHBhdGNoLCBib3RoIG9uIHRoZSBidWcKKyAgICAgICAgcmVmZXJlbmNlZCBhYm92ZSBhbmQgb24g
I3dlYmtpdC4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTg3NDA3I2MzMCBoYXMgYSBnb29kIHN1bW1hcnkgb2YKKyAgICAgICAgdGhlIGRpc2N1c3Npb24g
YW5kIG1vdGl2YXRpb24gYmVoaW5kIHRoaXMgY2hhbmdlLiAgRXNzZW50aWFsbHksIHRoaXMKKyAg
ICAgICAgcGF0Y2ggbWFrZXMgV2ViS2l0J3MgYmVoYXZpb3Igb24gdHJ1bmsgbWF0Y2gg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Z3VyYXRpb25Gb3JWaWV3cG9ydCgyNDAsIDQ4MCwgNTY0LCA0ODAsIDUzNCk7Ci0gICAgICAgICAg
ICAgICAgc2hvdWxkQmVDbG9zZVRvKCJ3aW5kb3cuZGV2aWNlUGl4ZWxSYXRpbyIsIDAuNzA4MzMz
MzEzNDY1MTE4NCwgMC4wMDEsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICBzaG91bGRCZUNsb3Nl
VG8oIndpbmRvdy5kZXZpY2VQaXhlbFJhdGlvIiwgMSwgMC4wMDEsIGZhbHNlKTsKICAgICAgICAg
ICAgIH0KICAgICAgICAgfQogICAgIDwvc2NyaXB0Pgo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>144654</attachid>
            <date>2012-05-29 17:25:12 -0700</date>
            <delta_ts>2012-05-29 17:38:43 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-87407-20120529172511.patch</filename>
            <type>text/plain</type>
            <size>5282</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExODg1OSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDMwIEBACisyMDEyLTA1LTI5ICBBZGFtIEJh
cnRoICA8YWJhcnRoQHdlYmtpdC5vcmc+CisKKyAgICAgICAgd2luZG93LmRldmljZVBpeGVsUmF0
aW8gc2hvdWxkIHJldHVybiB0aGUgZGV2aWNlJ3MgcGl4ZWwgcmF0aW8gbm90IGEgdmFsdWUgZGVw
ZW5kZW50IG9uIHRoZSB2aWV3cG9ydAorICAgICAgICBodHRwczovL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bFJhdGlvIiwgMSwgMC4wMDEsIGZhbHNlKTsKICAg
ICAgICAgICAgIH0KICAgICAgICAgfQogICAgIDwvc2NyaXB0Pgo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>144661</attachid>
            <date>2012-05-29 17:38:50 -0700</date>
            <delta_ts>2012-05-30 00:37:37 -0700</delta_ts>
            <desc>Patch for landing</desc>
            <filename>bug-87407-20120529173849.patch</filename>
            <type>text/plain</type>
            <size>5278</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDExODg1OSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDMwIEBACisyMDEyLTA1LTI5ICBBZGFtIEJh
cnRoICA8YWJhcnRoQHdlYmtpdC5vcmc+CisKKyAgICAgICAgd2luZG93LmRldmljZVBpeGVsUmF0
aW8gc2hvdWxkIHJldHVybiB0aGUgZGV2aWNlJ3MgcGl4ZWwgcmF0aW8gbm90IGEgdmFsdWUgZGVw
ZW5kZW50IG9uIHRoZSB2aWV3cG9ydAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9z
aG93X2J1Zy5jZ2k/aWQ9ODc0MDcKKworICAgICAgICBSZXZpZXdlZCBieSBEZWFuIEphY2tzb24u
CisKKyAgICAgICAgVGhlcmUncyBiZWVuIGEgbG90IG9mIGRpc2N1c3Npb24gYWJvdXQgdGhpcyBw
YXRjaCwgYm90aCBvbiB0aGUgYnVnCisgICAgICAgIHJlZmVyZW5jZWQgYWJvdmUgYW5kIG9uICN3
ZWJraXQuCisgIC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luIDAuMDAxIG9mIDEKIApJbmRleDogTGF5
b3V0VGVzdHMvZmFzdC92aWV3cG9ydC92aWV3cG9ydC0xMzMuaHRtbAo9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBM
YXlvdXRUZXN0cy9mYXN0L3ZpZXdwb3J0L3ZpZXdwb3J0LTEzMy5odG1sCShyZXZpc2lvbiAxMTg4
NTkpCisrKyBMYXlvdXRUZXN0cy9mYXN0L3ZpZXdwb3J0L3ZpZXdwb3J0LTEzMy5odG1sCSh3b3Jr
aW5nIGNvcHkpCkBAIC03LDcgKzcsNyBAQAogICAgICAgICAgICAgaWYgKHdpbmRvdy5sYXlvdXRU
ZXN0Q29udHJvbGxlcikgewogICAgICAgICAgICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
bXBBc1RleHQoKTsKICAgICAgICAgICAgICAgICBsYXlvdXRUZXN0Q29udHJvbGxlci5kdW1wQ29u
ZmlndXJhdGlvbkZvclZpZXdwb3J0KDI0MCwgNDgwLCA1NjQsIDQ4MCwgNTM0KTsKLSAgICAgICAg
ICAgICAgICBzaG91bGRCZUNsb3NlVG8oIndpbmRvdy5kZXZpY2VQaXhlbFJhdGlvIiwgMC43MDgz
MzMzMTM0NjUxMTg0LCAwLjAwMSwgZmFsc2UpOworICAgICAgICAgICAgICAgIHNob3VsZEJlQ2xv
c2VUbygid2luZG93LmRldmljZVBpeGVsUmF0aW8iLCAxLCAwLjAwMSwgZmFsc2UpOwogICAgICAg
ICAgICAgfQogICAgICAgICB9CiAgICAgPC9zY3JpcHQ+Cg==
</data>
<flag name="commit-queue"
          id="151562"
          type_id="3"
          status="-"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>