зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1861726 - Remove unused StyleImage::GetIntrinsicSize. r=boris
It doesn't account for various subtleties like aspect ratios etc, so let's remove it. Depends on D192131 Differential Revision: https://phabricator.services.mozilla.com/D192132
This commit is contained in:
Родитель
e3d3714eba
Коммит
77a79110dc
|
@ -971,9 +971,6 @@ inline const StyleImage& StyleImage::FinalImage() const {
|
|||
return sNone;
|
||||
}
|
||||
|
||||
template <>
|
||||
Maybe<CSSIntSize> StyleImage::GetIntrinsicSize() const;
|
||||
|
||||
template <>
|
||||
inline bool StyleImage::IsImageRequestType() const {
|
||||
const auto& finalImage = FinalImage();
|
||||
|
|
|
@ -1560,27 +1560,6 @@ ImageResolution StyleImage::GetResolution() const {
|
|||
return resolution;
|
||||
}
|
||||
|
||||
template <>
|
||||
Maybe<CSSIntSize> StyleImage::GetIntrinsicSize() const {
|
||||
imgRequestProxy* request = GetImageRequest();
|
||||
if (!request) {
|
||||
return Nothing();
|
||||
}
|
||||
RefPtr<imgIContainer> image;
|
||||
request->GetImage(getter_AddRefs(image));
|
||||
if (!image) {
|
||||
return Nothing();
|
||||
}
|
||||
// FIXME(emilio): Seems like this should be smarter about unspecified width /
|
||||
// height, aspect ratio, etc, but this preserves the current behavior of our
|
||||
// only caller for now...
|
||||
int32_t w = 0, h = 0;
|
||||
image->GetWidth(&w);
|
||||
image->GetHeight(&h);
|
||||
GetResolution().ApplyTo(w, h);
|
||||
return Some(CSSIntSize{w, h});
|
||||
}
|
||||
|
||||
// --------------------
|
||||
// nsStyleImageLayers
|
||||
//
|
||||
|
|
|
@ -878,10 +878,6 @@ renaming_overrides_prefixing = true
|
|||
// size of the image.
|
||||
ImageResolution GetResolution() const;
|
||||
|
||||
// Returns the intrinsic size of the image, if there's one, accounting for
|
||||
// resolution as needed.
|
||||
Maybe<CSSIntSize> GetIntrinsicSize() const;
|
||||
|
||||
// If this is an image-set(), the final image we've selected, otherwise it
|
||||
// returns *this.
|
||||
const StyleGenericImage& FinalImage() const;
|
||||
|
|
Загрузка…
Ссылка в новой задаче