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

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

Issue 2774753003: Merge "CSS Selector: Fix a regression of :first-child and :last-child invalidation" to M58. (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/Source/core/dom/ContainerNode.h
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.h b/third_party/WebKit/Source/core/dom/ContainerNode.h
index 1855eed97dfa953f418852772fb0b6a6254a3f79..2983897b7f984945e31d10e0e0283994f40cee8d 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.h
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.h
@@ -264,10 +264,12 @@ class CORE_EXPORT ContainerNode : public Node {
public:
static ChildrenChange forInsertion(Node& node,
+ Node* unchangedPrevious,
+ Node* unchangedNext,
ChildrenChangeSource byParser) {
ChildrenChange change = {
node.isElementNode() ? ElementInserted : NonElementInserted, &node,
- node.previousSibling(), node.nextSibling(), byParser};
+ unchangedPrevious, unchangedNext, byParser};
return change;
}
@@ -293,7 +295,16 @@ class CORE_EXPORT ContainerNode : public Node {
ChildrenChangeType type;
Member<Node> siblingChanged;
+ // |siblingBeforeChange| is
+ // - siblingChanged.previousSibling before node removal
+ // - siblingChanged.previousSibling after single node insertion
+ // - previousSibling of the first inserted node after multiple node
+ // insertion
Member<Node> siblingBeforeChange;
+ // |siblingAfterChange| is
+ // - siblingChanged.nextSibling before node removal
+ // - siblingChanged.nextSibling after single node insertion
+ // - nextSibling of the last inserted node after multiple node insertion.
Member<Node> siblingAfterChange;
ChildrenChangeSource byParser;
};

Powered by Google App Engine
This is Rietveld 408576698