Bug 745287 - Fix recent a11y build warnings; r=davidb,capella

This commit is contained in:
Ms2ger 2012-04-14 14:57:00 +02:00
Родитель d883880028
Коммит 7d7aee3517
2 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -119,13 +119,13 @@ ProgressMeterAccessible<Max>::Value(nsString& aValue)
double maxValue = 0;
nsresult rv = GetMaximumValue(&maxValue);
NS_ENSURE_SUCCESS(rv, );
if (maxValue == 0)
if (NS_FAILED(rv) || maxValue == 0)
return;
double curValue = 0;
GetCurrentValue(&curValue);
NS_ENSURE_SUCCESS(rv, );
if (NS_FAILED(rv))
return;
// Treat the current value bigger than maximum as 100%.
double percentValue = (curValue < maxValue) ?

Просмотреть файл

@ -243,8 +243,7 @@ nsHTMLImageAccessible::GetLongDescURI() const
nsDocAccessible* document = Document();
if (document) {
IDRefsIterator iter(document, mContent, nsGkAtoms::aria_describedby);
nsIContent* target = nsnull;
while (target = iter.NextElem()) {
while (nsIContent* target = iter.NextElem()) {
if ((target->IsHTML(nsGkAtoms::a) || target->IsHTML(nsGkAtoms::area)) &&
target->HasAttr(kNameSpaceID_None, nsGkAtoms::href)) {
nsGenericHTMLElement* element =