Exemple #1
0
bool NodeRenderingContext::shouldCreateRenderer() const
{
    if (!m_node->document()->shouldCreateRenderers())
        return false;
    if (!m_renderingParent)
        return false;
    RenderObject* parentRenderer = this->parentRenderer();
    if (!parentRenderer)
        return false;
    if (!parentRenderer->canHaveChildren() && !(m_node->isPseudoElement() && parentRenderer->canHaveGeneratedChildren()))
        return false;
    if (!m_renderingParent->childShouldCreateRenderer(*this))
        return false;
    return true;
}
Exemple #2
0
static bool shouldCreateRenderer(const Element& element, const ContainerNode* renderingParent)
{
    if (!element.document().shouldCreateRenderers())
        return false;
    if (!renderingParent)
        return false;
    RenderObject* parentRenderer = renderingParent->renderer();
    if (!parentRenderer)
        return false;
    if (!parentRenderer->canHaveChildren() && !(element.isPseudoElement() && parentRenderer->canHaveGeneratedChildren()))
        return false;
    if (!renderingParent->childShouldCreateRenderer(&element))
        return false;
    return true;
}