Chromium Code Reviews| Index: Source/core/html/HTMLElement.cpp |
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
| index 7d741fc5342614a92de9e35a0a1acfe0b8eed8c1..2182a2107a85b408f496b9dad3d18e701112a372 100644 |
| --- a/Source/core/html/HTMLElement.cpp |
| +++ b/Source/core/html/HTMLElement.cpp |
| @@ -38,6 +38,7 @@ |
| #include "core/dom/ExceptionCode.h" |
| #include "core/dom/NodeTraversal.h" |
| #include "core/dom/Text.h" |
| +#include "core/dom/shadow/ShadowRoot.h" |
| #include "core/editing/markup.h" |
| #include "core/events/EventListener.h" |
| #include "core/events/KeyboardEvent.h" |
| @@ -637,9 +638,6 @@ static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN |
| Node* node = firstNode->firstChild(); |
| while (node) { |
| - if (node->selfOrAncestorHasDirAutoAttribute() == flag) |
|
esprehn
2014/06/11 22:56:12
This means we're going to walk down the subtree ev
Habib Virji
2014/06/12 08:38:53
Yes that's true. Reason was it was preventing chil
|
| - return; |
| - |
| if (elementAffectsDirectionality(node)) { |
| if (node == lastNode) |
| return; |
| @@ -753,7 +751,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); |
| } |