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

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

Issue 365673002: Pass a struct to ContainerNode::childrenChanged() instead of separate arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove dead code 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/html/HTMLElement.h ('k') | Source/core/html/HTMLFieldSetElement.h » ('j') | 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 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)
« no previous file with comments | « Source/core/html/HTMLElement.h ('k') | Source/core/html/HTMLFieldSetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698