Bug 1664685 - Simplify HTML{Image,Input}Element.{width,height} getters. r=edgar
By moving it to nsImageLoadingContent we don't need to pass a reference to the current request and can just use the member. The weird reference-passing was introduced in bug 987140 and broke in bug 1534608. Also make it return a CSSIntSize rather than an nsSize, since it's what it returns, nsSize is supposed to be in app units, not in CSS pixels :-) Differential Revision: https://phabricator.services.mozilla.com/D90036
This commit is contained in:
@@ -1394,8 +1394,7 @@ uint32_t HTMLInputElement::Height() {
|
||||
if (mType != NS_FORM_INPUT_IMAGE) {
|
||||
return 0;
|
||||
}
|
||||
RefPtr<imgRequestProxy> currentRequest(mCurrentRequest);
|
||||
return GetWidthHeightForImage(currentRequest).height;
|
||||
return GetWidthHeightForImage().height;
|
||||
}
|
||||
|
||||
void HTMLInputElement::SetIndeterminateInternal(bool aValue,
|
||||
@@ -1419,8 +1418,7 @@ uint32_t HTMLInputElement::Width() {
|
||||
if (mType != NS_FORM_INPUT_IMAGE) {
|
||||
return 0;
|
||||
}
|
||||
RefPtr<imgRequestProxy> currentRequest(mCurrentRequest);
|
||||
return GetWidthHeightForImage(currentRequest).width;
|
||||
return GetWidthHeightForImage().width;
|
||||
}
|
||||
|
||||
bool HTMLInputElement::SanitizesOnValueGetter() const {
|
||||
|
||||
Reference in New Issue
Block a user