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

Unified Diff: Source/core/dom/ContainerNode.h

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
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index ab05c28cbaf03bc5f55f3b7d7e1eadb2f8d773c4..35fb63bad2b67cf51c95bbeb2ec52b30ba57d322 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -150,16 +150,26 @@ public:
// FIXME: These methods should all be renamed to something better than "check",
// since it's not clear that they alter the style bits of siblings and children.
void checkForChildrenAdjacentRuleChanges();
- void checkForSiblingStyleChanges(bool finishedParsingCallback, Node* beforeChange, Node* afterChange, int childCountDelta);
+ enum SiblingCheckType { FinishedParsingChildren, SiblingRemoved, Other };
+ void checkForSiblingStyleChanges(SiblingCheckType, Node* beforeChange, Node* afterChange);
bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); }
// -----------------------------------------------------------------------------
// Notification of document structure changes (see core/dom/Node.h for more notification methods)
+ enum ChildrenChangeType { ChildInserted, ChildRemoved, AllChildrenRemoved, TextChanged };
+ enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourceParser };
+ struct ChildrenChange {
+ ChildrenChangeType type;
+ Node* siblingBeforeChange;
+ Node* siblingAfterChange;
+ ChildrenChangeSource byParser;
+ };
+
// Notifies the node that it's list of children have changed (either by adding or removing child nodes), or a child
// node that is of the type CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE has changed its value.
- virtual void childrenChanged(bool createdByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void childrenChanged(const ChildrenChange&);
void disconnectDescendantFrames();

Powered by Google App Engine
This is Rietveld 408576698