[Webkit-unassigned] [Bug 123496] New: Unguard Element::childShouldCreateRenderer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 29 23:50:28 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=123496

           Summary: Unguard Element::childShouldCreateRenderer
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: MathML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: changseok.oh at collabora.com


The declaration of 1Element::childShouldCreateRenderer is guarded with MATHML and SVG.
But it causes a link error when disabling svg because of missing MATHML flag for the definition of Element::childShouldCreateRenderer.
Even we add a MATHML flag for it, you would face a compile error caused by SVGNames. we could avoid it like following but I think it's an abuse of flags.

#if ENABLE(SVG) || ENABLE(MATHML)
bool Element::childShouldCreateRenderer(const Node* child) const
{
#if ENABLE(SVG)
    // Only create renderers for SVG elements whose parents are SVG elements, or for proper <svg xmlns="svgNS"> subdocuments.                                                    
    if (child->isSVGElement())
        return child->hasTagName(SVGNames::svgTag) || isSVGElement();
#endif
    return ContainerNode::childShouldCreateRenderer(child);
}

So I propose removing the two guards from Element::childShouldCreateRenderer. I believe there would be no harm.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list