summaryrefslogtreecommitdiffstats
path: root/dom/base/DirectionalityUtils.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:50:47 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:50:47 -0400
commit4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1 (patch)
tree1cea0ad854fb25e536caf93f240258eebfb3aea8 /dom/base/DirectionalityUtils.cpp
parent32e8155127126c187ce32f7368742057bcaf69da (diff)
downloadUXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.gz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.lz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.tar.xz
UXP-4d1d777e706322cb9aca8ed2d5a6e50b805d3bd1.zip
Bug 1373798 - Move HTML dir attribute state into event state flags
* Stop calling SetHasDirAuto/ClearHasDirAuto in input element code * Introduce event state flags that track the state of an element's dir attribute * Rewrite our existing checks for the state of the dir attr on top of the new event state flags * Add pseudo-classes for matching on the dir attribute states * Use the new dir attribute pseudoclasses in html.css Tag #1375
Diffstat (limited to 'dom/base/DirectionalityUtils.cpp')
-rw-r--r--dom/base/DirectionalityUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/base/DirectionalityUtils.cpp b/dom/base/DirectionalityUtils.cpp
index d9a6c4524..632abb2c8 100644
--- a/dom/base/DirectionalityUtils.cpp
+++ b/dom/base/DirectionalityUtils.cpp
@@ -728,7 +728,7 @@ WalkDescendantsResetAutoDirection(Element* aElement)
{
nsIContent* child = aElement->GetFirstChild();
while (child) {
- if (child->HasDirAuto()) {
+ if (child->IsElement() && child->AsElement()->HasDirAuto()) {
child = child->GetNextNonChildNode(aElement);
continue;
}
@@ -791,7 +791,7 @@ WalkDescendantsClearAncestorDirAuto(Element* aElement)
{
nsIContent* child = aElement->GetFirstChild();
while (child) {
- if (child->HasDirAuto()) {
+ if (child->IsElement() && child->AsElement()->HasDirAuto()) {
child = child->GetNextNonChildNode(aElement);
continue;
}