Commit b74dfb66 authored by antti@apple.com's avatar antti@apple.com

<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle&...

<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument

Reviewed by Darin Adler.

This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.

* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 31bf3315
2013-08-20 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
Reviewed by Darin Adler.
This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::rendererIsNeeded):
* dom/PseudoElement.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::rendererIsNeeded):
* html/HTMLAppletElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLIFrameElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::rendererIsNeeded):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::rendererIsNeeded):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::rendererIsNeeded):
* html/HTMLVideoElement.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/DetailsMarkerControl.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::rendererIsNeeded):
* html/shadow/InsertionPoint.h:
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore::MeterInnerElement::rendererIsNeeded):
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::rendererIsNeeded):
(WebCore::ProgressInnerElement::rendererIsNeeded):
* html/shadow/ProgressShadowElement.h:
* svg/SVGDescElement.h:
* svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::rendererIsNeeded):
* svg/SVGGElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):
* svg/SVGSVGElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::rendererIsNeeded):
* svg/SVGStopElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::rendererIsNeeded):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::rendererIsNeeded):
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::rendererIsNeeded):
* svg/SVGTSpanElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::rendererIsNeeded):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
2013-08-20 Tim Horton <timothy_horton@apple.com>
<https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
......@@ -1242,9 +1242,9 @@ const AtomicString& Element::imageSourceURL() const
return getAttribute(srcAttr);
}
bool Element::rendererIsNeeded(const NodeRenderingContext& context)
bool Element::rendererIsNeeded(const RenderStyle& style)
{
return context.style()->display() != NONE;
return style.display() != NONE;
}
RenderObject* Element::createRenderer(RenderArena*, RenderStyle* style)
......
......@@ -301,7 +301,7 @@ public:
void lazyReattach(ShouldSetAttached = SetAttached);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
void didAffectSelector(AffectedSelectorMask);
ShadowRoot* shadowRoot() const;
......
......@@ -212,7 +212,7 @@ bool NodeRenderingContext::elementInsideRegionNeedsRenderer()
elementInsideRegionNeedsRenderer = element->shouldMoveToFlowThread(m_style.get());
// Children of this element will only be allowed to be flowed into other flow-threads if display is NOT none.
if (element->rendererIsNeeded(*this))
if (element->rendererIsNeeded(*m_style))
element->setIsInsideRegion(true);
}
#endif
......@@ -264,7 +264,7 @@ void NodeRenderingContext::createRendererForElementIfNeeded()
moveToFlowThreadIfNeeded();
if (!element->rendererIsNeeded(*this))
if (!element->rendererIsNeeded(*m_style))
return;
RenderObject* parentRenderer = this->parentRenderer();
......
......@@ -97,9 +97,9 @@ void PseudoElement::didAttachRenderers()
}
}
bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context)
bool PseudoElement::rendererIsNeeded(const RenderStyle& style)
{
return pseudoElementRendererIsNeeded(context.style());
return pseudoElementRendererIsNeeded(&style);
}
void PseudoElement::didRecalcStyle(Style::Change)
......
......@@ -47,7 +47,7 @@ public:
virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
virtual void didAttachRenderers() OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
// As per http://dev.w3.org/csswg/css3-regions/#flow-into, pseudo-elements such as ::first-line, ::first-letter, ::before or ::after
// cannot be directly collected into a named flow.
......
......@@ -67,11 +67,11 @@ void HTMLAppletElement::parseAttribute(const QualifiedName& name, const AtomicSt
HTMLPlugInImageElement::parseAttribute(name, value);
}
bool HTMLAppletElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLAppletElement::rendererIsNeeded(const RenderStyle& style)
{
if (!fastHasAttribute(codeAttr))
return false;
return HTMLPlugInImageElement::rendererIsNeeded(context);
return HTMLPlugInImageElement::rendererIsNeeded(style);
}
RenderObject* HTMLAppletElement::createRenderer(RenderArena*, RenderStyle* style)
......
......@@ -36,7 +36,7 @@ private:
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
virtual RenderWidget* renderWidgetForJSBindings() const;
......
......@@ -749,7 +749,7 @@ PassRefPtr<HTMLCollection> HTMLElement::children()
return ensureCachedHTMLCollection(NodeChildren);
}
bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLElement::rendererIsNeeded(const RenderStyle& style)
{
if (hasLocalName(noscriptTag)) {
Frame* frame = document()->frame();
......@@ -760,7 +760,7 @@ bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context)
if (frame && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
return false;
}
return StyledElement::rendererIsNeeded(context);
return StyledElement::rendererIsNeeded(style);
}
RenderObject* HTMLElement::createRenderer(RenderArena* arena, RenderStyle* style)
......
......@@ -80,7 +80,7 @@ public:
bool ieForbidsInsertHTML() const;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
HTMLFormElement* form() const { return virtualForm(); }
......
......@@ -170,10 +170,10 @@ void HTMLEmbedElement::updateWidget(PluginCreationOption pluginCreationOption)
loader->requestObject(this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);
}
bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLEmbedElement::rendererIsNeeded(const RenderStyle& style)
{
if (isImageType())
return HTMLPlugInImageElement::rendererIsNeeded(context);
return HTMLPlugInImageElement::rendererIsNeeded(style);
Frame* frame = document()->frame();
if (!frame)
......@@ -196,7 +196,7 @@ bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
return true;
#endif
return HTMLPlugInImageElement::rendererIsNeeded(context);
return HTMLPlugInImageElement::rendererIsNeeded(style);
}
bool HTMLEmbedElement::isURLAttribute(const Attribute& attribute) const
......
......@@ -38,7 +38,7 @@ private:
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
virtual const AtomicString& imageSourceURL() const OVERRIDE;
......
......@@ -95,10 +95,10 @@ bool HTMLFormElement::formWouldHaveSecureSubmission(const String& url)
return document()->completeURL(url).protocolIs("https");
}
bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
{
if (!m_wasDemoted)
return HTMLElement::rendererIsNeeded(context);
return HTMLElement::rendererIsNeeded(style);
ContainerNode* node = parentNode();
RenderObject* parentRenderer = node->renderer();
......@@ -112,7 +112,7 @@ bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
if (!parentIsTableElementPart)
return true;
EDisplay display = context.style()->display();
EDisplay display = style.display();
bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
|| display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
|| display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display == TABLE_CELL
......
......@@ -111,7 +111,7 @@ public:
private:
HTMLFormElement(const QualifiedName&, Document*);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
virtual void finishParsingChildren() OVERRIDE;
......
......@@ -48,7 +48,7 @@ PassRefPtr<HTMLFrameElement> HTMLFrameElement::create(const QualifiedName& tagNa
return adoptRef(new HTMLFrameElement(tagName, document));
}
bool HTMLFrameElement::rendererIsNeeded(const NodeRenderingContext&)
bool HTMLFrameElement::rendererIsNeeded(const RenderStyle&)
{
// For compatibility, frames render even when display: none is set.
return isURLAllowed();
......
......@@ -41,7 +41,7 @@ private:
virtual void didAttachRenderers() OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
......
......@@ -149,11 +149,11 @@ void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, const Atomic
HTMLElement::parseAttribute(name, value);
}
bool HTMLFrameSetElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style)
{
// For compatibility, frames render even when display: none is set.
// However, we delay creating a renderer until stylesheets have loaded.
return context.style()->isStyleAvailable();
return style.isStyleAvailable();
}
RenderObject *HTMLFrameSetElement::createRenderer(RenderArena *arena, RenderStyle *style)
......
......@@ -74,7 +74,7 @@ private:
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual void willAttachRenderers() OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void defaultEventHandler(Event*);
......
......@@ -91,9 +91,9 @@ void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
HTMLFrameElementBase::parseAttribute(name, value);
}
bool HTMLIFrameElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLIFrameElement::rendererIsNeeded(const RenderStyle& style)
{
return isURLAllowed() && context.style()->display() != NONE;
return isURLAllowed() && style.display() != NONE;
}
RenderObject* HTMLIFrameElement::createRenderer(RenderArena* arena, RenderStyle*)
......
......@@ -41,7 +41,7 @@ private:
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void didRecalcStyle(Style::Change) OVERRIDE;
......
......@@ -786,9 +786,9 @@ void HTMLInputElement::finishParsingChildren()
}
}
bool HTMLInputElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLInputElement::rendererIsNeeded(const RenderStyle& style)
{
return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded(context);
return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded(style);
}
RenderObject* HTMLInputElement::createRenderer(RenderArena* arena, RenderStyle* style)
......
......@@ -187,7 +187,7 @@ public:
bool canHaveSelection() const;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void willAttachRenderers() OVERRIDE;
virtual void didAttachRenderers() OVERRIDE;
......
......@@ -545,7 +545,7 @@ void HTMLMediaElement::finishParsingChildren()
#endif
}
bool HTMLMediaElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLMediaElement::rendererIsNeeded(const RenderStyle& style)
{
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
UNUSED_PARAM(context);
......@@ -555,7 +555,7 @@ bool HTMLMediaElement::rendererIsNeeded(const NodeRenderingContext& context)
return true;
#else
return controls() ? HTMLElement::rendererIsNeeded(context) : false;
return controls() && HTMLElement::rendererIsNeeded(style);
#endif
}
......
......@@ -432,7 +432,7 @@ private:
virtual bool hasCustomFocusLogic() const OVERRIDE;
virtual bool supportsFocus() const OVERRIDE;
virtual bool isMouseFocusable() const OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
......
......@@ -324,14 +324,14 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption)
renderFallbackContent();
}
bool HTMLObjectElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLObjectElement::rendererIsNeeded(const RenderStyle& style)
{
// FIXME: This check should not be needed, detached documents never render!
Frame* frame = document()->frame();
if (!frame)
return false;
return HTMLPlugInImageElement::rendererIsNeeded(context);
return HTMLPlugInImageElement::rendererIsNeeded(style);
}
Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(ContainerNode* insertionPoint)
......
......@@ -73,7 +73,7 @@ private:
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
......
......@@ -45,7 +45,7 @@ private:
virtual const AtomicString& formControlType() const;
virtual bool isFocusable() const OVERRIDE;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
virtual void didAttachRenderers() OVERRIDE;
virtual void willDetachRenderers() OVERRIDE;
......
......@@ -70,7 +70,7 @@ private:
HTMLOptionElement(const QualifiedName&, Document*);
virtual bool isFocusable() const OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
virtual void didAttachRenderers() OVERRIDE;
virtual void willDetachRenderers() OVERRIDE;
......
......@@ -63,9 +63,9 @@ PassRefPtr<HTMLVideoElement> HTMLVideoElement::create(const QualifiedName& tagNa
return videoElement.release();
}
bool HTMLVideoElement::rendererIsNeeded(const NodeRenderingContext& context)
bool HTMLVideoElement::rendererIsNeeded(const RenderStyle& style)
{
return HTMLElement::rendererIsNeeded(context);
return HTMLElement::rendererIsNeeded(style);
}
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
......
......@@ -74,7 +74,7 @@ public:
private:
HTMLVideoElement(const QualifiedName&, Document*, bool);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
#endif
......
......@@ -50,9 +50,9 @@ RenderObject* DetailsMarkerControl::createRenderer(RenderArena* arena, RenderSty
return new (arena) RenderDetailsMarker(this);
}
bool DetailsMarkerControl::rendererIsNeeded(const NodeRenderingContext& context)
bool DetailsMarkerControl::rendererIsNeeded(const RenderStyle& style)
{
return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded(context);
return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded(style);
}
const AtomicString& DetailsMarkerControl::shadowPseudoId() const
......
......@@ -45,7 +45,7 @@ public:
private:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
virtual const AtomicString& shadowPseudoId() const;
HTMLSummaryElement* summaryElement();
......
......@@ -107,9 +107,9 @@ bool InsertionPoint::isActive() const
return true;
}
bool InsertionPoint::rendererIsNeeded(const NodeRenderingContext& context)
bool InsertionPoint::rendererIsNeeded(const RenderStyle& style)
{
return !isShadowBoundary() && HTMLElement::rendererIsNeeded(context);
return !isShadowBoundary() && HTMLElement::rendererIsNeeded(style);
}
void InsertionPoint::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
......
......@@ -74,7 +74,7 @@ public:
protected:
InsertionPoint(const QualifiedName&, Document*);
virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void removedFrom(ContainerNode*) OVERRIDE;
......
......@@ -54,10 +54,10 @@ HTMLMeterElement* MeterShadowElement::meterElement() const
return toHTMLMeterElement(shadowHost());
}
bool MeterShadowElement::rendererIsNeeded(const NodeRenderingContext& context)
bool MeterShadowElement::rendererIsNeeded(const RenderStyle& style)
{
RenderObject* render = meterElement()->renderer();
return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(context);
return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(style);
}
MeterInnerElement::MeterInnerElement(Document* document)
......@@ -67,13 +67,13 @@ MeterInnerElement::MeterInnerElement(Document* document)
setPseudo(pseudoId);
}
bool MeterInnerElement::rendererIsNeeded(const NodeRenderingContext& context)
bool MeterInnerElement::rendererIsNeeded(const RenderStyle& style)
{
if (meterElement()->hasAuthorShadowRoot())
return HTMLDivElement::rendererIsNeeded(context);
return HTMLDivElement::rendererIsNeeded(style);
RenderObject* render = meterElement()->renderer();
return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(context);
return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(style);
}
RenderObject* MeterInnerElement::createRenderer(RenderArena* arena, RenderStyle*)
......
......@@ -46,7 +46,7 @@ public:
HTMLMeterElement* meterElement() const;
private:
virtual bool rendererIsNeeded(const NodeRenderingContext&);
virtual bool rendererIsNeeded(const RenderStyle&);
};
class MeterInnerElement FINAL : public MeterShadowElement {
......@@ -56,7 +56,7 @@ public:
private:
MeterInnerElement(Document*);
virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
};
......
......@@ -50,10 +50,10 @@ HTMLProgressElement* ProgressShadowElement::progressElement() const
return toHTMLProgressElement(shadowHost());
}
bool ProgressShadowElement::rendererIsNeeded(const NodeRenderingContext& context)
bool ProgressShadowElement::rendererIsNeeded(const RenderStyle& style)
{
RenderObject* progressRenderer = progressElement()->renderer();
return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(context);
return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style);
}
ProgressInnerElement::ProgressInnerElement(Document* document)
......@@ -66,13 +66,13 @@ RenderObject* ProgressInnerElement::createRenderer(RenderArena* arena, RenderSty
return new (arena) RenderProgress(this);
}
bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context)
bool ProgressInnerElement::rendererIsNeeded(const RenderStyle& style)
{
if (progressElement()->hasAuthorShadowRoot())
return HTMLDivElement::rendererIsNeeded(context);
return HTMLDivElement::rendererIsNeeded(style);
RenderObject* progressRenderer = progressElement()->renderer();
return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(context);