mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-16 11:45:31 +00:00
Bug 16126: Check for a cached state when reading value or submitting Gfx text frame (before initialize); r=joki
This commit is contained in:
parent
ee28759d13
commit
e0ed7d0ee8
@ -357,7 +357,12 @@ nsGfxTextControlFrame::GetText(nsString* aText, PRBool aInitialValue)
|
||||
mEditor->OutputToString(*aText, format, 0);
|
||||
}
|
||||
else {
|
||||
result = nsFormControlHelper::GetInputElementValue(mContent, aText, aInitialValue);
|
||||
if (mCachedState) {
|
||||
*aText = *mCachedState;
|
||||
result = NS_OK;
|
||||
} else {
|
||||
result = nsFormControlHelper::GetInputElementValue(mContent, aText, aInitialValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
RemoveNewlines(*aText);
|
||||
@ -665,6 +670,11 @@ void nsGfxTextControlFrame::GetTextControlFrameState(nsString& aValue)
|
||||
|
||||
mEditor->OutputToString(aValue, format, flags);
|
||||
}
|
||||
else {
|
||||
if (mCachedState) {
|
||||
aValue = *mCachedState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsGfxTextControlFrame::SetTextControlFrameState(const nsString& aValue)
|
||||
|
Loading…
Reference in New Issue
Block a user