Source/core/dom/ContainerNode.cpp
// This is used by FrameSelection to denote when the active-state of the page has changed
// independent of the focused element changing.
This is used by FrameSelection to denote when the active-state of the page has changed
independent of the focused element changing.
This is used by FrameSelection to denote when the active - state of the page has changed independent of the focused element changing .
void ContainerNode::focusStateChanged()
{
    if (!renderer())
        return;
    if (styleChangeType() < SubtreeStyleChange) {
        if (renderStyle()->affectedByFocus() && renderStyle()->hasPseudoStyle(FIRST_LETTER))
            setNeedsStyleRecalc(SubtreeStyleChange);
        else if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByFocus())
            document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoFocus, *toElement(this));
        else if (renderStyle()->affectedByFocus())
            setNeedsStyleRecalc(LocalStyleChange);
    }
    if (renderer() && renderer()->style()->hasAppearance())
        RenderTheme::theme().stateChanged(renderer(), FocusControlState);
}
void ContainerNode :: focusStateChanged ( ) { if ( ! renderer ( ) ) return ; if ( styleChangeType ( ) < SubtreeStyleChange ) { if ( renderStyle ( ) -> affectedByFocus ( ) && renderStyle ( ) -> hasPseudoStyle ( FIRST_LETTER ) ) setNeedsStyleRecalc ( SubtreeStyleChange ) ; else if ( isElementNode ( ) && toElement ( this ) -> childrenOrSiblingsAffectedByFocus ( ) ) document ( ) . ensureStyleResolver ( ) . ensureUpdatedRuleFeatureSet ( ) . scheduleStyleInvalidationForPseudoChange ( CSSSelector :: PseudoFocus , * toElement ( this ) ) ; else if ( renderStyle ( ) -> affectedByFocus ( ) ) setNeedsStyleRecalc ( LocalStyleChange ) ; } if ( renderer ( ) && renderer ( ) -> style ( ) -> hasAppearance ( ) ) RenderTheme :: theme ( ) . stateChanged ( renderer ( ) , FocusControlState ) ; }
This is used by FrameSelection to denote when the active-state of the page has changed
independent of the focused element changing.
This is used by FrameSelection to denote when the active - state of the page has changed independent of the focused element changing .
// If we're just changing the window's active state and the focused node has no // renderer we can just ignore the state change.