зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1289970, ensure we don't remove valid Directionality map from textnode, r=ehsan
--HG-- extra : rebase_source : 5d784d52125daf4725cad0f0cf9fe03a8d47577a
This commit is contained in:
Родитель
a742ff6791
Коммит
ad6d094330
|
@ -511,6 +511,12 @@ private:
|
|||
oldTextNode);
|
||||
}
|
||||
if (newTextNode) {
|
||||
nsINode* oldDirAutoSetBy =
|
||||
static_cast<nsTextNode*>(rootNode->GetProperty(nsGkAtoms::dirAutoSetBy));
|
||||
if (oldDirAutoSetBy == newTextNode) {
|
||||
// We're already registered.
|
||||
return OpNext;
|
||||
}
|
||||
nsTextNodeDirectionalityMap::AddEntryToMap(newTextNode, rootNode);
|
||||
} else {
|
||||
rootNode->ClearHasDirAutoSet();
|
||||
|
@ -684,7 +690,9 @@ WalkDescendantsResetAutoDirection(Element* aElement)
|
|||
if (child->NodeType() == nsIDOMNode::TEXT_NODE &&
|
||||
child->HasTextNodeDirectionalityMap()) {
|
||||
nsTextNodeDirectionalityMap::ResetTextNodeDirection(static_cast<nsTextNode*>(child), nullptr);
|
||||
nsTextNodeDirectionalityMap::EnsureMapIsClearFor(child);
|
||||
// Don't call nsTextNodeDirectionalityMap::EnsureMapIsClearFor(child)
|
||||
// since ResetTextNodeDirection may have kept elements in child's
|
||||
// DirectionalityMap.
|
||||
}
|
||||
child = child->GetNextNode(aElement);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче