1361 if (activeNode && !info.active()) {
1362 // We are clearing the :active chain because the mouse has been released.
1363 for (RenderObject* curr = activeNode->renderer(); curr; curr = curr->parent()) {
1364 if (curr->element() && !curr->isText())
1365 curr->element()->setInActiveChain(false);
1366 }
1367 doc->setActiveNode(0);
1368 } else {
1369 NodeImpl* newActiveNode = info.innerNode();
1370 if (!activeNode && newActiveNode && info.active()) {
1371 // We are setting the :active chain and freezing it. If future moves happen, they
1372 // will need to reference this chain.
1373 for (RenderObject* curr = newActiveNode->renderer(); curr; curr = curr->parent()) {
1374 if (curr->element() && !curr->isText()) {
1375 curr->element()->setInActiveChain(true);
1376 }
1377 }
1378 doc->setActiveNode(newActiveNode);
1379 }
1380 }
1381
1382 // If the mouse is down and if this is a mouse move event, we want to restrict changes in
1383 // :hover/:active to only apply to elements that are in the :active chain that we froze
1384 // at the time the mouse went down.
1385 bool mustBeInActiveChain = info.active() && info.mouseMove();