зеркало из https://github.com/mozilla/gecko-dev.git
When unsetting dir=auto, don't clear the AncestorHasDirAuto flag on descendants if the parent itself has AncestorHasDirAuto set. Bug 844404, r=ehsan
This commit is contained in:
Родитель
311e1a3474
Коммит
0778bc38f0
|
@ -781,8 +781,10 @@ nsGenericHTMLElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
|||
{
|
||||
if (aNamespaceID == kNameSpaceID_None &&
|
||||
aName == nsGkAtoms::dir &&
|
||||
HasDirAuto()) {
|
||||
// setting dir on an element that currently has dir=auto
|
||||
HasDirAuto() && !AncestorHasDirAuto()) {
|
||||
// When setting dir on an element that currently has dir=auto, we walk the
|
||||
// descendant tree and clear the AncestorHasDirAuto flag; unless this
|
||||
// element itself has the AncestorHasDirAuto flag
|
||||
WalkDescendantsClearAncestorDirAuto(this);
|
||||
SetHasDirAuto();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче