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

This commit is contained in:
Ms2ger 2012-04-14 14:57:00 +02:00
parent be570c6dfc
commit 716ae4e73c
2 changed files with 4 additions and 5 deletions

View File

@ -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) ?

View File

@ -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 =