mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1328868 - Part 3 - Make the effective text zoom retrievable from JS. r=tnikkel
We want to read this value during testing. MozReview-Commit-ID: FVA7VdvSTEt --HG-- extra : rebase_source : 7ae56480ad34a4b3b417b3593496619a55910ec6
This commit is contained in:
parent
8a6b5c9c8a
commit
c49f232ab2
@ -200,6 +200,9 @@ interface nsIContentViewer : nsISupports
|
||||
/** The amount by which to scale all text. Default is 1.0. */
|
||||
attribute float textZoom;
|
||||
|
||||
/** The actual text zoom in effect, as modified by the system font scale. */
|
||||
readonly attribute float effectiveTextZoom;
|
||||
|
||||
/** The amount by which to scale all lengths. Default is 1.0. */
|
||||
attribute float fullZoom;
|
||||
|
||||
|
@ -3016,6 +3016,15 @@ nsDocumentViewer::GetTextZoom(float* aTextZoom)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::GetEffectiveTextZoom(float* aEffectiveTextZoom)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEffectiveTextZoom);
|
||||
nsPresContext* pc = GetPresContext();
|
||||
*aEffectiveTextZoom = pc ? pc->EffectiveTextZoom() : 1.0f;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocumentViewer::SetMinFontSize(int32_t aMinFontSize)
|
||||
{
|
||||
|
@ -552,6 +552,13 @@
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
<property name="effectiveTextZoom"
|
||||
readonly="true">
|
||||
<getter><![CDATA[
|
||||
return this.markupDocumentViewer.effectiveTextZoom;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="isSyntheticDocument">
|
||||
<getter><![CDATA[
|
||||
return this.contentDocument.mozSyntheticDocument;
|
||||
|
Loading…
Reference in New Issue
Block a user