bug 100649: Length() being used where IsEmpty() is meant
treewide changes to convert incorrect usages of string.Length() to string.IsEmpty(). thanks to afatecha@idea.com.py (Ariel Fatecha) for the patch. r=dwitte, sr=jst. got the ok from Asa to land into a closed tree. git-svn-id: svn://10.0.0.236/trunk@142828 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -867,7 +867,7 @@ nsComboboxControlFrame::ReflowItems(nsIPresContext* aPresContext,
|
||||
if (optionElement) {
|
||||
nsAutoString text;
|
||||
rv = optionElement->GetLabel(text);
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE != rv || 0 == text.Length()) {
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE != rv || text.IsEmpty()) {
|
||||
if (NS_OK == optionElement->GetText(text)) {
|
||||
nscoord width;
|
||||
aReflowState.rendContext->GetWidth(text, width);
|
||||
@@ -1928,7 +1928,7 @@ nsComboboxControlFrame::RedisplayText(PRInt32 aIndex)
|
||||
fragment->AppendTo(value);
|
||||
}
|
||||
PRBool shouldSetValue = PR_FALSE;
|
||||
if (NS_FAILED(result) || value.Length() == 0) {
|
||||
if (NS_FAILED(result) || value.IsEmpty()) {
|
||||
shouldSetValue = PR_TRUE;
|
||||
} else {
|
||||
shouldSetValue = value != textToDisplay;
|
||||
|
||||
Reference in New Issue
Block a user