<https://webkit.org/b/119982> Make Element::attach non-virtual
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Aug 2013 20:01:20 +0000 (20:01 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 18 Aug 2013 20:01:20 +0000 (20:01 +0000)
commit06e93c82376673c599e67433ffa541bdd403fbf1
treee0bac5c610adb449d12e8c157946d5d0656d75e6
parent5bd200ffe93417a6b794b3d4dffce198af200b09
<https://webkit.org/b/119982> Make Element::attach non-virtual

Reviewed by Andreas Kling.

This will give us more future refactoring options.

* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):

    Make non-virtual. Call element type specific custom functions as needed.

(WebCore::Element::styleForRenderer):
(WebCore::Element::willRecalcStyle):
(WebCore::Element::didRecalcStyle):
(WebCore::Element::willAttachRenderers):
(WebCore::Element::didAttachRenderers):
(WebCore::Element::willDetachRenderers):
(WebCore::Element::didDetachRenderers):

    Add virtual custom callbacks.

(WebCore::Element::customStyleForRenderer):
* dom/Element.h:
* dom/Node.h:
(WebCore::Node::pseudoId):
(WebCore::Node::hasCustomStyleResolveCallbacks):
(WebCore::Node::setHasCustomStyleResolveCallbacks):

    Use the existing bit as it largely overlaps. Rename for clarity.

(WebCore::Node::customPseudoId):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
(WebCore::PseudoElement::didAttachRenderers):
* dom/PseudoElement.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::willAttachRenderers):
* html/HTMLCanvasElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::didAttachRenderers):
* html/HTMLFormControlElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::HTMLFrameElement):
(WebCore::HTMLFrameElement::didAttachRenderers):
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
(WebCore::HTMLFrameElementBase::didAttachRenderers):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
(WebCore::HTMLFrameSetElement::willAttachRenderers):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::HTMLIFrameElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::didAttachRenderers):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::willAttachRenderers):
(WebCore::HTMLInputElement::didAttachRenderers):
(WebCore::HTMLInputElement::didDetachRenderers):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::HTMLLIElement):
(WebCore::HTMLLIElement::didAttachRenderers):
* html/HTMLLIElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::willAttachRenderers):
(WebCore::HTMLMediaElement::didAttachRenderers):
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
(WebCore::HTMLOptGroupElement::didAttachRenderers):
(WebCore::HTMLOptGroupElement::willDetachRenderers):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::didAttachRenderers):
(WebCore::HTMLOptionElement::willDetachRenderers):
* html/HTMLOptionElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
(WebCore::HTMLPlugInElement::willDetachRenderers):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::didAttachRenderers):
(WebCore::HTMLPlugInImageElement::willDetachRenderers):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::HTMLProgressElement):
(WebCore::HTMLProgressElement::didAttachRenderers):
* html/HTMLProgressElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
(WebCore::HTMLTextAreaElement::didAttachRenderers):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::HTMLVideoElement):
(WebCore::HTMLVideoElement::didAttachRenderers):
* html/HTMLVideoElement.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::willAttachRenderers):
(WebCore::InsertionPoint::willDetachRenderers):
* html/shadow/InsertionPoint.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::SliderThumbElement):
(WebCore::SliderThumbElement::willDetachRenderers):
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::SpinButtonElement):
(WebCore::SpinButtonElement::willDetachRenderers):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::TextControlInnerElement):
(WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
(WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
(WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
(WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
(WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
(WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
* html/shadow/TextControlInnerElements.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGImageElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
52 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.h
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/dom/PseudoElement.h
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLFrameElement.cpp
Source/WebCore/html/HTMLFrameElement.h
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLFrameElementBase.h
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLFrameSetElement.h
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLImageElement.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLLIElement.cpp
Source/WebCore/html/HTMLLIElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptGroupElement.h
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLPlugInElement.h
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.h
Source/WebCore/html/HTMLProgressElement.cpp
Source/WebCore/html/HTMLProgressElement.h
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/shadow/InsertionPoint.cpp
Source/WebCore/html/shadow/InsertionPoint.h
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/html/shadow/SpinButtonElement.cpp
Source/WebCore/html/shadow/SpinButtonElement.h
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h
Source/WebCore/style/StyleResolveTree.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGImageElement.h
Source/WebCore/svg/SVGUseElement.cpp