| Index: Source/core/dom/ContainerNode.cpp
|
| diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
|
| index 44ddbc088cf207c3aa5e83ebffb88c953a5f7084..ef3a25450362ffb03191dfa227dd3cac11f5b367 100644
|
| --- a/Source/core/dom/ContainerNode.cpp
|
| +++ b/Source/core/dom/ContainerNode.cpp
|
| @@ -731,17 +731,17 @@ void ContainerNode::dispatchPostAttachCallbacks()
|
| s_postAttachCallbackQueue->clear();
|
| }
|
|
|
| -void ContainerNode::attach()
|
| +void ContainerNode::attach(const AttachContext& context)
|
| {
|
| attachChildren();
|
| - Node::attach();
|
| + Node::attach(context);
|
| }
|
|
|
| -void ContainerNode::detach()
|
| +void ContainerNode::detach(const AttachContext& context)
|
| {
|
| detachChildren();
|
| clearChildNeedsStyleRecalc();
|
| - Node::detach();
|
| + Node::detach(context);
|
| }
|
|
|
| void ContainerNode::childrenChanged(bool changedByParser, Node*, Node*, int childCountDelta)
|
| @@ -793,6 +793,18 @@ void ContainerNode::setHovered(bool over)
|
|
|
| Node::setHovered(over);
|
|
|
| + if (!renderer()) {
|
| + // When setting hover to false, the style needs to be recalc'd even when
|
| + // there's no renderer (imagine setting display:none in the :hover class,
|
| + // if a nil renderer would prevent this element from recalculating its
|
| + // style, it would never go back to its normal style and remain
|
| + // stuck in its hovered style).
|
| + if (!over)
|
| + setNeedsStyleRecalc();
|
| +
|
| + return;
|
| + }
|
| +
|
| // note that we need to recalc the style
|
| // FIXME: Move to Element
|
| if (renderer()) {
|
|
|