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

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

Issue 16629006: Revert 151996 "Avoid N^2 walk placing renderers when building th..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Update to head Created 7 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/css/resolver/StyleResolverState.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index 5578966df32eedad468284a8829ff6392f06ff7a..adc8832d444163d56d6a690659f10e5a484e6eff 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -37,7 +37,7 @@ class HTMLCollection;
typedef void (*NodeCallback)(Node*);
-namespace Private {
+namespace Private {
template<class GenericNode, class GenericNodeContainer>
void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer*);
};
@@ -80,7 +80,6 @@ private:
class ContainerNode : public Node {
friend class PostAttachCallbackDisabler;
- friend class InsertionCallbackDeferer;
public:
virtual ~ContainerNode();
@@ -142,8 +141,6 @@ public:
protected:
ContainerNode(TreeScope*, ConstructionType = CreateContainer);
- static void queueInsertionCallback(NodeCallback, Node*);
- static bool insertionCallbacksAreSuspended();
static void queuePostAttachCallback(NodeCallback, Node*);
static bool postAttachCallbacksAreSuspended();
@@ -166,11 +163,6 @@ private:
void suspendPostAttachCallbacks();
void resumePostAttachCallbacks();
- static void dispatchInsertionCallbacks();
-
- static void suspendInsertionCallbacks();
- static void resumeInsertionCallbacks();
-
bool getUpperLeftCorner(FloatPoint&) const;
bool getLowerRightCorner(FloatPoint&) const;
@@ -297,7 +289,7 @@ class ChildNodesLazySnapshot {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit ChildNodesLazySnapshot(Node* parentNode)
- : m_currentNode(parentNode->lastChild())
+ : m_currentNode(parentNode->firstChild())
, m_currentIndex(0)
{
m_nextSnapshot = latestSnapshot;
@@ -309,13 +301,13 @@ public:
latestSnapshot = m_nextSnapshot;
}
- // Returns 0 if there is no previous Node.
- PassRefPtr<Node> previousNode()
+ // Returns 0 if there is no next Node.
+ PassRefPtr<Node> nextNode()
{
if (LIKELY(!hasSnapshot())) {
RefPtr<Node> node = m_currentNode;
if (node)
- m_currentNode = node->previousSibling();
+ m_currentNode = node->nextSibling();
return node.release();
}
Vector<RefPtr<Node> >& nodeVector = *m_childNodes;
@@ -332,7 +324,7 @@ public:
Node* node = m_currentNode.get();
while (node) {
m_childNodes->append(node);
- node = node->previousSibling();
+ node = node->nextSibling();
}
}
@@ -357,22 +349,6 @@ private:
ChildNodesLazySnapshot* m_nextSnapshot;
};
-// Used to ensure Radio Buttons resolve their checked state in document
-// order when a subtree of them is inserted. This is necessary because
-// we resolve style in reverse document order.
-class InsertionCallbackDeferer {
-public:
- InsertionCallbackDeferer()
- {
- ContainerNode::suspendInsertionCallbacks();
- }
-
- ~InsertionCallbackDeferer()
- {
- ContainerNode::resumeInsertionCallbacks();
- }
-};
-
class PostAttachCallbackDisabler {
public:
PostAttachCallbackDisabler(ContainerNode* node)
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698