зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1560207 - Reset all settings on every settings update, to avoid double-constructing. r=jib
Depends on D36192 Differential Revision: https://phabricator.services.mozilla.com/D36193 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
995ee35634
Коммит
dc0eb05ef0
|
@ -191,6 +191,7 @@ nsresult MediaEngineTabVideoSource::Reconfigure(
|
|||
mBufWidthMax = bufWidthMax;
|
||||
mBufHeightMax = bufHeightMax;
|
||||
mTimePerFrame = timePerFrame;
|
||||
*mSettings = MediaTrackSettings();
|
||||
mSettings->mScrollWithPage.Construct(scrollWithPage);
|
||||
mSettings->mWidth.Construct(bufWidthMax);
|
||||
mSettings->mHeight.Construct(bufHeightMax);
|
||||
|
@ -198,31 +199,21 @@ nsresult MediaEngineTabVideoSource::Reconfigure(
|
|||
if (viewportOffsetX.isSome()) {
|
||||
mSettings->mViewportOffsetX.Construct(*viewportOffsetX);
|
||||
mViewportOffsetX = *viewportOffsetX;
|
||||
} else {
|
||||
mSettings->mViewportOffsetX.Reset();
|
||||
}
|
||||
if (viewportOffsetY.isSome()) {
|
||||
mSettings->mViewportOffsetY.Construct(*viewportOffsetY);
|
||||
mViewportOffsetY = *viewportOffsetY;
|
||||
} else {
|
||||
mSettings->mViewportOffsetY.Reset();
|
||||
}
|
||||
if (viewportWidth.isSome()) {
|
||||
mSettings->mViewportWidth.Construct(*viewportWidth);
|
||||
mViewportWidth = *viewportWidth;
|
||||
} else {
|
||||
mSettings->mViewportWidth.Reset();
|
||||
}
|
||||
if (viewportHeight.isSome()) {
|
||||
mSettings->mViewportHeight.Construct(*viewportHeight);
|
||||
mViewportHeight = *viewportHeight;
|
||||
} else {
|
||||
mSettings->mViewportHeight.Reset();
|
||||
}
|
||||
if (windowId != -1) {
|
||||
mSettings->mBrowserWindow.Construct(windowId);
|
||||
} else {
|
||||
mSettings->mBrowserWindow.Reset();
|
||||
}
|
||||
}));
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче