Bug 1350643 - Part 7: Remove sync GetDPI/DefaultScale/WidgetRounding. Use primary screen's value until RecvShow. r=kanru
MozReview-Commit-ID: GlDMNecWp3j
This commit is contained in:
@@ -88,7 +88,7 @@ PuppetWidget::PuppetWidget(TabChild* aTabChild)
|
||||
: mTabChild(aTabChild)
|
||||
, mMemoryPressureObserver(nullptr)
|
||||
, mDPI(-1)
|
||||
, mRounding(-1)
|
||||
, mRounding(1)
|
||||
, mDefaultScale(-1)
|
||||
, mCursorHotspotX(0)
|
||||
, mCursorHotspotY(0)
|
||||
@@ -1152,42 +1152,18 @@ PuppetWidget::NeedsPaint()
|
||||
float
|
||||
PuppetWidget::GetDPI()
|
||||
{
|
||||
if (mDPI < 0) {
|
||||
if (mTabChild) {
|
||||
mTabChild->GetDPI(&mDPI);
|
||||
} else {
|
||||
mDPI = 96.0;
|
||||
}
|
||||
}
|
||||
|
||||
return mDPI;
|
||||
}
|
||||
|
||||
double
|
||||
PuppetWidget::GetDefaultScaleInternal()
|
||||
{
|
||||
if (mDefaultScale < 0) {
|
||||
if (mTabChild) {
|
||||
mTabChild->GetDefaultScale(&mDefaultScale);
|
||||
} else {
|
||||
mDefaultScale = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return mDefaultScale;
|
||||
}
|
||||
|
||||
int32_t
|
||||
PuppetWidget::RoundsWidgetCoordinatesTo()
|
||||
{
|
||||
if (mRounding < 0) {
|
||||
if (mTabChild) {
|
||||
mTabChild->GetWidgetRounding(&mRounding);
|
||||
} else {
|
||||
mRounding = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return mRounding;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user