Don't rerun the downward propagation algorithm from ResetNodeDirection after an element has had dir=auto removed. Bug 849727, r=ehsan

This commit is contained in:
Simon Montagu 2013-03-24 11:27:02 +02:00
parent 477c691774
commit dc0b05a650

View File

@ -497,8 +497,11 @@ private:
// and remove the text node from the map
nsINode* oldTextNode = static_cast<Element*>(aData);
Element* rootNode = aEntry->GetKey();
nsINode* newTextNode = WalkDescendantsSetDirectionFromText(rootNode, true,
nsINode* newTextNode = nullptr;
if (rootNode->HasDirAuto()) {
newTextNode = WalkDescendantsSetDirectionFromText(rootNode, true,
oldTextNode);
}
if (newTextNode) {
nsTextNodeDirectionalityMap::AddEntryToMap(newTextNode, rootNode);
} else {