bug 1164135 - fix AtkHyperlink::GetStartIndex r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Tue, 12 May 2015 14:22:02 -0400
changeset 243553 ce727ed41dedbb42c7311de7edb8865ce2cca5d1
parent 243552 8df1ea116b91c96d7cc2c855c0d9d17777bb0b39
child 243554 5fcc4f1b36605b672b49f4b72cfa5b2f0c9fa43d
push id28741
push userkwierso@gmail.com
push dateTue, 12 May 2015 23:24:40 +0000
treeherdermozilla-central@d476776d920d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1164135
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1164135 - fix AtkHyperlink::GetStartIndex r=davidb
accessible/atk/nsMaiHyperlink.cpp
--- a/accessible/atk/nsMaiHyperlink.cpp
+++ b/accessible/atk/nsMaiHyperlink.cpp
@@ -216,17 +216,17 @@ getEndIndexCB(AtkHyperlink *aLink)
   uint32_t endIdx = maiLink->Proxy()->EndOffset(&valid);
   return valid ? static_cast<gint>(endIdx) : -1;
 }
 
 gint
 getStartIndexCB(AtkHyperlink *aLink)
 {
   MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
-  if (maiLink)
+  if (!maiLink)
     return -1;
 
   if (Accessible* hyperlink = maiLink->GetAccHyperlink())
     return static_cast<gint>(hyperlink->StartOffset());
 
   bool valid = false;
   uint32_t startIdx = maiLink->Proxy()->StartOffset(&valid);
   return valid ? static_cast<gint>(startIdx) : -1;