Changeset 154358 in webkit
- Timestamp:
- Aug 20, 2013, 2:22:53 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r154353 r154358 1 2013-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 1 107 2013-08-20 Tim Horton <timothy_horton@apple.com> 2 108 -
trunk/Source/WebCore/dom/Element.cpp
r154320 r154358 1243 1243 } 1244 1244 1245 bool Element::rendererIsNeeded(const NodeRenderingContext& context)1246 { 1247 return context.style()->display() != NONE;1245 bool Element::rendererIsNeeded(const RenderStyle& style) 1246 { 1247 return style.display() != NONE; 1248 1248 } 1249 1249 -
trunk/Source/WebCore/dom/Element.h
r154264 r154358 302 302 303 303 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 304 virtual bool rendererIsNeeded(const NodeRenderingContext&);304 virtual bool rendererIsNeeded(const RenderStyle&); 305 305 void didAffectSelector(AffectedSelectorMask); 306 306 -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r154327 r154358 213 213 214 214 // 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)) 216 216 element->setIsInsideRegion(true); 217 217 } … … 265 265 moveToFlowThreadIfNeeded(); 266 266 267 if (!element->rendererIsNeeded(* this))267 if (!element->rendererIsNeeded(*m_style)) 268 268 return; 269 269 -
trunk/Source/WebCore/dom/PseudoElement.cpp
r154254 r154358 98 98 } 99 99 100 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context)100 bool PseudoElement::rendererIsNeeded(const RenderStyle& style) 101 101 { 102 return pseudoElementRendererIsNeeded( context.style());102 return pseudoElementRendererIsNeeded(&style); 103 103 } 104 104 -
trunk/Source/WebCore/dom/PseudoElement.h
r154254 r154358 48 48 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; 49 49 virtual void didAttachRenderers() OVERRIDE; 50 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;50 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 51 51 52 52 // 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 68 68 } 69 69 70 bool HTMLAppletElement::rendererIsNeeded(const NodeRenderingContext& context)70 bool HTMLAppletElement::rendererIsNeeded(const RenderStyle& style) 71 71 { 72 72 if (!fastHasAttribute(codeAttr)) 73 73 return false; 74 return HTMLPlugInImageElement::rendererIsNeeded( context);74 return HTMLPlugInImageElement::rendererIsNeeded(style); 75 75 } 76 76 -
trunk/Source/WebCore/html/HTMLAppletElement.h
r149960 r154358 37 37 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 38 38 39 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;39 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 40 40 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 41 41 -
trunk/Source/WebCore/html/HTMLElement.cpp
r154192 r154358 750 750 } 751 751 752 bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context)752 bool HTMLElement::rendererIsNeeded(const RenderStyle& style) 753 753 { 754 754 if (hasLocalName(noscriptTag)) { … … 761 761 return false; 762 762 } 763 return StyledElement::rendererIsNeeded( context);763 return StyledElement::rendererIsNeeded(style); 764 764 } 765 765 -
trunk/Source/WebCore/html/HTMLElement.h
r153772 r154358 81 81 bool ieForbidsInsertHTML() const; 82 82 83 virtual bool rendererIsNeeded(const NodeRenderingContext&);83 virtual bool rendererIsNeeded(const RenderStyle&); 84 84 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 85 85 -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r154219 r154358 171 171 } 172 172 173 bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)173 bool HTMLEmbedElement::rendererIsNeeded(const RenderStyle& style) 174 174 { 175 175 if (isImageType()) 176 return HTMLPlugInImageElement::rendererIsNeeded( context);176 return HTMLPlugInImageElement::rendererIsNeeded(style); 177 177 178 178 Frame* frame = document()->frame(); … … 197 197 #endif 198 198 199 return HTMLPlugInImageElement::rendererIsNeeded( context);199 return HTMLPlugInImageElement::rendererIsNeeded(style); 200 200 } 201 201 -
trunk/Source/WebCore/html/HTMLEmbedElement.h
r153772 r154358 39 39 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE; 40 40 41 virtual bool rendererIsNeeded(const NodeRenderingContext&);41 virtual bool rendererIsNeeded(const RenderStyle&); 42 42 43 43 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; -
trunk/Source/WebCore/html/HTMLFormElement.cpp
r154142 r154358 96 96 } 97 97 98 bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)98 bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style) 99 99 { 100 100 if (!m_wasDemoted) 101 return HTMLElement::rendererIsNeeded( context);101 return HTMLElement::rendererIsNeeded(style); 102 102 103 103 ContainerNode* node = parentNode(); … … 113 113 return true; 114 114 115 EDisplay display = context.style()->display();115 EDisplay display = style.display(); 116 116 bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP 117 117 || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW -
trunk/Source/WebCore/html/HTMLFormElement.h
r152353 r154358 112 112 HTMLFormElement(const QualifiedName&, Document*); 113 113 114 virtual bool rendererIsNeeded(const NodeRenderingContext&);114 virtual bool rendererIsNeeded(const RenderStyle&); 115 115 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 116 116 virtual void removedFrom(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLFrameElement.cpp
r154326 r154358 49 49 } 50 50 51 bool HTMLFrameElement::rendererIsNeeded(const NodeRenderingContext&)51 bool HTMLFrameElement::rendererIsNeeded(const RenderStyle&) 52 52 { 53 53 // For compatibility, frames render even when display: none is set. -
trunk/Source/WebCore/html/HTMLFrameElement.h
r154254 r154358 42 42 virtual void didAttachRenderers() OVERRIDE; 43 43 44 virtual bool rendererIsNeeded(const NodeRenderingContext&);44 virtual bool rendererIsNeeded(const RenderStyle&); 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 46 -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r154326 r154358 150 150 } 151 151 152 bool HTMLFrameSetElement::rendererIsNeeded(const NodeRenderingContext& context)152 bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style) 153 153 { 154 154 // For compatibility, frames render even when display: none is set. 155 155 // However, we delay creating a renderer until stylesheets have loaded. 156 return context.style()->isStyleAvailable();156 return style.isStyleAvailable(); 157 157 } 158 158 -
trunk/Source/WebCore/html/HTMLFrameSetElement.h
r154326 r154358 75 75 76 76 virtual void willAttachRenderers() OVERRIDE; 77 virtual bool rendererIsNeeded(const NodeRenderingContext&);77 virtual bool rendererIsNeeded(const RenderStyle&); 78 78 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 79 79 -
trunk/Source/WebCore/html/HTMLIFrameElement.cpp
r154254 r154358 92 92 } 93 93 94 bool HTMLIFrameElement::rendererIsNeeded(const NodeRenderingContext& context)94 bool HTMLIFrameElement::rendererIsNeeded(const RenderStyle& style) 95 95 { 96 return isURLAllowed() && context.style()->display() != NONE;96 return isURLAllowed() && style.display() != NONE; 97 97 } 98 98 -
trunk/Source/WebCore/html/HTMLIFrameElement.h
r153783 r154358 42 42 virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE; 43 43 44 virtual bool rendererIsNeeded(const NodeRenderingContext&);44 virtual bool rendererIsNeeded(const RenderStyle&); 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 46 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r154286 r154358 787 787 } 788 788 789 bool HTMLInputElement::rendererIsNeeded(const NodeRenderingContext& context)790 { 791 return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded( context);789 bool HTMLInputElement::rendererIsNeeded(const RenderStyle& style) 790 { 791 return m_inputType->rendererIsNeeded() && HTMLTextFormControlElement::rendererIsNeeded(style); 792 792 } 793 793 -
trunk/Source/WebCore/html/HTMLInputElement.h
r154254 r154358 188 188 bool canHaveSelection() const; 189 189 190 virtual bool rendererIsNeeded(const NodeRenderingContext&);190 virtual bool rendererIsNeeded(const RenderStyle&); 191 191 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 192 192 virtual void willAttachRenderers() OVERRIDE; -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r154345 r154358 546 546 } 547 547 548 bool HTMLMediaElement::rendererIsNeeded(const NodeRenderingContext& context)548 bool HTMLMediaElement::rendererIsNeeded(const RenderStyle& style) 549 549 { 550 550 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) … … 556 556 return true; 557 557 #else 558 return controls() ? HTMLElement::rendererIsNeeded(context) : false;558 return controls() && HTMLElement::rendererIsNeeded(style); 559 559 #endif 560 560 } -
trunk/Source/WebCore/html/HTMLMediaElement.h
r154254 r154358 433 433 virtual bool supportsFocus() const OVERRIDE; 434 434 virtual bool isMouseFocusable() const OVERRIDE; 435 virtual bool rendererIsNeeded(const NodeRenderingContext&);435 virtual bool rendererIsNeeded(const RenderStyle&); 436 436 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 437 437 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r154257 r154358 325 325 } 326 326 327 bool HTMLObjectElement::rendererIsNeeded(const NodeRenderingContext& context)327 bool HTMLObjectElement::rendererIsNeeded(const RenderStyle& style) 328 328 { 329 329 // FIXME: This check should not be needed, detached documents never render! … … 332 332 return false; 333 333 334 return HTMLPlugInImageElement::rendererIsNeeded( context);334 return HTMLPlugInImageElement::rendererIsNeeded(style); 335 335 } 336 336 -
trunk/Source/WebCore/html/HTMLObjectElement.h
r153772 r154358 74 74 virtual void removedFrom(ContainerNode*) OVERRIDE; 75 75 76 virtual bool rendererIsNeeded(const NodeRenderingContext&);76 virtual bool rendererIsNeeded(const RenderStyle&); 77 77 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; 78 78 -
trunk/Source/WebCore/html/HTMLOptGroupElement.h
r154254 r154358 46 46 virtual bool isFocusable() const OVERRIDE; 47 47 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 48 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }48 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 49 49 virtual void didAttachRenderers() OVERRIDE; 50 50 virtual void willDetachRenderers() OVERRIDE; -
trunk/Source/WebCore/html/HTMLOptionElement.h
r154254 r154358 71 71 72 72 virtual bool isFocusable() const OVERRIDE; 73 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }73 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 74 74 virtual void didAttachRenderers() OVERRIDE; 75 75 virtual void willDetachRenderers() OVERRIDE; -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r154272 r154358 64 64 } 65 65 66 bool HTMLVideoElement::rendererIsNeeded(const NodeRenderingContext& context)67 { 68 return HTMLElement::rendererIsNeeded( context);66 bool HTMLVideoElement::rendererIsNeeded(const RenderStyle& style) 67 { 68 return HTMLElement::rendererIsNeeded(style); 69 69 } 70 70 -
trunk/Source/WebCore/html/HTMLVideoElement.h
r154254 r154358 75 75 HTMLVideoElement(const QualifiedName&, Document*, bool); 76 76 77 virtual bool rendererIsNeeded(const NodeRenderingContext&);77 virtual bool rendererIsNeeded(const RenderStyle&); 78 78 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO) 79 79 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); -
trunk/Source/WebCore/html/shadow/DetailsMarkerControl.cpp
r145399 r154358 51 51 } 52 52 53 bool DetailsMarkerControl::rendererIsNeeded(const NodeRenderingContext& context)53 bool DetailsMarkerControl::rendererIsNeeded(const RenderStyle& style) 54 54 { 55 return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded( context);55 return summaryElement()->isMainSummary() && HTMLDivElement::rendererIsNeeded(style); 56 56 } 57 57 -
trunk/Source/WebCore/html/shadow/DetailsMarkerControl.h
r149960 r154358 46 46 private: 47 47 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 48 virtual bool rendererIsNeeded(const NodeRenderingContext&);48 virtual bool rendererIsNeeded(const RenderStyle&); 49 49 virtual const AtomicString& shadowPseudoId() const; 50 50 -
trunk/Source/WebCore/html/shadow/InsertionPoint.cpp
r154327 r154358 108 108 } 109 109 110 bool InsertionPoint::rendererIsNeeded(const NodeRenderingContext& context)111 { 112 return !isShadowBoundary() && HTMLElement::rendererIsNeeded( context);110 bool InsertionPoint::rendererIsNeeded(const RenderStyle& style) 111 { 112 return !isShadowBoundary() && HTMLElement::rendererIsNeeded(style); 113 113 } 114 114 -
trunk/Source/WebCore/html/shadow/InsertionPoint.h
r154327 r154358 75 75 protected: 76 76 InsertionPoint(const QualifiedName&, Document*); 77 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;77 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 78 78 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE; 79 79 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/shadow/MeterShadowElement.cpp
r142248 r154358 55 55 } 56 56 57 bool MeterShadowElement::rendererIsNeeded(const NodeRenderingContext& context)57 bool MeterShadowElement::rendererIsNeeded(const RenderStyle& style) 58 58 { 59 59 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); 61 61 } 62 62 … … 68 68 } 69 69 70 bool MeterInnerElement::rendererIsNeeded(const NodeRenderingContext& context)70 bool MeterInnerElement::rendererIsNeeded(const RenderStyle& style) 71 71 { 72 72 if (meterElement()->hasAuthorShadowRoot()) 73 return HTMLDivElement::rendererIsNeeded( context);73 return HTMLDivElement::rendererIsNeeded(style); 74 74 75 75 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); 77 77 } 78 78 -
trunk/Source/WebCore/html/shadow/MeterShadowElement.h
r154121 r154358 47 47 48 48 private: 49 virtual bool rendererIsNeeded(const NodeRenderingContext&);49 virtual bool rendererIsNeeded(const RenderStyle&); 50 50 }; 51 51 … … 57 57 MeterInnerElement(Document*); 58 58 59 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;59 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 60 60 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 61 61 }; -
trunk/Source/WebCore/html/shadow/ProgressShadowElement.cpp
r154099 r154358 51 51 } 52 52 53 bool ProgressShadowElement::rendererIsNeeded(const NodeRenderingContext& context)53 bool ProgressShadowElement::rendererIsNeeded(const RenderStyle& style) 54 54 { 55 55 RenderObject* progressRenderer = progressElement()->renderer(); 56 return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded( context);56 return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style); 57 57 } 58 58 … … 67 67 } 68 68 69 bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context)69 bool ProgressInnerElement::rendererIsNeeded(const RenderStyle& style) 70 70 { 71 71 if (progressElement()->hasAuthorShadowRoot()) 72 return HTMLDivElement::rendererIsNeeded( context);72 return HTMLDivElement::rendererIsNeeded(style); 73 73 74 74 RenderObject* progressRenderer = progressElement()->renderer(); 75 return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded( context);75 return progressRenderer && !progressRenderer->style()->hasAppearance() && HTMLDivElement::rendererIsNeeded(style); 76 76 } 77 77 -
trunk/Source/WebCore/html/shadow/ProgressShadowElement.h
r154121 r154358 47 47 48 48 protected: 49 virtual bool rendererIsNeeded(const NodeRenderingContext&);49 virtual bool rendererIsNeeded(const RenderStyle&); 50 50 }; 51 51 … … 58 58 59 59 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 60 virtual bool rendererIsNeeded(const NodeRenderingContext&);60 virtual bool rendererIsNeeded(const RenderStyle&); 61 61 }; 62 62 -
trunk/Source/WebCore/svg/SVGDescElement.h
r152156 r154358 36 36 SVGDescElement(const QualifiedName&, Document*); 37 37 38 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }38 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 39 39 }; 40 40 -
trunk/Source/WebCore/svg/SVGElement.h
r153926 r154358 152 152 virtual bool willRecalcStyle(Style::Change); 153 153 154 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }154 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 155 155 156 156 virtual bool isSupported(StringImpl* feature, StringImpl* version) const; -
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
r151800 r154358 147 147 } 148 148 149 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const NodeRenderingContext& context)149 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const RenderStyle& style) 150 150 { 151 151 if (parentNode() && (parentNode()->hasTagName(SVGNames::filterTag))) 152 return SVGStyledElement::rendererIsNeeded( context);152 return SVGStyledElement::rendererIsNeeded(style); 153 153 154 154 return false; -
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
r135069 r154358 70 70 71 71 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 72 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;72 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 73 73 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE { return false; } 74 74 -
trunk/Source/WebCore/svg/SVGFontElement.h
r152553 r154358 74 74 SVGFontElement(const QualifiedName&, Document*); 75 75 76 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }76 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 77 77 78 78 void ensureGlyphCache(); -
trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp
r152553 r154358 143 143 } 144 144 145 bool SVGForeignObjectElement::rendererIsNeeded(const NodeRenderingContext& context)145 bool SVGForeignObjectElement::rendererIsNeeded(const RenderStyle& style) 146 146 { 147 147 // Suppress foreignObject renderers in SVG hidden containers. … … 158 158 } 159 159 160 return SVGGraphicsElement::rendererIsNeeded( context);160 return SVGGraphicsElement::rendererIsNeeded(style); 161 161 } 162 162 -
trunk/Source/WebCore/svg/SVGForeignObjectElement.h
r152167 r154358 43 43 virtual void svgAttributeChanged(const QualifiedName&); 44 44 45 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;45 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 46 46 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const; 47 47 virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style); -
trunk/Source/WebCore/svg/SVGGElement.cpp
r152343 r154358 102 102 } 103 103 104 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&)104 bool SVGGElement::rendererIsNeeded(const RenderStyle&) 105 105 { 106 106 // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, even if -
trunk/Source/WebCore/svg/SVGGElement.h
r152167 r154358 47 47 virtual void svgAttributeChanged(const QualifiedName&); 48 48 49 virtual bool rendererIsNeeded(const NodeRenderingContext&);49 virtual bool rendererIsNeeded(const RenderStyle&); 50 50 51 51 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGElement) -
trunk/Source/WebCore/svg/SVGGlyphElement.h
r149960 r154358 53 53 virtual void removedFrom(ContainerNode*) OVERRIDE; 54 54 55 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }55 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 56 56 57 57 void invalidateGlyphCache(); -
trunk/Source/WebCore/svg/SVGGlyphRefElement.h
r149960 r154358 50 50 SVGGlyphRefElement(const QualifiedName&, Document*); 51 51 52 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }52 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 53 53 54 54 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGlyphRefElement) -
trunk/Source/WebCore/svg/SVGHKernElement.h
r149960 r154358 40 40 virtual void removedFrom(ContainerNode*) OVERRIDE; 41 41 42 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }42 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 43 43 }; 44 44 -
trunk/Source/WebCore/svg/SVGMarkerElement.h
r152826 r154358 132 132 133 133 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 134 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return true; }134 virtual bool rendererIsNeeded(const RenderStyle&) { return true; } 135 135 136 136 virtual bool selfHasRelativeLengths() const; -
trunk/Source/WebCore/svg/SVGMissingGlyphElement.h
r149960 r154358 33 33 SVGMissingGlyphElement(const QualifiedName&, Document*); 34 34 35 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }35 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 36 36 }; 37 37 -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r154286 r154358 478 478 } 479 479 480 bool SVGSVGElement::rendererIsNeeded(const NodeRenderingContext& context)480 bool SVGSVGElement::rendererIsNeeded(const RenderStyle& style) 481 481 { 482 482 // FIXME: We should respect display: none on the documentElement svg element … … 486 486 if (document()->documentElement() == this) 487 487 return true; 488 return StyledElement::rendererIsNeeded( context);488 return StyledElement::rendererIsNeeded(style); 489 489 } 490 490 -
trunk/Source/WebCore/svg/SVGSVGElement.h
r152780 r154358 145 145 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 146 146 147 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;147 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 148 148 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 149 149 -
trunk/Source/WebCore/svg/SVGStopElement.cpp
r151800 r154358 106 106 } 107 107 108 bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&)108 bool SVGStopElement::rendererIsNeeded(const RenderStyle&) 109 109 { 110 110 return true; -
trunk/Source/WebCore/svg/SVGStopElement.h
r149960 r154358 44 44 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;46 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 47 47 48 48 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStopElement) -
trunk/Source/WebCore/svg/SVGStyledElement.cpp
r154165 r154358 116 116 } 117 117 118 bool SVGStyledElement::rendererIsNeeded(const NodeRenderingContext& context)118 bool SVGStyledElement::rendererIsNeeded(const RenderStyle& style) 119 119 { 120 120 // http://www.w3.org/TR/SVG/extend.html#PrivateData … … 124 124 // elements in the DOM but will otherwise ignore unknown elements. 125 125 if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement()) 126 return StyledElement::rendererIsNeeded( context);126 return StyledElement::rendererIsNeeded(style); 127 127 128 128 return false; -
trunk/Source/WebCore/svg/SVGStyledElement.h
r152553 r154358 62 62 protected: 63 63 SVGStyledElement(const QualifiedName&, Document*, ConstructionType = CreateSVGElement); 64 virtual bool rendererIsNeeded(const NodeRenderingContext&);64 virtual bool rendererIsNeeded(const RenderStyle&); 65 65 66 66 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; -
trunk/Source/WebCore/svg/SVGTRefElement.cpp
r154106 r154358 232 232 } 233 233 234 bool SVGTRefElement::rendererIsNeeded(const NodeRenderingContext& context)234 bool SVGTRefElement::rendererIsNeeded(const RenderStyle& style) 235 235 { 236 236 if (parentNode() … … 242 242 || parentNode()->hasTagName(SVGNames::textPathTag) 243 243 || parentNode()->hasTagName(SVGNames::tspanTag))) 244 return StyledElement::rendererIsNeeded( context);244 return StyledElement::rendererIsNeeded(style); 245 245 246 246 return false; -
trunk/Source/WebCore/svg/SVGTRefElement.h
r149960 r154358 47 47 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 48 48 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const; 49 virtual bool rendererIsNeeded(const NodeRenderingContext&);49 virtual bool rendererIsNeeded(const RenderStyle&); 50 50 51 51 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGTSpanElement.cpp
r108758 r154358 61 61 } 62 62 63 bool SVGTSpanElement::rendererIsNeeded(const NodeRenderingContext& context)63 bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style) 64 64 { 65 65 if (parentNode() … … 71 71 || parentNode()->hasTagName(SVGNames::textPathTag) 72 72 || parentNode()->hasTagName(SVGNames::tspanTag))) 73 return StyledElement::rendererIsNeeded( context);73 return StyledElement::rendererIsNeeded(style); 74 74 75 75 return false; -
trunk/Source/WebCore/svg/SVGTSpanElement.h
r149960 r154358 36 36 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 37 37 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const; 38 virtual bool rendererIsNeeded(const NodeRenderingContext&);38 virtual bool rendererIsNeeded(const RenderStyle&); 39 39 }; 40 40 -
trunk/Source/WebCore/svg/SVGTextPathElement.cpp
r152553 r154358 146 146 } 147 147 148 bool SVGTextPathElement::rendererIsNeeded(const NodeRenderingContext& context)148 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) 149 149 { 150 150 if (parentNode() 151 151 && (parentNode()->hasTagName(SVGNames::aTag) 152 152 || parentNode()->hasTagName(SVGNames::textTag))) 153 return StyledElement::rendererIsNeeded( context);153 return StyledElement::rendererIsNeeded(style); 154 154 155 155 return false; -
trunk/Source/WebCore/svg/SVGTextPathElement.h
r154043 r154358 130 130 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 131 131 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const; 132 virtual bool rendererIsNeeded(const NodeRenderingContext&);132 virtual bool rendererIsNeeded(const RenderStyle&); 133 133 134 134 virtual bool selfHasRelativeLengths() const; -
trunk/Source/WebCore/svg/SVGTitleElement.h
r152156 r154358 38 38 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 39 39 40 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }40 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 41 41 }; 42 42 -
trunk/Source/WebCore/svg/SVGVKernElement.h
r152553 r154358 39 39 virtual void removedFrom(ContainerNode*) OVERRIDE; 40 40 41 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }41 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 42 42 }; 43 43 -
trunk/Source/WebCore/svg/SVGViewElement.h
r149960 r154358 55 55 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 56 56 57 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }57 virtual bool rendererIsNeeded(const RenderStyle&) { return false; } 58 58 59 59 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGViewElement)
Note:
See TracChangeset
for help on using the changeset viewer.