зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1270310
- Part 4: Bypass line break conversion if element is single line. r=smaug
For single line text controls we shouldn't need to convert line breaks.
This commit is contained in:
Родитель
2b917eceb6
Коммит
5c875edd39
|
@ -6331,14 +6331,16 @@ HTMLInputElement::SaveState()
|
|||
return rv;
|
||||
}
|
||||
|
||||
rv = nsLinebreakConverter::ConvertStringLineBreaks(
|
||||
value,
|
||||
nsLinebreakConverter::eLinebreakPlatform,
|
||||
nsLinebreakConverter::eLinebreakContent);
|
||||
if (!IsSingleLineTextControl(false)) {
|
||||
rv = nsLinebreakConverter::ConvertStringLineBreaks(
|
||||
value,
|
||||
nsLinebreakConverter::eLinebreakPlatform,
|
||||
nsLinebreakConverter::eLinebreakContent);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Converting linebreaks failed!");
|
||||
return rv;
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Converting linebreaks failed!");
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
inputState->SetValue(value);
|
||||
|
|
Загрузка…
Ссылка в новой задаче