зеркало из https://github.com/mozilla/gecko-dev.git
Bug 745287 - Fix recent a11y build warnings; r=davidb,capella
This commit is contained in:
Родитель
d883880028
Коммит
7d7aee3517
|
@ -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 =
|
||||
|
|
Загрузка…
Ссылка в новой задаче