Index: Source/core/html/HTMLElement.cpp |
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
index 6e99e33375610ce2a409e17de7a1fb594ee57214..19b2620e7867f6a84d711665dc464615f224ddf5 100644 |
--- a/Source/core/html/HTMLElement.cpp |
+++ b/Source/core/html/HTMLElement.cpp |
@@ -1,7 +1,7 @@ |
/* |
* Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
* (C) 1999 Antti Koivisto (koivisto@kde.org) |
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved. |
* Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) |
* Copyright (C) 2011 Motorola Mobility. All rights reserved. |
* |
@@ -649,10 +649,10 @@ static void setHasDirAutoFlagRecursively(Node* firstNode, bool flag, Node* lastN |
} |
} |
-void HTMLElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) |
+void HTMLElement::childrenChanged(const ChildrenChange& change) |
{ |
- Element::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); |
- adjustDirectionalityIfNeededAfterChildrenChanged(beforeChange, childCountDelta); |
+ Element::childrenChanged(change); |
+ adjustDirectionalityIfNeededAfterChildrenChanged(change); |
} |
bool HTMLElement::hasDirectionAuto() const |
@@ -756,22 +756,12 @@ void HTMLElement::calculateAndAdjustDirectionality() |
setNeedsStyleRecalc(SubtreeStyleChange); |
} |
-void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, int childCountDelta) |
+void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(const ChildrenChange& change) |
{ |
- if (document().renderView() && childCountDelta < 0) { |
- Node* node = beforeChange ? NodeTraversal::nextSkippingChildren(*beforeChange) : 0; |
- for (int counter = 0; node && counter < childCountDelta; counter++, node = NodeTraversal::nextSkippingChildren(*node)) { |
Inactive
2014/07/01 14:53:01
This was dead code because:
- if childCountDelta <
|
- if (elementAffectsDirectionality(node)) |
- continue; |
- |
- setHasDirAutoFlagRecursively(node, false); |
- } |
- } |
- |
if (!selfOrAncestorHasDirAutoAttribute()) |
return; |
- Node* oldMarkedNode = beforeChange ? NodeTraversal::nextSkippingChildren(*beforeChange) : 0; |
+ Node* oldMarkedNode = change.siblingBeforeChange ? NodeTraversal::nextSkippingChildren(*change.siblingBeforeChange) : 0; |
while (oldMarkedNode && elementAffectsDirectionality(oldMarkedNode)) |
oldMarkedNode = NodeTraversal::nextSkippingChildren(*oldMarkedNode, this); |
if (oldMarkedNode) |