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:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/Event.h" // for nsIDOMEvent::InternalDOMEvent()
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
#include "nsIFormAutoComplete.h"
|
||||
#include "nsIInputListAutoComplete.h"
|
||||
#include "nsIAutoCompleteSimpleResult.h"
|
||||
@@ -502,7 +503,9 @@ NS_IMETHODIMP
|
||||
nsFormFillController::GetTextValue(nsAString & aTextValue)
|
||||
{
|
||||
if (mFocusedInput) {
|
||||
mFocusedInput->GetValue(aTextValue);
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(mFocusedInput);
|
||||
HTMLInputElement::FromContent(content)->GetValue(aTextValue,
|
||||
CallerType::System);
|
||||
} else {
|
||||
aTextValue.Truncate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user