Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 302433015: Use correct offset when attribute auto is present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698