Bug 1317367 part 4. Pass an explicit CallerType to HTMLInputElement::GetValueInternal. r=smaug

I'm not 100% sure that I'm being very consistent in my handling of
mFocusedValue, but since that's not used for file inputs, I don't think it
matters much...

A bigger problem is if people start using this caller type for things other than
file inputs.
This commit is contained in:
Boris Zbarsky
2016-11-15 12:46:32 -05:00
parent b2eaca6676
commit 0fa8643c26
13 changed files with 147 additions and 140 deletions

View File

@@ -351,8 +351,11 @@ HTMLTextFieldAccessible::Value(nsString& aValue)
}
HTMLInputElement* input = HTMLInputElement::FromContent(mContent);
if (input)
input->GetValue(aValue);
if (input) {
// Pass NonSystem as the caller type, to be safe. We don't expect to have a
// file input here.
input->GetValue(aValue, CallerType::NonSystem);
}
}
void
@@ -552,7 +555,10 @@ HTMLSpinnerAccessible::Value(nsString& aValue)
if (!aValue.IsEmpty())
return;
HTMLInputElement::FromContent(mContent)->GetValue(aValue);
// Pass NonSystem as the caller type, to be safe. We don't expect to have a
// file input here.
HTMLInputElement::FromContent(mContent)->GetValue(aValue,
CallerType::NonSystem);
}
double
@@ -628,7 +634,10 @@ HTMLRangeAccessible::Value(nsString& aValue)
if (!aValue.IsEmpty())
return;
HTMLInputElement::FromContent(mContent)->GetValue(aValue);
// Pass NonSystem as the caller type, to be safe. We don't expect to have a
// file input here.
HTMLInputElement::FromContent(mContent)->GetValue(aValue,
CallerType::NonSystem);
}
double