зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1255362 - Null-check GetContainer() before using it in image-related ConfigureLayer() methods. r=mstange a=Tomcat
This commit is contained in:
Родитель
1c95c143d4
Коммит
c963068948
|
@ -2817,7 +2817,9 @@ nsDisplayBackgroundImage::ConfigureLayer(ImageLayer* aLayer,
|
|||
// asynchronously, this is not enough. Bug 1183378 will provide a more
|
||||
// complete fix, but this solution is safe in more cases than simply relying
|
||||
// on the intrinsic size.
|
||||
IntSize containerSize = aLayer->GetContainer()->GetCurrentSize();
|
||||
IntSize containerSize = aLayer->GetContainer()
|
||||
? aLayer->GetContainer()->GetCurrentSize()
|
||||
: IntSize(imageWidth, imageHeight);
|
||||
|
||||
const LayoutDevicePoint p = mImageLayerDestRect.TopLeft();
|
||||
Matrix transform = Matrix::Translation(p.x, p.y);
|
||||
|
|
|
@ -1711,7 +1711,9 @@ nsDisplayImage::ConfigureLayer(ImageLayer* aLayer,
|
|||
// asynchronously, this is not enough. Bug 1183378 will provide a more
|
||||
// complete fix, but this solution is safe in more cases than simply relying
|
||||
// on the intrinsic size.
|
||||
IntSize containerSize = aLayer->GetContainer()->GetCurrentSize();
|
||||
IntSize containerSize = aLayer->GetContainer()
|
||||
? aLayer->GetContainer()->GetCurrentSize()
|
||||
: IntSize(imageWidth, imageHeight);
|
||||
|
||||
const LayoutDevicePoint p = destRect.TopLeft();
|
||||
Matrix transform = Matrix::Translation(p.x, p.y);
|
||||
|
|
|
@ -488,7 +488,9 @@ nsDisplayXULImage::ConfigureLayer(ImageLayer* aLayer,
|
|||
// asynchronously, this is not enough. Bug 1183378 will provide a more
|
||||
// complete fix, but this solution is safe in more cases than simply relying
|
||||
// on the intrinsic size.
|
||||
IntSize containerSize = aLayer->GetContainer()->GetCurrentSize();
|
||||
IntSize containerSize = aLayer->GetContainer()
|
||||
? aLayer->GetContainer()->GetCurrentSize()
|
||||
: IntSize(imageWidth, imageHeight);
|
||||
|
||||
const LayoutDevicePoint p = destRect.TopLeft();
|
||||
Matrix transform = Matrix::Translation(p.x, p.y);
|
||||
|
|
Загрузка…
Ссылка в новой задаче