| Index: Source/core/html/HTMLElement.cpp
|
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
|
| index 7d741fc5342614a92de9e35a0a1acfe0b8eed8c1..5c8ea30b0100af726228a0e081dcff7fb2ddf0a4 100644
|
| --- a/Source/core/html/HTMLElement.cpp
|
| +++ b/Source/core/html/HTMLElement.cpp
|
| @@ -38,6 +38,8 @@
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/NodeTraversal.h"
|
| #include "core/dom/Text.h"
|
| +#include "core/dom/shadow/ElementShadow.h"
|
| +#include "core/dom/shadow/ShadowRoot.h"
|
| #include "core/editing/markup.h"
|
| #include "core/events/EventListener.h"
|
| #include "core/events/KeyboardEvent.h"
|
| @@ -637,9 +639,6 @@ static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN
|
| Node* node = firstNode->firstChild();
|
|
|
| while (node) {
|
| - if (node->selfOrAncestorHasDirAutoAttribute() == flag)
|
| - return;
|
| -
|
| if (elementAffectsDirectionality(node)) {
|
| if (node == lastNode)
|
| return;
|
| @@ -753,7 +752,9 @@ void HTMLElement::calculateAndAdjustDirectionality()
|
| {
|
| Node* strongDirectionalityTextNode;
|
| TextDirection textDirection = directionality(&strongDirectionalityTextNode);
|
| - setHasDirAutoFlagRecursively(this, true, strongDirectionalityTextNode);
|
| + setHasDirAutoFlagRecursively(this, hasDirectionAuto(), strongDirectionalityTextNode);
|
| + for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot())
|
| + setHasDirAutoFlagRecursively(root, hasDirectionAuto());
|
| if (renderer() && renderer()->style() && renderer()->style()->direction() != textDirection)
|
| setNeedsStyleRecalc(SubtreeStyleChange);
|
| }
|
|
|