Changeset 154358 in webkit


Ignore:
Timestamp:
Aug 20, 2013, 2:22:53 PM (11 years ago)
Author:
Antti Koivisto
Message:

<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:
Location:
trunk/Source/WebCore
Files:
67 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154353 r154358  
     12013-08-20  Antti Koivisto  <antti@apple.com>
     2
     3        <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
     4
     5        Reviewed by Darin Adler.
     6
     7        This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
     8
     9        * dom/Element.cpp:
     10        (WebCore::Element::rendererIsNeeded):
     11        * dom/Element.h:
     12        * dom/NodeRenderingContext.cpp:
     13        (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
     14        (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
     15        * dom/PseudoElement.cpp:
     16        (WebCore::PseudoElement::rendererIsNeeded):
     17        * dom/PseudoElement.h:
     18        * html/HTMLAppletElement.cpp:
     19        (WebCore::HTMLAppletElement::rendererIsNeeded):
     20        * html/HTMLAppletElement.h:
     21        * html/HTMLElement.cpp:
     22        (WebCore::HTMLElement::rendererIsNeeded):
     23        * html/HTMLElement.h:
     24        * html/HTMLEmbedElement.cpp:
     25        (WebCore::HTMLEmbedElement::rendererIsNeeded):
     26        * html/HTMLEmbedElement.h:
     27        * html/HTMLFormElement.cpp:
     28        (WebCore::HTMLFormElement::rendererIsNeeded):
     29        * html/HTMLFormElement.h:
     30        * html/HTMLFrameElement.cpp:
     31        (WebCore::HTMLFrameElement::rendererIsNeeded):
     32        * html/HTMLFrameElement.h:
     33        * html/HTMLFrameSetElement.cpp:
     34        (WebCore::HTMLFrameSetElement::rendererIsNeeded):
     35        * html/HTMLFrameSetElement.h:
     36        * html/HTMLIFrameElement.cpp:
     37        (WebCore::HTMLIFrameElement::rendererIsNeeded):
     38        * html/HTMLIFrameElement.h:
     39        * html/HTMLInputElement.cpp:
     40        (WebCore::HTMLInputElement::rendererIsNeeded):
     41        * html/HTMLInputElement.h:
     42        * html/HTMLMediaElement.cpp:
     43        (WebCore::HTMLMediaElement::rendererIsNeeded):
     44        * html/HTMLMediaElement.h:
     45        * html/HTMLObjectElement.cpp:
     46        (WebCore::HTMLObjectElement::rendererIsNeeded):
     47        * html/HTMLObjectElement.h:
     48        * html/HTMLOptGroupElement.h:
     49        * html/HTMLOptionElement.h:
     50        * html/HTMLVideoElement.cpp:
     51        (WebCore::HTMLVideoElement::rendererIsNeeded):
     52        * html/HTMLVideoElement.h:
     53        * html/shadow/DetailsMarkerControl.cpp:
     54        (WebCore::DetailsMarkerControl::rendererIsNeeded):
     55        * html/shadow/DetailsMarkerControl.h:
     56        * html/shadow/InsertionPoint.cpp:
     57        (WebCore::InsertionPoint::rendererIsNeeded):
     58        * html/shadow/InsertionPoint.h:
     59        * html/shadow/MeterShadowElement.cpp:
     60        (WebCore::MeterShadowElement::rendererIsNeeded):
     61        (WebCore::MeterInnerElement::rendererIsNeeded):
     62        * html/shadow/MeterShadowElement.h:
     63        * html/shadow/ProgressShadowElement.cpp:
     64        (WebCore::ProgressShadowElement::rendererIsNeeded):
     65        (WebCore::ProgressInnerElement::rendererIsNeeded):
     66        * html/shadow/ProgressShadowElement.h:
     67        * svg/SVGDescElement.h:
     68        * svg/SVGElement.h:
     69        (WebCore::SVGElement::rendererIsNeeded):
     70        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
     71        (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
     72        * svg/SVGFilterPrimitiveStandardAttributes.h:
     73        * svg/SVGFontElement.h:
     74        * svg/SVGForeignObjectElement.cpp:
     75        (WebCore::SVGForeignObjectElement::rendererIsNeeded):
     76        * svg/SVGForeignObjectElement.h:
     77        * svg/SVGGElement.cpp:
     78        (WebCore::SVGGElement::rendererIsNeeded):
     79        * svg/SVGGElement.h:
     80        * svg/SVGGlyphElement.h:
     81        * svg/SVGGlyphRefElement.h:
     82        * svg/SVGHKernElement.h:
     83        * svg/SVGMarkerElement.h:
     84        * svg/SVGMissingGlyphElement.h:
     85        * svg/SVGSVGElement.cpp:
     86        (WebCore::SVGSVGElement::rendererIsNeeded):
     87        * svg/SVGSVGElement.h:
     88        * svg/SVGStopElement.cpp:
     89        (WebCore::SVGStopElement::rendererIsNeeded):
     90        * svg/SVGStopElement.h:
     91        * svg/SVGStyledElement.cpp:
     92        (WebCore::SVGStyledElement::rendererIsNeeded):
     93        * svg/SVGStyledElement.h:
     94        * svg/SVGTRefElement.cpp:
     95        (WebCore::SVGTRefElement::rendererIsNeeded):
     96        * svg/SVGTRefElement.h:
     97        * svg/SVGTSpanElement.cpp:
     98        (WebCore::SVGTSpanElement::rendererIsNeeded):
     99        * svg/SVGTSpanElement.h:
     100        * svg/SVGTextPathElement.cpp:
     101        (WebCore::SVGTextPathElement::rendererIsNeeded):
     102        * svg/SVGTextPathElement.h:
     103        * svg/SVGTitleElement.h:
     104        * svg/SVGVKernElement.h:
     105        * svg/SVGViewElement.h:
     106
    11072013-08-20  Tim Horton  <timothy_horton@apple.com>
    2108
  • trunk/Source/WebCore/dom/Element.cpp

    r154320 r154358  
    12431243}
    12441244
    1245 bool Element::rendererIsNeeded(const NodeRenderingContext& context)
    1246 {
    1247     return context.style()->display() != NONE;
     1245bool Element::rendererIsNeeded(const RenderStyle& style)
     1246{
     1247    return style.display() != NONE;
    12481248}
    12491249
  • trunk/Source/WebCore/dom/Element.h

    r154264 r154358  
    302302
    303303    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    304     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     304    virtual bool rendererIsNeeded(const RenderStyle&);
    305305    void didAffectSelector(AffectedSelectorMask);
    306306
  • trunk/Source/WebCore/dom/NodeRenderingContext.cpp

    r154327 r154358  
    213213
    214214        // Children of this element will only be allowed to be flowed into other flow-threads if display is NOT none.
    215         if (element->rendererIsNeeded(*this))
     215        if (element->rendererIsNeeded(*m_style))
    216216            element->setIsInsideRegion(true);
    217217    }
     
    265265    moveToFlowThreadIfNeeded();
    266266
    267     if (!element->rendererIsNeeded(*this))
     267    if (!element->rendererIsNeeded(*m_style))
    268268        return;
    269269
  • trunk/Source/WebCore/dom/PseudoElement.cpp

    r154254 r154358  
    9898}
    9999
    100 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context)
     100bool PseudoElement::rendererIsNeeded(const RenderStyle& style)
    101101{
    102     return pseudoElementRendererIsNeeded(context.style());
     102    return pseudoElementRendererIsNeeded(&style);
    103103}
    104104
  • trunk/Source/WebCore/dom/PseudoElement.h

    r154254 r154358  
    4848    virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
    4949    virtual void didAttachRenderers() OVERRIDE;
    50     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     50    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    5151
    5252    // As per http://dev.w3.org/csswg/css3-regions/#flow-into, pseudo-elements such as ::first-line, ::first-letter, ::before or ::after
  • trunk/Source/WebCore/html/HTMLAppletElement.cpp

    r154142 r154358  
    6868}
    6969
    70 bool HTMLAppletElement::rendererIsNeeded(const NodeRenderingContext& context)
     70bool HTMLAppletElement::rendererIsNeeded(const RenderStyle& style)
    7171{
    7272    if (!fastHasAttribute(codeAttr))
    7373        return false;
    74     return HTMLPlugInImageElement::rendererIsNeeded(context);
     74    return HTMLPlugInImageElement::rendererIsNeeded(style);
    7575}
    7676
  • trunk/Source/WebCore/html/HTMLAppletElement.h

    r149960 r154358  
    3737    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
    3838   
    39     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     39    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    4040    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
    4141
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r154192 r154358  
    750750}
    751751
    752 bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context)
     752bool HTMLElement::rendererIsNeeded(const RenderStyle& style)
    753753{
    754754    if (hasLocalName(noscriptTag)) {
     
    761761            return false;
    762762    }
    763     return StyledElement::rendererIsNeeded(context);
     763    return StyledElement::rendererIsNeeded(style);
    764764}
    765765
  • trunk/Source/WebCore/html/HTMLElement.h

    r153772 r154358  
    8181    bool ieForbidsInsertHTML() const;
    8282
    83     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     83    virtual bool rendererIsNeeded(const RenderStyle&);
    8484    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    8585
  • trunk/Source/WebCore/html/HTMLEmbedElement.cpp

    r154219 r154358  
    171171}
    172172
    173 bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
     173bool HTMLEmbedElement::rendererIsNeeded(const RenderStyle& style)
    174174{
    175175    if (isImageType())
    176         return HTMLPlugInImageElement::rendererIsNeeded(context);
     176        return HTMLPlugInImageElement::rendererIsNeeded(style);
    177177
    178178    Frame* frame = document()->frame();
     
    197197#endif
    198198
    199     return HTMLPlugInImageElement::rendererIsNeeded(context);
     199    return HTMLPlugInImageElement::rendererIsNeeded(style);
    200200}
    201201
  • trunk/Source/WebCore/html/HTMLEmbedElement.h

    r153772 r154358  
    3939    virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
    4040
    41     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     41    virtual bool rendererIsNeeded(const RenderStyle&);
    4242
    4343    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
  • trunk/Source/WebCore/html/HTMLFormElement.cpp

    r154142 r154358  
    9696}
    9797
    98 bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
     98bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
    9999{
    100100    if (!m_wasDemoted)
    101         return HTMLElement::rendererIsNeeded(context);
     101        return HTMLElement::rendererIsNeeded(style);
    102102
    103103    ContainerNode* node = parentNode();
     
    113113        return true;
    114114
    115     EDisplay display = context.style()->display();
     115    EDisplay display = style.display();
    116116    bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
    117117        || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
  • trunk/Source/WebCore/html/HTMLFormElement.h

    r152353 r154358  
    112112    HTMLFormElement(const QualifiedName&, Document*);
    113113
    114     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     114    virtual bool rendererIsNeeded(const RenderStyle&);
    115115    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
    116116    virtual void removedFrom(ContainerNode*) OVERRIDE;
  • trunk/Source/WebCore/html/HTMLFrameElement.cpp

    r154326 r154358  
    4949}
    5050
    51 bool HTMLFrameElement::rendererIsNeeded(const NodeRenderingContext&)
     51bool HTMLFrameElement::rendererIsNeeded(const RenderStyle&)
    5252{
    5353    // For compatibility, frames render even when display: none is set.
  • trunk/Source/WebCore/html/HTMLFrameElement.h

    r154254 r154358  
    4242    virtual void didAttachRenderers() OVERRIDE;
    4343
    44     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     44    virtual bool rendererIsNeeded(const RenderStyle&);
    4545    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4646   
  • trunk/Source/WebCore/html/HTMLFrameSetElement.cpp

    r154326 r154358  
    150150}
    151151
    152 bool HTMLFrameSetElement::rendererIsNeeded(const NodeRenderingContext& context)
     152bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style)
    153153{
    154154    // For compatibility, frames render even when display: none is set.
    155155    // However, we delay creating a renderer until stylesheets have loaded.
    156     return context.style()->isStyleAvailable();
     156    return style.isStyleAvailable();
    157157}
    158158
  • trunk/Source/WebCore/html/HTMLFrameSetElement.h

    r154326 r154358  
    7575
    7676    virtual void willAttachRenderers() OVERRIDE;
    77     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     77    virtual bool rendererIsNeeded(const RenderStyle&);
    7878    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    7979   
  • trunk/Source/WebCore/html/HTMLIFrameElement.cpp

    r154254 r154358  
    9292}
    9393
    94 bool HTMLIFrameElement::rendererIsNeeded(const NodeRenderingContext& context)
     94bool HTMLIFrameElement::rendererIsNeeded(const RenderStyle& style)
    9595{
    96     return isURLAllowed() && context.style()->display() != NONE;
     96    return isURLAllowed() && style.display() != NONE;
    9797}
    9898
  • trunk/Source/WebCore/html/HTMLIFrameElement.h

    r153783 r154358  
    4242    virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
    4343
    44     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     44    virtual bool rendererIsNeeded(const RenderStyle&);
    4545    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4646
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r154286 r154358  
    787787}
    788788
    789 bool HTMLInputElement::rendererIsNeeded(const NodeRenderingContext& context)
    790 {
    791     return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded(context);
     789bool HTMLInputElement::rendererIsNeeded(const RenderStyle& style)
     790{
     791    return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded(style);
    792792}
    793793
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r154254 r154358  
    188188    bool canHaveSelection() const;
    189189
    190     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     190    virtual bool rendererIsNeeded(const RenderStyle&);
    191191    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    192192    virtual void willAttachRenderers() OVERRIDE;
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r154345 r154358  
    546546}
    547547
    548 bool HTMLMediaElement::rendererIsNeeded(const NodeRenderingContext& context)
     548bool HTMLMediaElement::rendererIsNeeded(const RenderStyle& style)
    549549{
    550550#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     
    556556    return true;
    557557#else
    558     return controls() ? HTMLElement::rendererIsNeeded(context) : false;
     558    return controls() && HTMLElement::rendererIsNeeded(style);
    559559#endif
    560560}
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r154254 r154358  
    433433    virtual bool supportsFocus() const OVERRIDE;
    434434    virtual bool isMouseFocusable() const OVERRIDE;
    435     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     435    virtual bool rendererIsNeeded(const RenderStyle&);
    436436    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    437437    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
  • trunk/Source/WebCore/html/HTMLObjectElement.cpp

    r154257 r154358  
    325325}
    326326
    327 bool HTMLObjectElement::rendererIsNeeded(const NodeRenderingContext& context)
     327bool HTMLObjectElement::rendererIsNeeded(const RenderStyle& style)
    328328{
    329329    // FIXME: This check should not be needed, detached documents never render!
     
    332332        return false;
    333333
    334     return HTMLPlugInImageElement::rendererIsNeeded(context);
     334    return HTMLPlugInImageElement::rendererIsNeeded(style);
    335335}
    336336
  • trunk/Source/WebCore/html/HTMLObjectElement.h

    r153772 r154358  
    7474    virtual void removedFrom(ContainerNode*) OVERRIDE;
    7575
    76     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     76    virtual bool rendererIsNeeded(const RenderStyle&);
    7777    virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
    7878
  • trunk/Source/WebCore/html/HTMLOptGroupElement.h

    r154254 r154358  
    4646    virtual bool isFocusable() const OVERRIDE;
    4747    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
    48     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     48    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    4949    virtual void didAttachRenderers() OVERRIDE;
    5050    virtual void willDetachRenderers() OVERRIDE;
  • trunk/Source/WebCore/html/HTMLOptionElement.h

    r154254 r154358  
    7171
    7272    virtual bool isFocusable() const OVERRIDE;
    73     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     73    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    7474    virtual void didAttachRenderers() OVERRIDE;
    7575    virtual void willDetachRenderers() OVERRIDE;
  • trunk/Source/WebCore/html/HTMLVideoElement.cpp

    r154272 r154358  
    6464}
    6565
    66 bool HTMLVideoElement::rendererIsNeeded(const NodeRenderingContext& context)
    67 {
    68     return HTMLElement::rendererIsNeeded(context);
     66bool HTMLVideoElement::rendererIsNeeded(const RenderStyle& style)
     67{
     68    return HTMLElement::rendererIsNeeded(style);
    6969}
    7070
  • trunk/Source/WebCore/html/HTMLVideoElement.h

    r154254 r154358  
    7575    HTMLVideoElement(const QualifiedName&, Document*, bool);
    7676
    77     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     77    virtual bool rendererIsNeeded(const RenderStyle&);
    7878#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
    7979    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
  • trunk/Source/WebCore/html/shadow/DetailsMarkerControl.cpp

    r145399 r154358  
    5151}
    5252
    53 bool DetailsMarkerControl::rendererIsNeeded(const NodeRenderingContext& context)
     53bool DetailsMarkerControl::rendererIsNeeded(const RenderStyle& style)
    5454{
    55     return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded(context);
     55    return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded(style);
    5656}
    5757
  • trunk/Source/WebCore/html/shadow/DetailsMarkerControl.h

    r149960 r154358  
    4646private:
    4747    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    48     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     48    virtual bool rendererIsNeeded(const RenderStyle&);
    4949    virtual const AtomicString& shadowPseudoId() const;
    5050
  • trunk/Source/WebCore/html/shadow/InsertionPoint.cpp

    r154327 r154358  
    108108}
    109109
    110 bool InsertionPoint::rendererIsNeeded(const NodeRenderingContext& context)
    111 {
    112     return !isShadowBoundary() && HTMLElement::rendererIsNeeded(context);
     110bool InsertionPoint::rendererIsNeeded(const RenderStyle& style)
     111{
     112    return !isShadowBoundary() && HTMLElement::rendererIsNeeded(style);
    113113}
    114114
  • trunk/Source/WebCore/html/shadow/InsertionPoint.h

    r154327 r154358  
    7575protected:
    7676    InsertionPoint(const QualifiedName&, Document*);
    77     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     77    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    7878    virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
    7979    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
  • trunk/Source/WebCore/html/shadow/MeterShadowElement.cpp

    r142248 r154358  
    5555}
    5656
    57 bool MeterShadowElement::rendererIsNeeded(const NodeRenderingContext& context)
     57bool MeterShadowElement::rendererIsNeeded(const RenderStyle& style)
    5858{
    5959    RenderObject* render = meterElement()->renderer();
    60     return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(context);
     60    return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(style);
    6161}
    6262
     
    6868}
    6969
    70 bool MeterInnerElement::rendererIsNeeded(const NodeRenderingContext& context)
     70bool MeterInnerElement::rendererIsNeeded(const RenderStyle& style)
    7171{
    7272    if (meterElement()->hasAuthorShadowRoot())
    73         return HTMLDivElement::rendererIsNeeded(context);
     73        return HTMLDivElement::rendererIsNeeded(style);
    7474
    7575    RenderObject* render = meterElement()->renderer();
    76     return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(context);
     76    return render && !render->theme()->supportsMeter(render->style()->appearance()) && HTMLDivElement::rendererIsNeeded(style);
    7777}
    7878
  • trunk/Source/WebCore/html/shadow/MeterShadowElement.h

    r154121 r154358  
    4747
    4848private:
    49     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     49    virtual bool rendererIsNeeded(const RenderStyle&);
    5050};
    5151
     
    5757    MeterInnerElement(Document*);
    5858
    59     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     59    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    6060    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
    6161};
  • trunk/Source/WebCore/html/shadow/ProgressShadowElement.cpp

    r154099 r154358  
    5151}
    5252
    53 bool ProgressShadowElement::rendererIsNeeded(const NodeRenderingContext& context)
     53bool ProgressShadowElement::rendererIsNeeded(const RenderStyle& style)
    5454{
    5555    RenderObject* progressRenderer = progressElement()->renderer();
    56     return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(context);
     56    return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style);
    5757}
    5858
     
    6767}
    6868
    69 bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context)
     69bool ProgressInnerElement::rendererIsNeeded(const RenderStyle& style)
    7070{
    7171    if (progressElement()->hasAuthorShadowRoot())
    72         return HTMLDivElement::rendererIsNeeded(context);
     72        return HTMLDivElement::rendererIsNeeded(style);
    7373
    7474    RenderObject* progressRenderer = progressElement()->renderer();
    75     return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(context);   
     75    return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style);   
    7676}
    7777
  • trunk/Source/WebCore/html/shadow/ProgressShadowElement.h

    r154121 r154358  
    4747
    4848protected:
    49     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     49    virtual bool rendererIsNeeded(const RenderStyle&);
    5050};
    5151
     
    5858
    5959    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
    60     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     60    virtual bool rendererIsNeeded(const RenderStyle&);
    6161};
    6262
  • trunk/Source/WebCore/svg/SVGDescElement.h

    r152156 r154358  
    3636    SVGDescElement(const QualifiedName&, Document*);
    3737
    38     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     38    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    3939};
    4040
  • trunk/Source/WebCore/svg/SVGElement.h

    r153926 r154358  
    152152    virtual bool willRecalcStyle(Style::Change);
    153153
    154     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     154    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    155155
    156156    virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
  • trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp

    r151800 r154358  
    147147}
    148148
    149 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const NodeRenderingContext& context)
     149bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const RenderStyle& style)
    150150{
    151151    if (parentNode() && (parentNode()->hasTagName(SVGNames::filterTag)))
    152         return SVGStyledElement::rendererIsNeeded(context);
     152        return SVGStyledElement::rendererIsNeeded(style);
    153153
    154154    return false;
  • trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h

    r135069 r154358  
    7070
    7171    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
    72     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     72    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    7373    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE { return false; }
    7474
  • trunk/Source/WebCore/svg/SVGFontElement.h

    r152553 r154358  
    7474    SVGFontElement(const QualifiedName&, Document*);
    7575
    76     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; } 
     76    virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 
    7777
    7878    void ensureGlyphCache();
  • trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp

    r152553 r154358  
    143143}
    144144
    145 bool SVGForeignObjectElement::rendererIsNeeded(const NodeRenderingContext& context)
     145bool SVGForeignObjectElement::rendererIsNeeded(const RenderStyle& style)
    146146{
    147147    // Suppress foreignObject renderers in SVG hidden containers.
     
    158158    }
    159159
    160     return SVGGraphicsElement::rendererIsNeeded(context);
     160    return SVGGraphicsElement::rendererIsNeeded(style);
    161161}
    162162
  • trunk/Source/WebCore/svg/SVGForeignObjectElement.h

    r152167 r154358  
    4343    virtual void svgAttributeChanged(const QualifiedName&);
    4444
    45     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     45    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    4646    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
    4747    virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
  • trunk/Source/WebCore/svg/SVGGElement.cpp

    r152343 r154358  
    102102}
    103103
    104 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&)
     104bool SVGGElement::rendererIsNeeded(const RenderStyle&)
    105105{
    106106    // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, even if
  • trunk/Source/WebCore/svg/SVGGElement.h

    r152167 r154358  
    4747    virtual void svgAttributeChanged(const QualifiedName&);
    4848
    49     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     49    virtual bool rendererIsNeeded(const RenderStyle&);
    5050
    5151    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGElement)
  • trunk/Source/WebCore/svg/SVGGlyphElement.h

    r149960 r154358  
    5353    virtual void removedFrom(ContainerNode*) OVERRIDE;
    5454
    55     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     55    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    5656
    5757    void invalidateGlyphCache();
  • trunk/Source/WebCore/svg/SVGGlyphRefElement.h

    r149960 r154358  
    5050    SVGGlyphRefElement(const QualifiedName&, Document*);
    5151
    52     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     52    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    5353
    5454    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGlyphRefElement)
  • trunk/Source/WebCore/svg/SVGHKernElement.h

    r149960 r154358  
    4040    virtual void removedFrom(ContainerNode*) OVERRIDE;
    4141
    42     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     42    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    4343};
    4444
  • trunk/Source/WebCore/svg/SVGMarkerElement.h

    r152826 r154358  
    132132
    133133    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    134     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return true; }
     134    virtual bool rendererIsNeeded(const RenderStyle&) { return true; }
    135135
    136136    virtual bool selfHasRelativeLengths() const;
  • trunk/Source/WebCore/svg/SVGMissingGlyphElement.h

    r149960 r154358  
    3333    SVGMissingGlyphElement(const QualifiedName&, Document*);
    3434
    35     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     35    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    3636};
    3737
  • trunk/Source/WebCore/svg/SVGSVGElement.cpp

    r154286 r154358  
    478478}
    479479
    480 bool SVGSVGElement::rendererIsNeeded(const NodeRenderingContext& context)
     480bool SVGSVGElement::rendererIsNeeded(const RenderStyle& style)
    481481{
    482482    // FIXME: We should respect display: none on the documentElement svg element
     
    486486    if (document()->documentElement() == this)
    487487        return true;
    488     return StyledElement::rendererIsNeeded(context);
     488    return StyledElement::rendererIsNeeded(style);
    489489}
    490490
  • trunk/Source/WebCore/svg/SVGSVGElement.h

    r152780 r154358  
    145145    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
    146146
    147     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     147    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    148148    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    149149
  • trunk/Source/WebCore/svg/SVGStopElement.cpp

    r151800 r154358  
    106106}
    107107
    108 bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&)
     108bool SVGStopElement::rendererIsNeeded(const RenderStyle&)
    109109{
    110110    return true;
  • trunk/Source/WebCore/svg/SVGStopElement.h

    r149960 r154358  
    4444
    4545    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    46     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
     46    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
    4747
    4848    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStopElement)
  • trunk/Source/WebCore/svg/SVGStyledElement.cpp

    r154165 r154358  
    116116}
    117117
    118 bool SVGStyledElement::rendererIsNeeded(const NodeRenderingContext& context)
     118bool SVGStyledElement::rendererIsNeeded(const RenderStyle& style)
    119119{
    120120    // http://www.w3.org/TR/SVG/extend.html#PrivateData
     
    124124    // elements in the DOM but will otherwise ignore unknown elements.
    125125    if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement())
    126         return StyledElement::rendererIsNeeded(context);
     126        return StyledElement::rendererIsNeeded(style);
    127127
    128128    return false;
  • trunk/Source/WebCore/svg/SVGStyledElement.h

    r152553 r154358  
    6262protected:
    6363    SVGStyledElement(const QualifiedName&, Document*, ConstructionType = CreateSVGElement);
    64     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     64    virtual bool rendererIsNeeded(const RenderStyle&);
    6565
    6666    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
  • trunk/Source/WebCore/svg/SVGTRefElement.cpp

    r154106 r154358  
    232232}
    233233
    234 bool SVGTRefElement::rendererIsNeeded(const NodeRenderingContext& context)
     234bool SVGTRefElement::rendererIsNeeded(const RenderStyle& style)
    235235{
    236236    if (parentNode()
     
    242242            || parentNode()->hasTagName(SVGNames::textPathTag)
    243243            || parentNode()->hasTagName(SVGNames::tspanTag)))
    244         return StyledElement::rendererIsNeeded(context);
     244        return StyledElement::rendererIsNeeded(style);
    245245
    246246    return false;
  • trunk/Source/WebCore/svg/SVGTRefElement.h

    r149960 r154358  
    4747    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4848    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
    49     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     49    virtual bool rendererIsNeeded(const RenderStyle&);
    5050
    5151    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
  • trunk/Source/WebCore/svg/SVGTSpanElement.cpp

    r108758 r154358  
    6161}
    6262
    63 bool SVGTSpanElement::rendererIsNeeded(const NodeRenderingContext& context)
     63bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style)
    6464{
    6565    if (parentNode()
     
    7171            || parentNode()->hasTagName(SVGNames::textPathTag)
    7272            || parentNode()->hasTagName(SVGNames::tspanTag)))
    73         return StyledElement::rendererIsNeeded(context);
     73        return StyledElement::rendererIsNeeded(style);
    7474
    7575    return false;
  • trunk/Source/WebCore/svg/SVGTSpanElement.h

    r149960 r154358  
    3636    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    3737    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
    38     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     38    virtual bool rendererIsNeeded(const RenderStyle&);
    3939};
    4040
  • trunk/Source/WebCore/svg/SVGTextPathElement.cpp

    r152553 r154358  
    146146}
    147147
    148 bool SVGTextPathElement::rendererIsNeeded(const NodeRenderingContext& context)
     148bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style)
    149149{
    150150    if (parentNode()
    151151        && (parentNode()->hasTagName(SVGNames::aTag)
    152152            || parentNode()->hasTagName(SVGNames::textTag)))
    153         return StyledElement::rendererIsNeeded(context);
     153        return StyledElement::rendererIsNeeded(style);
    154154
    155155    return false;
  • trunk/Source/WebCore/svg/SVGTextPathElement.h

    r154043 r154358  
    130130    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    131131    virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
    132     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     132    virtual bool rendererIsNeeded(const RenderStyle&);
    133133
    134134    virtual bool selfHasRelativeLengths() const;
  • trunk/Source/WebCore/svg/SVGTitleElement.h

    r152156 r154358  
    3838    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
    3939
    40     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     40    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    4141};
    4242
  • trunk/Source/WebCore/svg/SVGVKernElement.h

    r152553 r154358  
    3939    virtual void removedFrom(ContainerNode*) OVERRIDE;
    4040
    41     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     41    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    4242};
    4343
  • trunk/Source/WebCore/svg/SVGViewElement.h

    r149960 r154358  
    5555    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
    5656
    57     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
     57    virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
    5858
    5959    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGViewElement)
Note: See TracChangeset for help on using the changeset viewer.