зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1665332. Make sure to initialize all fields of the ZoomConstraints to the correct values on ZoomConstraintsClient in all cases. r=kats
The default constructor initializes the two bools to true. Differential Revision: https://phabricator.services.mozilla.com/D91103
This commit is contained in:
Родитель
f95ea514e2
Коммит
75d2f29087
|
@ -40,7 +40,10 @@ using namespace mozilla::dom;
|
||||||
using namespace mozilla::layers;
|
using namespace mozilla::layers;
|
||||||
|
|
||||||
ZoomConstraintsClient::ZoomConstraintsClient()
|
ZoomConstraintsClient::ZoomConstraintsClient()
|
||||||
: mDocument(nullptr), mPresShell(nullptr) {}
|
: mDocument(nullptr),
|
||||||
|
mPresShell(nullptr),
|
||||||
|
mZoomConstraints(false, false, CSSToParentLayerScale(1.f),
|
||||||
|
CSSToParentLayerScale(1.f)) {}
|
||||||
|
|
||||||
ZoomConstraintsClient::~ZoomConstraintsClient() = default;
|
ZoomConstraintsClient::~ZoomConstraintsClient() = default;
|
||||||
|
|
||||||
|
@ -186,6 +189,9 @@ static mozilla::layers::ZoomConstraints ComputeZoomConstraintsFromViewportInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoomConstraintsClient::RefreshZoomConstraints() {
|
void ZoomConstraintsClient::RefreshZoomConstraints() {
|
||||||
|
mZoomConstraints = ZoomConstraints(false, false, CSSToParentLayerScale(1.f),
|
||||||
|
CSSToParentLayerScale(1.f));
|
||||||
|
|
||||||
nsIWidget* widget = GetWidget(mPresShell);
|
nsIWidget* widget = GetWidget(mPresShell);
|
||||||
if (!widget) {
|
if (!widget) {
|
||||||
return;
|
return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче