Bug 936567 - Add proper support for apzc scale in browser binding utils, fixing up various ui element positioning issues with zoom. r=mbrubeck

This commit is contained in:
Jim Mathies 2013-11-20 12:45:43 -06:00
parent b9e5f39e13
commit 2bc5b505df

View File

@ -292,6 +292,19 @@
</body>
</method>
<property name="scale">
<getter><![CDATA[
let cwu = this.contentDocument
.defaultView
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
let resx = {}, resy = {};
cwu.getResolution(resx, resy);
// Resolution set by the apzc and is symmetric.
return resx.value;
]]></getter>
</property>
<field name="_messageListenerLocal"><![CDATA[
({
self: this,
@ -609,11 +622,6 @@
take it into account. This is useless for non-remote browser -->
<field name="_contentDocumentLeft">0</field>
<!-- The ratio of device pixels to CSS pixels -->
<property name="scale"
onget="return 1;"
onset="return 1;"/>
<!-- These counters are used to update the cached viewport after they reach a certain
threshold when scrolling -->
<field name="_cacheRatioWidth">1</field>