Remove node from nsTextNodeDirectionalityMap when another node is going to replace it. Bug 816253, r=peterv
authorSimon Montagu <smontagu@smontagu.org>
Sun, 09 Dec 2012 23:10:56 -0800
changeset 124573 25d2aefdca3794b4374156a0742f3d2a16b7fc91
parent 124572 263bc2e3481f954ce40127fdc5e8e3520025d0cb
child 124574 5c2f1dfa1f67a38631ff62bbe4ae658a36235649
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs816253
milestone20.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
Remove node from nsTextNodeDirectionalityMap when another node is going to replace it. Bug 816253, r=peterv
content/base/src/DirectionalityUtils.cpp
--- a/content/base/src/DirectionalityUtils.cpp
+++ b/content/base/src/DirectionalityUtils.cpp
@@ -727,16 +727,19 @@ void SetAncestorDirectionIfAuto(nsINode*
               child = child->GetNextNonChildNode(parent);
               continue;
             }
 
             if (child == directionWasSetByTextNode) {
               // we found the node that set the element's direction after our
               // text node, so we need to reset the direction
               resetDirection = true;
+              nsTextNodeDirectionalityMap::RemoveElementFromMap(
+                directionWasSetByTextNode, parent
+              );
               break;
             }
 
             child = child->GetNextNode(parent);
           }
         }
       }