bool RenderTheme::stateChanged(RenderObject* o, ControlState state) const { // Default implementation assumes the controls don't respond to changes in :hover state if (state == HoverState && !supportsHover(o->style())) return false; // Assume pressed state is only responded to if the control is enabled. if (state == PressedState && !isEnabled(o)) return false; // Repaint the control. o->repaint(); return true; }
bool LayoutTheme::controlStateChanged(LayoutObject& o, ControlState state) const { if (!o.styleRef().hasAppearance()) return false; // Default implementation assumes the controls don't respond to changes in :hover state if (state == HoverControlState && !supportsHover(o.styleRef())) return false; // Assume pressed state is only responded to if the control is enabled. if (state == PressedControlState && !isEnabled(o)) return false; o.setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); return true; }