Bug 977668 - Firefox hangs on Facebook text entry when inline lookups pop up. r=jwei, a=sledru
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 09 Apr 2014 14:23:04 -0400
changeset 183753 109cc0131968a01f27bf5267cf9d3fed7c9e9f88
parent 183752 f11f4dda1cdeeb6609e0e8f066e3f06b3bd93609
child 183754 2ab3be04316ae3d1178ed7ea5870b201e2716f8c
push id3470
push userryanvm@gmail.com
push dateMon, 14 Apr 2014 17:37:31 +0000
treeherdermozilla-beta@109cc0131968 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwei, sledru
bugs977668
milestone29.0
Bug 977668 - Firefox hangs on Facebook text entry when inline lookups pop up. r=jwei, a=sledru
accessible/src/generic/HyperTextAccessible.cpp
--- a/accessible/src/generic/HyperTextAccessible.cpp
+++ b/accessible/src/generic/HyperTextAccessible.cpp
@@ -1019,23 +1019,22 @@ HyperTextAccessible::TextBounds(int32_t 
   if (childIdx == -1)
     return nsIntRect();
 
   nsIntRect bounds;
   int32_t prevOffset = GetChildOffset(childIdx);
   int32_t offset1 = startOffset - prevOffset;
 
   while (childIdx < ChildCount()) {
-    nsIFrame* frame = GetChildAt(childIdx)->GetFrame();
+    nsIFrame* frame = GetChildAt(childIdx++)->GetFrame();
     if (!frame) {
       NS_NOTREACHED("No frame for a child!");
       continue;
     }
 
-    childIdx++;
     int32_t nextOffset = GetChildOffset(childIdx);
     if (nextOffset >= endOffset) {
       bounds.UnionRect(bounds, GetBoundsInFrame(frame, offset1,
                                                 endOffset - prevOffset));
       break;
     }
 
     bounds.UnionRect(bounds, GetBoundsInFrame(frame, offset1,