| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 0c8859d448ddd79e756dbac8f555ec6404f95e9e..54f4adc480152b9a5e84413ed2a1aaeaf5510b8f 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -1569,7 +1569,7 @@ static void checkForEmptyStyleChange(Element* element, RenderStyle* style)
|
| }
|
|
|
| static void checkForSiblingStyleChanges(Element* e, RenderStyle* style, bool finishedParsingCallback,
|
| - Node* beforeChange, Node* afterChange, int childCountDelta)
|
| + const Handle<Node>& beforeChange, const Handle<Node>& afterChange, int childCountDelta)
|
| {
|
| // :empty selector.
|
| checkForEmptyStyleChange(e, style);
|
| @@ -1587,7 +1587,7 @@ static void checkForSiblingStyleChanges(Element* e, RenderStyle* style, bool fin
|
|
|
| // Find the first element node following |afterChange|
|
| Node* firstElementAfterInsertion = 0;
|
| - for (firstElementAfterInsertion = afterChange;
|
| + for (firstElementAfterInsertion = afterChange.raw();
|
| firstElementAfterInsertion && !firstElementAfterInsertion->isElementNode();
|
| firstElementAfterInsertion = firstElementAfterInsertion->nextSibling()) {};
|
|
|
| @@ -1610,7 +1610,7 @@ static void checkForSiblingStyleChanges(Element* e, RenderStyle* style, bool fin
|
|
|
| // Find the last element node going backwards from |beforeChange|
|
| Node* lastElementBeforeInsertion = 0;
|
| - for (lastElementBeforeInsertion = beforeChange;
|
| + for (lastElementBeforeInsertion = beforeChange.raw();
|
| lastElementBeforeInsertion && !lastElementBeforeInsertion->isElementNode();
|
| lastElementBeforeInsertion = lastElementBeforeInsertion->previousSibling()) {};
|
|
|
| @@ -1628,7 +1628,7 @@ static void checkForSiblingStyleChanges(Element* e, RenderStyle* style, bool fin
|
| // that could be affected by this DOM change.
|
| if (e->childrenAffectedByDirectAdjacentRules() && afterChange) {
|
| Node* firstElementAfterInsertion = 0;
|
| - for (firstElementAfterInsertion = afterChange;
|
| + for (firstElementAfterInsertion = afterChange.raw();
|
| firstElementAfterInsertion && !firstElementAfterInsertion->isElementNode();
|
| firstElementAfterInsertion = firstElementAfterInsertion->nextSibling()) {};
|
| if (firstElementAfterInsertion && firstElementAfterInsertion->attached())
|
| @@ -1647,7 +1647,7 @@ static void checkForSiblingStyleChanges(Element* e, RenderStyle* style, bool fin
|
| e->setNeedsStyleRecalc();
|
| }
|
|
|
| -void Element::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
|
| +void Element::childrenChanged(bool changedByParser, const Handle<Node>& beforeChange, const Handle<Node>& afterChange, int childCountDelta)
|
| {
|
| ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
|
| if (changedByParser)
|
| @@ -1678,7 +1678,7 @@ void Element::finishParsingChildren()
|
| {
|
| ContainerNode::finishParsingChildren();
|
| setIsParsingChildrenFinished();
|
| - checkForSiblingStyleChanges(this, renderStyle(), true, lastChild(), 0, 0);
|
| + checkForSiblingStyleChanges(this, renderStyle(), true, adoptRawResult(lastChild()), nullptr, 0);
|
| if (StyleResolver* styleResolver = document()->styleResolverIfExists())
|
| styleResolver->popParentElement(this);
|
| }
|
|
|