author | Simon Montagu <smontagu@smontagu.org> |
Sun, 24 Mar 2013 11:27:02 +0200 | |
changeset 126053 | 74847b983bc8b3f2f01278e28517a8112e172d6c |
parent 126051 | c740ade2e901bb4506a560a98fb85d7314e23746 |
child 126054 | 426bf346fe1d96e8322c9846f124a2db05085b57 |
push id | 24469 |
push user | philringnalda@gmail.com |
push date | Mon, 25 Mar 2013 00:58:18 +0000 |
treeherder | mozilla-central@fadbd3c36f80 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ehsan |
bugs | 849727 |
milestone | 22.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
|
--- a/content/base/src/DirectionalityUtils.cpp +++ b/content/base/src/DirectionalityUtils.cpp @@ -492,18 +492,21 @@ private: static PLDHashOperator ResetNodeDirection(nsPtrHashKey<Element>* aEntry, void* aData) { MOZ_ASSERT(aEntry->GetKey()->IsElement(), "Must be an Element"); // run the downward propagation algorithm // and remove the text node from the map nsINode* oldTextNode = static_cast<Element*>(aData); Element* rootNode = aEntry->GetKey(); - nsINode* newTextNode = WalkDescendantsSetDirectionFromText(rootNode, true, - oldTextNode); + nsINode* newTextNode = nullptr; + if (rootNode->HasDirAuto()) { + newTextNode = WalkDescendantsSetDirectionFromText(rootNode, true, + oldTextNode); + } if (newTextNode) { nsTextNodeDirectionalityMap::AddEntryToMap(newTextNode, rootNode); } else { rootNode->ClearHasDirAutoSet(); rootNode->UnsetProperty(nsGkAtoms::dirAutoSetBy); } return PL_DHASH_REMOVE; }