Esempio n. 1
0
PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer()
{
    // styleForRenderer is called whenever a new style should be associated
    // with an Element so now is a good time to update our cached style.
    updateNonRenderStyle();
    return m_style;
}
void HTMLOptGroupElement::didAttachRenderers()
{
    // If after attaching nothing called styleForRenderer() on this node we
    // manually cache the value. This happens if our parent doesn't have a
    // renderer like <optgroup> or if it doesn't allow children like <select>.
    if (!m_style && parentNode()->renderStyle())
        updateNonRenderStyle();
}
PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer()
{
    updateNonRenderStyle();
    return m_style;
}