+2013-11-10 Sam Weinig <sam@webkit.org>
+
+ Make childShouldCreateRenderer() take a Node reference
+ https://bugs.webkit.org/show_bug.cgi?id=124132
+
+ Reviewed by Andreas Kling.
+
+ The Node passed to childShouldCreateRenderer() is never null.
+
2013-11-10 Frédéric Wang <fred.wang@free.fr>
CSS direction must be reset to ltr on <math> element.
if (e) {
m_parentNode = NodeRenderingTraversal::parent(e);
- bool resetStyleInheritance = hasShadowRootParent(e) && toShadowRoot(e->parentNode())->resetStyleInheritance();
+ bool resetStyleInheritance = hasShadowRootParent(*e) && toShadowRoot(e->parentNode())->resetStyleInheritance();
m_parentStyle = resetStyleInheritance ? 0 :
parentStyle ? parentStyle :
m_parentNode ? m_parentNode->renderStyle() : 0;
void disconnectDescendantFrames();
- virtual bool childShouldCreateRenderer(const Node*) const { return true; }
+ virtual bool childShouldCreateRenderer(const Node&) const { return true; }
using Node::setAttributeEventListener;
void setAttributeEventListener(const AtomicString& eventType, const QualifiedName& attributeName, const AtomicString& value);
}
#endif
-bool Element::childShouldCreateRenderer(const Node* child) const
+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();
+ if (child.isSVGElement())
+ return child.hasTagName(SVGNames::svgTag) || isSVGElement();
#endif
return ContainerNode::childShouldCreateRenderer(child);
}
// to event listeners, and prevents DOMActivate events from being sent at all.
virtual bool isDisabledFormControl() const { return false; }
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
#if ENABLE(SVG)
bool hasPendingResources() const;
return parentNode();
}
-inline bool hasShadowRootParent(const Node* node)
+inline bool hasShadowRootParent(const Node& node)
{
- return node->parentNode() && node->parentNode()->isShadowRoot();
+ return node.parentNode() && node.parentNode()->isShadowRoot();
}
} // namespace
HTMLElement::parseAttribute(name, value);
}
-bool HTMLDetailsElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLDetailsElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isPseudoElement())
+ if (child.isPseudoElement())
return HTMLElement::childShouldCreateRenderer(child);
if (!hasShadowRootOrActiveInsertionPointParent(child))
if (m_isOpen)
return HTMLElement::childShouldCreateRenderer(child);
- if (!child->hasTagName(summaryTag))
+ if (!child.hasTagName(summaryTag))
return false;
- return child == findMainSummary() && HTMLElement::childShouldCreateRenderer(child);
+ return &child == findMainSummary() && HTMLElement::childShouldCreateRenderer(child);
}
void HTMLDetailsElement::toggleOpen()
HTMLDetailsElement(const QualifiedName&, Document&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
setNeedsValidityCheck();
}
-bool HTMLFormControlElement::validationMessageShadowTreeContains(const Node* node) const
+bool HTMLFormControlElement::validationMessageShadowTreeContains(const Node& node) const
{
return m_validationMessage && m_validationMessage->shadowTreeContains(node);
}
void setNeedsWillValidateCheck();
virtual bool recalcWillValidate() const;
- bool validationMessageShadowTreeContains(const Node*) const;
+ bool validationMessageShadowTreeContains(const Node&) const;
private:
virtual void refFormAssociatedElement() OVERRIDE { ref(); }
return new RenderMedia(*this, std::move(style));
}
-bool HTMLMediaElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLMediaElement::childShouldCreateRenderer(const Node& child) const
{
#if ENABLE(MEDIA_CONTROLS_SCRIPT)
return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child);
// be rendered. So this should return false for most of the children.
// One exception is a shadow tree built for rendering controls which should be visible.
// So we let them go here by comparing its subtree root with one of the controls.
- return &mediaControls()->treeScope() == &child->treeScope()
+ return &mediaControls()->treeScope() == &child.treeScope()
&& hasShadowRootParent(child)
&& HTMLElement::childShouldCreateRenderer(child);
#endif
virtual bool supportsFocus() const OVERRIDE;
virtual bool isMouseFocusable() const OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
virtual void removedFrom(ContainerNode&) OVERRIDE;
virtual void didRecalcStyle(Style::Change) OVERRIDE;
return new RenderMeter(*this, std::move(style));
}
-bool HTMLMeterElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLMeterElement::childShouldCreateRenderer(const Node& child) const
{
return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child);
}
virtual bool recalcWillValidate() const { return false; }
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
void didElementStateChange();
return new RenderProgress(*this, std::move(style));
}
-bool HTMLProgressElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLProgressElement::childShouldCreateRenderer(const Node& child) const
{
return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child);
}
virtual bool supportLabels() const OVERRIDE { return true; }
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
RenderProgress* renderProgress() const;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
return new RenderListBox(*this, std::move(style));
}
-bool HTMLSelectElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLSelectElement::childShouldCreateRenderer(const Node& child) const
{
if (!HTMLFormControlElementWithState::childShouldCreateRenderer(child))
return false;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) OVERRIDE;
return new RenderBlockFlow(*this, std::move(style));
}
-bool HTMLSummaryElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLSummaryElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isPseudoElement())
+ if (child.isPseudoElement())
return HTMLElement::childShouldCreateRenderer(child);
return hasShadowRootOrActiveInsertionPointParent(child) && HTMLElement::childShouldCreateRenderer(child);
HTMLSummaryElement(const QualifiedName&, Document&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual void defaultEventHandler(Event*);
virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
{
}
-bool HTMLTextFormControlElement::childShouldCreateRenderer(const Node* child) const
+bool HTMLTextFormControlElement::childShouldCreateRenderer(const Node& child) const
{
// FIXME: We shouldn't force the pseudo elements down into the shadow, but
// this perserves the current behavior of WebKit.
- if (child->isPseudoElement())
+ if (child.isPseudoElement())
return HTMLFormControlElementWithState::childShouldCreateRenderer(child);
return hasShadowRootParent(child) && HTMLFormControlElementWithState::childShouldCreateRenderer(child);
}
{
ASSERT(position.isNull() || position.anchorType() == Position::PositionIsOffsetInAnchor
|| position.containerNode() || !position.anchorNode()->shadowHost()
- || hasShadowRootParent(position.anchorNode()));
+ || hasShadowRootParent(*position.anchorNode()));
Node* container = position.containerNode();
if (!container)
virtual void dispatchFocusEvent(PassRefPtr<Element> oldFocusedElement, FocusDirection) OVERRIDE FINAL;
virtual void dispatchBlurEvent(PassRefPtr<Element> newFocusedElement) OVERRIDE FINAL;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
// Returns true if user-editable value is empty. Used to check placeholder visibility.
virtual bool isEmptyValue() const = 0;
m_timer->startOneShot(0);
}
-bool ValidationMessage::shadowTreeContains(const Node* node) const
+bool ValidationMessage::shadowTreeContains(const Node& node) const
{
if (validationMessageClient() || !m_bubble)
return false;
- return &m_bubble->treeScope() == &node->treeScope();
+ return &m_bubble->treeScope() == &node.treeScope();
}
void ValidationMessage::deleteBubbleTree(Timer<ValidationMessage>*)
void updateValidationMessage(const String&);
void requestToHideMessage();
bool isVisible() const;
- bool shadowTreeContains(const Node*) const;
+ bool shadowTreeContains(const Node&) const;
private:
explicit ValidationMessage(HTMLFormControlElement*);
InsertionPoint* findInsertionPointOf(const Node*);
-inline bool hasShadowRootOrActiveInsertionPointParent(const Node* node)
+inline bool hasShadowRootOrActiveInsertionPointParent(const Node& node)
{
return hasShadowRootParent(node)
- || isActiveInsertionPoint(findInsertionPointOf(node))
- || isActiveInsertionPoint(node->parentNode());
+ || isActiveInsertionPoint(findInsertionPointOf(&node))
+ || isActiveInsertionPoint(node.parentNode());
}
} // namespace WebCore
}
}
-bool MathMLElement::childShouldCreateRenderer(const Node* child) const
+bool MathMLElement::childShouldCreateRenderer(const Node& child) const
{
// Only create renderers for MathML elements or text. MathML prohibits non-MathML markup inside a <math> element.
- return child->isTextNode() || child->isMathMLElement();
+ return child.isTextNode() || child.isMathMLElement();
}
}
int colSpan() const;
int rowSpan() const;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
-
protected:
MathMLElement(const QualifiedName& tagName, Document&);
private:
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet&) OVERRIDE;
+
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
};
void isMathMLElement(const MathMLElement&); // Catch unnecessary runtime check of type known at compile time.
return MathMLElement::createRenderer(std::move(style));
}
-bool MathMLTextElement::childShouldCreateRenderer(const Node* child) const
+bool MathMLTextElement::childShouldCreateRenderer(const Node& child) const
{
- return child->isTextNode();
+ return child.isTextNode();
}
}
static PassRefPtr<MathMLTextElement> create(const QualifiedName& tagName, Document&);
virtual void didAttachRenderers() OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
-
private:
MathMLTextElement(const QualifiedName& tagName, Document&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
+
virtual void childrenChanged(const ChildChange&) OVERRIDE;
};
return false;
if (!parentRenderer->canHaveChildren() && !(element.isPseudoElement() && parentRenderer->canHaveGeneratedChildren()))
return false;
- if (!renderingParent->childShouldCreateRenderer(&element))
+ if (!renderingParent->childShouldCreateRenderer(element))
return false;
return true;
}
RenderElement* parentRenderer = renderingParentNode->renderer();
if (!parentRenderer || !parentRenderer->canHaveChildren())
return;
- if (!renderingParentNode->childShouldCreateRenderer(&textNode))
+ if (!renderingParentNode->childShouldCreateRenderer(textNode))
return;
// FIXME: constify this RenderStyle&.
return document().frame()->eventHandler().tabsToLinks(event);
}
-bool SVGAElement::childShouldCreateRenderer(const Node* child) const
+bool SVGAElement::childShouldCreateRenderer(const Node& child) const
{
// http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment
// The 'a' element may contain any element that its parent may contain, except itself.
- if (child->hasTagName(SVGNames::aTag))
+ if (child.hasTagName(SVGNames::aTag))
return false;
if (parentNode() && parentNode()->isSVGElement())
return parentNode()->childShouldCreateRenderer(child);
virtual void svgAttributeChanged(const QualifiedName&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual void defaultEventHandler(Event*);
virtual bool isFocusable() const OVERRIDE;
virtual bool isURLAttribute(const Attribute&) const;
- virtual bool childShouldCreateRenderer(const Node*) const;
-
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAElement)
// This declaration used to define a non-virtual "String& target() const" method, that clashes with "virtual String Element::target() const".
// That's why it has been renamed to "svgTarget", the CodeGenerators take care of calling svgTargetAnimated() instead of targetAnimated(), see CodeGenerator.pm.
return fastGetAttribute(SVGNames::formatAttr);
}
-bool SVGAltGlyphElement::childShouldCreateRenderer(const Node* child) const
+bool SVGAltGlyphElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isTextNode())
+ if (child.isTextNode())
return true;
return false;
}
SVGAltGlyphElement(const QualifiedName&, Document&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAltGlyphElement)
DECLARE_ANIMATED_STRING(Href, href)
}
}
-bool SVGDocument::childShouldCreateRenderer(const Node* child) const
+bool SVGDocument::childShouldCreateRenderer(const Node& child) const
{
if (isSVGSVGElement(child))
- return toSVGSVGElement(child)->isValid();
+ return toSVGSVGElement(child).isValid();
return true;
}
private:
SVGDocument(Frame*, const URL&);
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
FloatPoint m_translate;
};
sendSVGLoadEventIfPossible();
}
-bool SVGElement::childShouldCreateRenderer(const Node* child) const
+bool SVGElement::childShouldCreateRenderer(const Node& child) const
{
DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, invalidTextContent, ());
invalidTextContent.add(SVGNames::trefTag);
invalidTextContent.add(SVGNames::tspanTag);
}
- if (child->isSVGElement()) {
- const SVGElement* svgChild = toSVGElement(child);
- if (invalidTextContent.contains(svgChild->tagQName()))
+ if (child.isSVGElement()) {
+ const SVGElement& svgChild = toSVGElement(child);
+ if (invalidTextContent.contains(svgChild.tagQName()))
return false;
- return svgChild->isValid();
+ return svgChild.isValid();
}
return false;
}
virtual void finishParsingChildren() OVERRIDE;
virtual void attributeChanged(const QualifiedName&, const AtomicString&, AttributeModificationReason = ModifiedDirectly) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
SVGElementRareData& ensureSVGRareData();
return new RenderSVGResourceFilter(*this, std::move(style));
}
-bool SVGFilterElement::childShouldCreateRenderer(const Node* child) const
+bool SVGFilterElement::childShouldCreateRenderer(const Node& child) const
{
- if (!child->isSVGElement())
+ if (!child.isSVGElement())
return false;
- const SVGElement* svgElement = toSVGElement(child);
+ const SVGElement& svgElement = toSVGElement(child);
DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, allowedChildElementTags, ());
if (allowedChildElementTags.isEmpty()) {
allowedChildElementTags.add(SVGNames::feTurbulenceTag);
}
- return allowedChildElementTags.contains<SVGAttributeHashTranslator>(svgElement->tagQName());
+ return allowedChildElementTags.contains<SVGAttributeHashTranslator>(svgElement.tagQName());
}
bool SVGFilterElement::selfHasRelativeLengths() const
virtual void childrenChanged(const ChildChange&) OVERRIDE;
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual bool selfHasRelativeLengths() const;
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE { return false; }
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE { return false; }
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
DECLARE_ANIMATED_LENGTH(X, x)
return new RenderSVGForeignObject(*this, std::move(style));
}
-bool SVGForeignObjectElement::childShouldCreateRenderer(const Node* child) const
+bool SVGForeignObjectElement::childShouldCreateRenderer(const Node& child) const
{
// Disallow arbitary SVG content. Only allow proper <svg xmlns="svgNS"> subdocuments.
- if (child->isSVGElement())
- return child->hasTagName(SVGNames::svgTag);
+ if (child.isSVGElement())
+ return child.hasTagName(SVGNames::svgTag);
// Skip over SVG rules which disallow non-SVG kids
return StyledElement::childShouldCreateRenderer(child);
virtual void svgAttributeChanged(const QualifiedName&);
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
virtual bool selfHasRelativeLengths() const;
return adoptRef(new SVGSwitchElement(tagName, document));
}
-bool SVGSwitchElement::childShouldCreateRenderer(const Node* child) const
+bool SVGSwitchElement::childShouldCreateRenderer(const Node& child) const
{
// FIXME: This function does not do what the comment below implies it does.
// It will create a renderer for any valid SVG element children, not just the first one.
for (auto element = svgChildren.begin(), end = svgChildren.end(); element != end; ++element) {
if (!element->isValid())
continue;
- return &*element == child; // Only allow this child if it's the first valid child
+ return &*element == &child; // Only allow this child if it's the first valid child
}
return false;
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool supportsFocus() const OVERRIDE { return true; }
- virtual bool childShouldCreateRenderer(const Node*) const;
-
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSwitchElement)
return new RenderSVGInline(*this, std::move(style));
}
-bool SVGTRefElement::childShouldCreateRenderer(const Node* child) const
+bool SVGTRefElement::childShouldCreateRenderer(const Node& child) const
{
- return child->isInShadowTree();
+ return child.isInShadowTree();
}
bool SVGTRefElement::rendererIsNeeded(const RenderStyle& style)
virtual void svgAttributeChanged(const QualifiedName&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&);
virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
return new RenderSVGTSpan(*this, std::move(style));
}
-bool SVGTSpanElement::childShouldCreateRenderer(const Node* child) const
+bool SVGTSpanElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isTextNode()
- || child->hasTagName(SVGNames::aTag)
+ if (child.isTextNode()
+ || child.hasTagName(SVGNames::aTag)
#if ENABLE(SVG_FONTS)
- || child->hasTagName(SVGNames::altGlyphTag)
+ || child.hasTagName(SVGNames::altGlyphTag)
#endif
- || child->hasTagName(SVGNames::trefTag)
- || child->hasTagName(SVGNames::tspanTag))
+ || child.hasTagName(SVGNames::trefTag)
+ || child.hasTagName(SVGNames::tspanTag))
return true;
return false;
SVGTSpanElement(const QualifiedName&, Document&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&);
};
return new RenderSVGText(*this, std::move(style));
}
-bool SVGTextElement::childShouldCreateRenderer(const Node* child) const
+bool SVGTextElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isTextNode()
- || child->hasTagName(SVGNames::aTag)
+ if (child.isTextNode()
+ || child.hasTagName(SVGNames::aTag)
#if ENABLE(SVG_FONTS)
- || child->hasTagName(SVGNames::altGlyphTag)
+ || child.hasTagName(SVGNames::altGlyphTag)
#endif
- || child->hasTagName(SVGNames::textPathTag)
- || child->hasTagName(SVGNames::trefTag)
- || child->hasTagName(SVGNames::tspanTag))
+ || child.hasTagName(SVGNames::textPathTag)
+ || child.hasTagName(SVGNames::trefTag)
+ || child.hasTagName(SVGNames::tspanTag))
return true;
return false;
virtual bool supportsFocus() const OVERRIDE { return true; }
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
};
NODE_TYPE_CASTS(SVGTextElement)
return new RenderSVGTextPath(*this, std::move(style));
}
-bool SVGTextPathElement::childShouldCreateRenderer(const Node* child) const
+bool SVGTextPathElement::childShouldCreateRenderer(const Node& child) const
{
- if (child->isTextNode()
- || child->hasTagName(SVGNames::aTag)
- || child->hasTagName(SVGNames::trefTag)
- || child->hasTagName(SVGNames::tspanTag))
+ if (child.isTextNode()
+ || child.hasTagName(SVGNames::aTag)
+ || child.hasTagName(SVGNames::trefTag)
+ || child.hasTagName(SVGNames::tspanTag))
return true;
return false;
virtual void svgAttributeChanged(const QualifiedName&);
virtual RenderElement* createRenderer(PassRef<RenderStyle>) OVERRIDE;
- virtual bool childShouldCreateRenderer(const Node*) const;
+ virtual bool childShouldCreateRenderer(const Node&) const OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&);
virtual bool selfHasRelativeLengths() const;