Add RenderElement
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 17:52:38 +0000 (17:52 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 17:52:38 +0000 (17:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121608

Reviewed by Dave Hyatt.

Add a common base class for all Element renderers. The class hierarchy will now look like this

RenderObject
    RenderText
    RenderElement
        RenderLayerModelObject
            ...
        RenderSVGModelObject
            ...
        RenderSVGGradientStop

This will allow tighter typing in both render and DOM trees.

The patch also moves renderer factory function to RenderElement::createFor().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156102 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/Element.cpp
Source/WebCore/html/HTMLAppletElement.cpp
Source/WebCore/html/HTMLBRElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLMeterElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLProgressElement.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/rendering/RenderElement.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderElement.h [new file with mode: 0644]
Source/WebCore/rendering/RenderLayerModelObject.cpp
Source/WebCore/rendering/RenderLayerModelObject.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderingAllInOne.cpp
Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp
Source/WebCore/rendering/svg/RenderSVGGradientStop.h
Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Source/WebCore/rendering/svg/RenderSVGModelObject.h
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp

index 87989a03aefe6be4f1d72ae31dfbe49b501f3bdb..1c7c589aac41d3693e07a96f0e96eeb70bfaf364 100644 (file)
@@ -2131,6 +2131,7 @@ set(WebCore_SOURCES
     rendering/RenderCounter.cpp
     rendering/RenderDeprecatedFlexibleBox.cpp
     rendering/RenderDetailsMarker.cpp
     rendering/RenderCounter.cpp
     rendering/RenderDeprecatedFlexibleBox.cpp
     rendering/RenderDetailsMarker.cpp
+    rendering/RenderElement.cpp
     rendering/RenderEmbeddedObject.cpp
     rendering/RenderFieldset.cpp
     rendering/RenderFileUploadControl.cpp
     rendering/RenderEmbeddedObject.cpp
     rendering/RenderFieldset.cpp
     rendering/RenderFileUploadControl.cpp
index f692ba2d39153f2a385a63da98fbf410bfe9debb..fb8d937fd85f306b78f3ca460d6a8222255993b4 100644 (file)
@@ -1,3 +1,25 @@
+2013-09-19  Antti Koivisto  <antti@apple.com>
+
+        Add RenderElement
+        https://bugs.webkit.org/show_bug.cgi?id=121608
+
+        Reviewed by Dave Hyatt.
+
+        Add a common base class for all Element renderers. The class hierarchy will now look like this
+        
+        RenderObject
+            RenderText
+            RenderElement
+                RenderLayerModelObject
+                    ...
+                RenderSVGModelObject
+                    ...
+                RenderSVGGradientStop
+                
+        This will allow tighter typing in both render and DOM trees.
+        
+        The patch also moves renderer factory function to RenderElement::createFor().
+
 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
 
         REGRESSION (r149928): CanvasStyle::operator= leaks everything
 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
 
         REGRESSION (r149928): CanvasStyle::operator= leaks everything
index 8fe87804f71d69ab7357da38ead8bf2ce8b20018..beac318d84474537f8748db931dc0972e9596016 100644 (file)
@@ -4426,6 +4426,8 @@ webcore_sources += \
        Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h \
        Source/WebCore/rendering/RenderDetailsMarker.cpp \
        Source/WebCore/rendering/RenderDetailsMarker.h \
        Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h \
        Source/WebCore/rendering/RenderDetailsMarker.cpp \
        Source/WebCore/rendering/RenderDetailsMarker.h \
+       Source/WebCore/rendering/RenderElement.cpp \
+       Source/WebCore/rendering/RenderElement.h \
        Source/WebCore/rendering/RenderEmbeddedObject.cpp \
        Source/WebCore/rendering/RenderEmbeddedObject.h \
        Source/WebCore/rendering/RenderFieldset.cpp \
        Source/WebCore/rendering/RenderEmbeddedObject.cpp \
        Source/WebCore/rendering/RenderEmbeddedObject.h \
        Source/WebCore/rendering/RenderFieldset.cpp \
index 9a833fe0e6c0bfa1db10e576161bd42bdde2d2c4..646c44dca314bf00ab600fcd4cde6b64e5fd8cd7 100644 (file)
@@ -1160,6 +1160,7 @@ SOURCES += \
     rendering/RenderCounter.cpp \
     rendering/RenderDeprecatedFlexibleBox.cpp \
     rendering/RenderDetailsMarker.cpp \
     rendering/RenderCounter.cpp \
     rendering/RenderDeprecatedFlexibleBox.cpp \
     rendering/RenderDetailsMarker.cpp \
+    rendering/RenderElement.cpp \
     rendering/RenderEmbeddedObject.cpp \
     rendering/RenderFieldset.cpp \
     rendering/RenderFileUploadControl.cpp \
     rendering/RenderEmbeddedObject.cpp \
     rendering/RenderFieldset.cpp \
     rendering/RenderFileUploadControl.cpp \
@@ -2429,6 +2430,7 @@ HEADERS += \
     rendering/RenderCounter.h \
     rendering/RenderDeprecatedFlexibleBox.h \
     rendering/RenderDetailsMarker.h \
     rendering/RenderCounter.h \
     rendering/RenderDeprecatedFlexibleBox.h \
     rendering/RenderDetailsMarker.h \
+    rendering/RenderElement.h \
     rendering/RenderEmbeddedObject.h \
     rendering/RenderFieldset.h \
     rendering/RenderFileUploadControl.h \
     rendering/RenderEmbeddedObject.h \
     rendering/RenderFieldset.h \
     rendering/RenderFileUploadControl.h \
index 719a5c21f1ee39d93326a55b9ee256095011a6ce..30fe8fb9c29e3a559eafe06216f2f42a707bdd78 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\rendering\RenderElement.cpp">
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+        <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="..\rendering\RenderEmbeddedObject.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     <ClCompile Include="..\rendering\RenderEmbeddedObject.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     <ClInclude Include="..\rendering\RenderCounter.h" />
     <ClInclude Include="..\rendering\RenderDeprecatedFlexibleBox.h" />
     <ClInclude Include="..\rendering\RenderDetailsMarker.h" />
     <ClInclude Include="..\rendering\RenderCounter.h" />
     <ClInclude Include="..\rendering\RenderDeprecatedFlexibleBox.h" />
     <ClInclude Include="..\rendering\RenderDetailsMarker.h" />
+    <ClInclude Include="..\rendering\RenderElement.h" />
     <ClInclude Include="..\rendering\RenderEmbeddedObject.h" />
     <ClInclude Include="..\rendering\RenderFieldset.h" />
     <ClInclude Include="..\rendering\RenderFileUploadControl.h" />
     <ClInclude Include="..\rendering\RenderEmbeddedObject.h" />
     <ClInclude Include="..\rendering\RenderFieldset.h" />
     <ClInclude Include="..\rendering\RenderFileUploadControl.h" />
index 50bdf6d4ab96098855bfde770b0776316d2248ea..4bb8fa1812a660b44a7a7b3e649aded7fbf96cd2 100644 (file)
                436708C512D9CA4B00044234 /* RenderSVGGradientStop.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088612D9CA4A00044234 /* RenderSVGGradientStop.h */; };
                436708C712D9CA4B00044234 /* RenderSVGHiddenContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088812D9CA4A00044234 /* RenderSVGHiddenContainer.h */; };
                436708C912D9CA4B00044234 /* RenderSVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088A12D9CA4A00044234 /* RenderSVGImage.h */; };
                436708C512D9CA4B00044234 /* RenderSVGGradientStop.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088612D9CA4A00044234 /* RenderSVGGradientStop.h */; };
                436708C712D9CA4B00044234 /* RenderSVGHiddenContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088812D9CA4A00044234 /* RenderSVGHiddenContainer.h */; };
                436708C912D9CA4B00044234 /* RenderSVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088A12D9CA4A00044234 /* RenderSVGImage.h */; };
-               436708CB12D9CA4B00044234 /* RenderSVGModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088C12D9CA4A00044234 /* RenderSVGModelObject.h */; };
+               436708CB12D9CA4B00044234 /* RenderSVGModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088C12D9CA4A00044234 /* RenderSVGModelObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
                436708CD12D9CA4B00044234 /* RenderSVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088E12D9CA4A00044234 /* RenderSVGResource.h */; };
                436708CF12D9CA4B00044234 /* RenderSVGResourceClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367089012D9CA4A00044234 /* RenderSVGResourceClipper.h */; };
                436708D112D9CA4B00044234 /* RenderSVGResourceContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367089212D9CA4A00044234 /* RenderSVGResourceContainer.h */; };
                436708CD12D9CA4B00044234 /* RenderSVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088E12D9CA4A00044234 /* RenderSVGResource.h */; };
                436708CF12D9CA4B00044234 /* RenderSVGResourceClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367089012D9CA4A00044234 /* RenderSVGResourceClipper.h */; };
                436708D112D9CA4B00044234 /* RenderSVGResourceContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367089212D9CA4A00044234 /* RenderSVGResourceContainer.h */; };
                E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */ = {isa = PBXBuildFile; fileRef = E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E43105B816750F0C00DB2FB8 /* NodeTraversal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */; };
                E43105BB16750F1600DB2FB8 /* NodeTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E43105BA16750F1600DB2FB8 /* NodeTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E4295FA412B0614E00D1ACE0 /* ResourceLoadPriority.h in Headers */ = {isa = PBXBuildFile; fileRef = E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E43105B816750F0C00DB2FB8 /* NodeTraversal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */; };
                E43105BB16750F1600DB2FB8 /* NodeTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = E43105BA16750F1600DB2FB8 /* NodeTraversal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E43A023B17EB370A004CDD25 /* RenderElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E43A023A17EB370A004CDD25 /* RenderElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E43A023D17EB3713004CDD25 /* RenderElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E43A023C17EB3713004CDD25 /* RenderElement.cpp */; };
                E44613A10CD6331000FADA75 /* HTMLAudioElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */; };
                E44613A20CD6331000FADA75 /* HTMLAudioElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E44613900CD6331000FADA75 /* HTMLAudioElement.h */; };
                E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44613920CD6331000FADA75 /* HTMLMediaElement.cpp */; };
                E44613A10CD6331000FADA75 /* HTMLAudioElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */; };
                E44613A20CD6331000FADA75 /* HTMLAudioElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E44613900CD6331000FADA75 /* HTMLAudioElement.h */; };
                E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44613920CD6331000FADA75 /* HTMLMediaElement.cpp */; };
                E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadPriority.h; sourceTree = "<group>"; };
                E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeTraversal.cpp; sourceTree = "<group>"; };
                E43105BA16750F1600DB2FB8 /* NodeTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeTraversal.h; sourceTree = "<group>"; };
                E4295FA312B0614E00D1ACE0 /* ResourceLoadPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadPriority.h; sourceTree = "<group>"; };
                E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeTraversal.cpp; sourceTree = "<group>"; };
                E43105BA16750F1600DB2FB8 /* NodeTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeTraversal.h; sourceTree = "<group>"; };
+               E43A023A17EB370A004CDD25 /* RenderElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderElement.h; sourceTree = "<group>"; };
+               E43A023C17EB3713004CDD25 /* RenderElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderElement.cpp; sourceTree = "<group>"; };
                E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAudioElement.cpp; sourceTree = "<group>"; };
                E44613900CD6331000FADA75 /* HTMLAudioElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAudioElement.h; sourceTree = "<group>"; };
                E44613910CD6331000FADA75 /* HTMLAudioElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAudioElement.idl; sourceTree = "<group>"; };
                E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAudioElement.cpp; sourceTree = "<group>"; };
                E44613900CD6331000FADA75 /* HTMLAudioElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAudioElement.h; sourceTree = "<group>"; };
                E44613910CD6331000FADA75 /* HTMLAudioElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAudioElement.idl; sourceTree = "<group>"; };
                                BCEA482F097D93020094C9E4 /* RenderDeprecatedFlexibleBox.h */,
                                D302754512A5FE84004BD828 /* RenderDetailsMarker.cpp */,
                                D302754612A5FE84004BD828 /* RenderDetailsMarker.h */,
                                BCEA482F097D93020094C9E4 /* RenderDeprecatedFlexibleBox.h */,
                                D302754512A5FE84004BD828 /* RenderDetailsMarker.cpp */,
                                D302754612A5FE84004BD828 /* RenderDetailsMarker.h */,
+                               E43A023A17EB370A004CDD25 /* RenderElement.h */,
+                               E43A023C17EB3713004CDD25 /* RenderElement.cpp */,
                                0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */,
                                0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */,
                                A8EA73AF0A1900E300A8EF5F /* RenderFieldset.cpp */,
                                0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */,
                                0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */,
                                A8EA73AF0A1900E300A8EF5F /* RenderFieldset.cpp */,
                                088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
                                088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
                                B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */,
                                088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
                                088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
                                B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */,
+                               E43A023B17EB370A004CDD25 /* RenderElement.h in Headers */,
                                08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */,
                                B2227A9E0D00BF220071B782 /* SVGRectElement.h in Headers */,
                                197B180C1506353200E4ADA8 /* SVGRenderingContext.h in Headers */,
                                08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */,
                                B2227A9E0D00BF220071B782 /* SVGRectElement.h in Headers */,
                                197B180C1506353200E4ADA8 /* SVGRenderingContext.h in Headers */,
                                BC53DA62114314BD000D817E /* DOMObjectHashTableMap.cpp in Sources */,
                                85C7F5D10AAFB8D9004014DD /* DOMOverflowEvent.mm in Sources */,
                                E1284BD51044A01E00EAEB52 /* DOMPageTransitionEvent.mm in Sources */,
                                BC53DA62114314BD000D817E /* DOMObjectHashTableMap.cpp in Sources */,
                                85C7F5D10AAFB8D9004014DD /* DOMOverflowEvent.mm in Sources */,
                                E1284BD51044A01E00EAEB52 /* DOMPageTransitionEvent.mm in Sources */,
+                               E43A023D17EB3713004CDD25 /* RenderElement.cpp in Sources */,
                                1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */,
                                7A54881814E432A1006AE05A /* DOMPatchSupport.cpp in Sources */,
                                A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
                                1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */,
                                7A54881814E432A1006AE05A /* DOMPatchSupport.cpp in Sources */,
                                A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
index 3bda2d3e30ede29564fffadd2c7cb6b51a20622e..8d5f75212aac544cc1f63970c0d4f6e13b9b792e 100644 (file)
@@ -1264,7 +1264,7 @@ bool Element::rendererIsNeeded(const RenderStyle& style)
 
 RenderObject* Element::createRenderer(RenderArena&, RenderStyle& style)
 {
 
 RenderObject* Element::createRenderer(RenderArena&, RenderStyle& style)
 {
-    return RenderObject::createObject(*this, style);
+    return RenderElement::createFor(*this, style);
 }
 
 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertionPoint)
 }
 
 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertionPoint)
index 40482757d58bf9e84b2ddcf32f99ddaa92413409..03dbfa017bf795015373c17c8d3b3de22fb915be 100644 (file)
@@ -78,7 +78,7 @@ bool HTMLAppletElement::rendererIsNeeded(const RenderStyle& style)
 RenderObject* HTMLAppletElement::createRenderer(RenderArena&, RenderStyle& style)
 {
     if (!canEmbedJava())
 RenderObject* HTMLAppletElement::createRenderer(RenderArena&, RenderStyle& style)
 {
     if (!canEmbedJava())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     return RenderEmbeddedObject::createForApplet(*this);
 }
 
     return RenderEmbeddedObject::createForApplet(*this);
 }
index 326b322994ec31023a9040a12bb8dca4f8764c1d..8ee12d1603a4b732d01eca6efca82177ff87b067 100644 (file)
@@ -74,7 +74,7 @@ void HTMLBRElement::collectStyleForPresentationAttribute(const QualifiedName& na
 RenderObject* HTMLBRElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
 RenderObject* HTMLBRElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     return new (arena) RenderLineBreak(*this);
 }
 
     return new (arena) RenderLineBreak(*this);
 }
index 48e5aafdacd80ce86ff97dbdd44b63f8aae0f4d9..57ff8b73e72d60efe5359218b2027e9f0e25f22c 100644 (file)
@@ -792,7 +792,7 @@ RenderObject* HTMLElement::createRenderer(RenderArena& arena, RenderStyle& style
 {
     if (hasLocalName(wbrTag))
         return new (arena) RenderLineBreak(*this);
 {
     if (hasLocalName(wbrTag))
         return new (arena) RenderLineBreak(*this);
-    return RenderObject::createObject(*this, style);
+    return RenderElement::createFor(*this, style);
 }
 
 HTMLFormElement* HTMLElement::virtualForm() const
 }
 
 HTMLFormElement* HTMLElement::virtualForm() const
index a4e4f5b00d963f4fc012745acf8793ef60001cde..d347e0d10713413a4bdf56e0f6edb2fbbbc90d06 100644 (file)
@@ -159,7 +159,7 @@ bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style)
 RenderObject* HTMLFrameSetElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
 RenderObject* HTMLFrameSetElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
     
     return new (arena) RenderFrameSet(*this);
 }
     
     return new (arena) RenderFrameSet(*this);
 }
index e7192c55361fd8199250308fddbc2fce4518bff6..3ccb5bb878a5ae20eac8ee7e88c780ae53f3eb2d 100644 (file)
@@ -166,7 +166,7 @@ String HTMLImageElement::altText() const
 RenderObject* HTMLImageElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
 RenderObject* HTMLImageElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (style.hasContent())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     RenderImage* image = new (arena) RenderImage(this);
     image->setImageResource(RenderImageResource::create());
 
     RenderImage* image = new (arena) RenderImage(this);
     image->setImageResource(RenderImageResource::create());
index cc74b203405f6320f97abc1019cb978a241d7323..1cb9851adc56549383887dcafc3e6e2ecf509d0a 100644 (file)
@@ -59,7 +59,7 @@ PassRefPtr<HTMLMeterElement> HTMLMeterElement::create(const QualifiedName& tagNa
 RenderObject* HTMLMeterElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (hasAuthorShadowRoot() || !document().page()->theme()->supportsMeter(style.appearance()))
 RenderObject* HTMLMeterElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (hasAuthorShadowRoot() || !document().page()->theme()->supportsMeter(style.appearance()))
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     return new (arena) RenderMeter(this);
 }
 
     return new (arena) RenderMeter(this);
 }
index a554bf0b3df3c8f70d7ea6a21fb0e9b27f91c11c..477d20f36d4957b1801a9c8f2beb64daa822c479 100644 (file)
@@ -213,7 +213,7 @@ RenderObject* HTMLPlugInImageElement::createRenderer(RenderArena& arena, RenderS
     // class and all superclasses because createObject won't necessarily
     // return a RenderEmbeddedObject or RenderWidget.
     if (useFallbackContent())
     // class and all superclasses because createObject won't necessarily
     // return a RenderEmbeddedObject or RenderWidget.
     if (useFallbackContent())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     if (isImageType()) {
         RenderImage* image = new (arena) RenderImage(this);
 
     if (isImageType()) {
         RenderImage* image = new (arena) RenderImage(this);
index af642b2dd24b672f4b3c70010a87dc1c90c0ff47..77fd309f0de7fa1dba25ab6b42a09eb5fdc663c1 100644 (file)
@@ -61,7 +61,7 @@ PassRefPtr<HTMLProgressElement> HTMLProgressElement::create(const QualifiedName&
 RenderObject* HTMLProgressElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (!style.hasAppearance() || hasAuthorShadowRoot())
 RenderObject* HTMLProgressElement::createRenderer(RenderArena& arena, RenderStyle& style)
 {
     if (!style.hasAppearance() || hasAuthorShadowRoot())
-        return RenderObject::createObject(*this, style);
+        return RenderElement::createFor(*this, style);
 
     return new (arena) RenderProgress(this);
 }
 
     return new (arena) RenderProgress(this);
 }
index 386868a20c955b6d1ed0288b58a9adf36bb39e1a..720bff5a846ccc2e9967c17dc2019c95624a859d 100644 (file)
@@ -61,7 +61,7 @@
 #include "RadioInputType.h"
 #include "RangeInputType.h"
 #include "RegularExpression.h"
 #include "RadioInputType.h"
 #include "RangeInputType.h"
 #include "RegularExpression.h"
-#include "RenderObject.h"
+#include "RenderElement.h"
 #include "RenderTheme.h"
 #include "ResetInputType.h"
 #include "RuntimeEnabledFeatures.h"
 #include "RenderTheme.h"
 #include "ResetInputType.h"
 #include "RuntimeEnabledFeatures.h"
@@ -470,7 +470,7 @@ PassRefPtr<HTMLFormElement> InputType::formForSubmission() const
 
 RenderObject* InputType::createRenderer(RenderArena&, RenderStyle& style) const
 {
 
 RenderObject* InputType::createRenderer(RenderArena&, RenderStyle& style) const
 {
-    return RenderObject::createObject(element(), style);
+    return RenderElement::createFor(element(), style);
 }
 
 void InputType::blur()
 }
 
 void InputType::blur()
diff --git a/Source/WebCore/rendering/RenderElement.cpp b/Source/WebCore/rendering/RenderElement.cpp
new file mode 100644 (file)
index 0000000..caed0cc
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ *           (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
+ *           (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "RenderElement.h"
+
+#include "ContentData.h"
+#include "RenderDeprecatedFlexibleBox.h"
+#include "RenderFlexibleBox.h"
+#include "RenderGrid.h"
+#include "RenderImage.h"
+#include "RenderImageResourceStyleImage.h"
+#include "RenderListItem.h"
+#include "RenderMultiColumnBlock.h"
+#include "RenderRegion.h"
+#include "RenderRuby.h"
+#include "RenderRubyText.h"
+#include "RenderTableCaption.h"
+#include "RenderTableCell.h"
+#include "RenderTableCol.h"
+#include "RenderTableRow.h"
+
+namespace WebCore {
+
+RenderElement::RenderElement(Element* element)
+    : RenderObject(element)
+{
+}
+
+RenderElement::~RenderElement()
+{
+}
+
+RenderElement* RenderElement::createFor(Element& element, RenderStyle& style)
+{
+    Document& document = element.document();
+    RenderArena& arena = *document.renderArena();
+
+    // Minimal support for content properties replacing an entire element.
+    // Works only if we have exactly one piece of content and it's a URL.
+    // Otherwise acts as if we didn't support this feature.
+    const ContentData* contentData = style.contentData();
+    if (contentData && !contentData->next() && contentData->isImage() && !element.isPseudoElement()) {
+        RenderImage* image = new (arena) RenderImage(&element);
+        // RenderImageResourceStyleImage requires a style being present on the image but we don't want to
+        // trigger a style change now as the node is not fully attached. Moving this code to style change
+        // doesn't make sense as it should be run once at renderer creation.
+        image->setStyleInternal(&style);
+        if (const StyleImage* styleImage = static_cast<const ImageContentData*>(contentData)->image()) {
+            image->setImageResource(RenderImageResourceStyleImage::create(const_cast<StyleImage*>(styleImage)));
+            image->setIsGeneratedContent();
+        } else
+            image->setImageResource(RenderImageResource::create());
+        image->setStyleInternal(0);
+        return image;
+    }
+
+    if (element.hasTagName(HTMLNames::rubyTag)) {
+        if (style.display() == INLINE)
+            return new (arena) RenderRubyAsInline(element);
+        if (style.display() == BLOCK)
+            return new (arena) RenderRubyAsBlock(element);
+    }
+    // treat <rt> as ruby text ONLY if it still has its default treatment of block
+    if (element.hasTagName(HTMLNames::rtTag) && style.display() == BLOCK)
+        return new (arena) RenderRubyText(element);
+    if (document.cssRegionsEnabled() && style.isDisplayRegionType() && !style.regionThread().isEmpty())
+        return new (arena) RenderRegion(&element, 0);
+    switch (style.display()) {
+    case NONE:
+        return 0;
+    case INLINE:
+        return new (arena) RenderInline(&element);
+    case BLOCK:
+    case INLINE_BLOCK:
+    case RUN_IN:
+    case COMPACT:
+        if ((!style.hasAutoColumnCount() || !style.hasAutoColumnWidth()) && document.regionBasedColumnsEnabled())
+            return new (arena) RenderMultiColumnBlock(element);
+        return new (arena) RenderBlockFlow(&element);
+    case LIST_ITEM:
+        return new (arena) RenderListItem(element);
+    case TABLE:
+    case INLINE_TABLE:
+        return new (arena) RenderTable(&element);
+    case TABLE_ROW_GROUP:
+    case TABLE_HEADER_GROUP:
+    case TABLE_FOOTER_GROUP:
+        return new (arena) RenderTableSection(&element);
+    case TABLE_ROW:
+        return new (arena) RenderTableRow(&element);
+    case TABLE_COLUMN_GROUP:
+    case TABLE_COLUMN:
+        return new (arena) RenderTableCol(element);
+    case TABLE_CELL:
+        return new (arena) RenderTableCell(&element);
+    case TABLE_CAPTION:
+        return new (arena) RenderTableCaption(element);
+    case BOX:
+    case INLINE_BOX:
+        return new (arena) RenderDeprecatedFlexibleBox(element);
+    case FLEX:
+    case INLINE_FLEX:
+        return new (arena) RenderFlexibleBox(&element);
+    case GRID:
+    case INLINE_GRID:
+        return new (arena) RenderGrid(element);
+    }
+
+    return nullptr;
+}
+
+}
diff --git a/Source/WebCore/rendering/RenderElement.h b/Source/WebCore/rendering/RenderElement.h
new file mode 100644 (file)
index 0000000..45e5025
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RenderElement_h
+#define RenderElement_h
+
+#include "RenderObject.h"
+
+namespace WebCore {
+
+class RenderElement : public RenderObject {
+public:
+    virtual ~RenderElement();
+
+    static RenderElement* createFor(Element&, RenderStyle&);
+
+    // This is null for anonymous renderers.
+    Element* element() const { return toElement(RenderObject::node()); }
+    Element* nonPseudoElement() const { return toElement(RenderObject::nonPseudoNode()); }
+    Element* generatingElement() const { return toElement(RenderObject::generatingNode()); }
+
+protected:
+    explicit RenderElement(Element*);
+
+private:
+    void node() const WTF_DELETED_FUNCTION;
+    void nonPseudoNode() const WTF_DELETED_FUNCTION;
+    void generatingNode() const WTF_DELETED_FUNCTION;
+};
+
+} // namespace WebCore
+
+#endif // RenderElement_h
index 9d135df119aadd09dfbdef3657a29b00d95cf1ef..0d89ad88b9ce5cf57ba0a174df1018d1863f176c 100644 (file)
@@ -38,7 +38,7 @@ bool RenderLayerModelObject::s_hadTransform = false;
 bool RenderLayerModelObject::s_layerWasSelfPainting = false;
 
 RenderLayerModelObject::RenderLayerModelObject(Element* element)
 bool RenderLayerModelObject::s_layerWasSelfPainting = false;
 
 RenderLayerModelObject::RenderLayerModelObject(Element* element)
-    : RenderObject(element)
+    : RenderElement(element)
     , m_layer(0)
 {
 }
     , m_layer(0)
 {
 }
index 9030d512119831fc5c5312ad2d9294ce92a66f49..c21563e8f58eb6745a35f12cfc288f8c3e47dfd6 100644 (file)
 #ifndef RenderLayerModelObject_h
 #define RenderLayerModelObject_h
 
 #ifndef RenderLayerModelObject_h
 #define RenderLayerModelObject_h
 
-#include "RenderObject.h"
+#include "RenderElement.h"
 
 namespace WebCore {
 
 class RenderLayer;
 
 
 namespace WebCore {
 
 class RenderLayer;
 
-class RenderLayerModelObject : public RenderObject {
+class RenderLayerModelObject : public RenderElement {
 public:
     explicit RenderLayerModelObject(Element*);
     virtual ~RenderLayerModelObject();
 public:
     explicit RenderLayerModelObject(Element*);
     virtual ~RenderLayerModelObject();
@@ -50,11 +50,6 @@ public:
     // The query rect is given in local coordinate system.
     virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const { return false; }
 
     // The query rect is given in local coordinate system.
     virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const { return false; }
 
-    // This is null for anonymous renderers.
-    Element* element() const { return toElement(RenderObject::node()); }
-    Element* nonPseudoElement() const { return toElement(RenderObject::nonPseudoNode()); }
-    Element* generatingElement() const { return toElement(RenderObject::generatingNode()); }
-
 protected:
     void ensureLayer();
     virtual bool updateLayerIfNeeded();
 protected:
     void ensureLayer();
     virtual bool updateLayerIfNeeded();
@@ -64,10 +59,6 @@ protected:
 private:
     virtual bool isLayerModelObject() const OVERRIDE FINAL { return true; }
 
 private:
     virtual bool isLayerModelObject() const OVERRIDE FINAL { return true; }
 
-    void node() const WTF_DELETED_FUNCTION;
-    void nonPseudoNode() const WTF_DELETED_FUNCTION;
-    void generatingNode() const WTF_DELETED_FUNCTION;
-
     RenderLayer* m_layer;
 
     // Used to store state between styleWillChange and styleDidChange
     RenderLayer* m_layer;
 
     // Used to store state between styleWillChange and styleDidChange
index 69a8c351db6ae5dd7546e3684b39f91901d1bba2..b0550a86f627c0df7cbad14acec68e78dbea382a 100644 (file)
@@ -3,7 +3,7 @@
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
  *           (C) 2000 Dirk Mueller (mueller@kde.org)
  *           (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
  *           (C) 2000 Dirk Mueller (mueller@kde.org)
  *           (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
  * Copyright (C) 2009 Google Inc. All rights reserved.
  * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
  *
  * Copyright (C) 2009 Google Inc. All rights reserved.
  * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
  *
@@ -29,7 +29,6 @@
 
 #include "AXObjectCache.h"
 #include "AnimationController.h"
 
 #include "AXObjectCache.h"
 #include "AnimationController.h"
-#include "ContentData.h"
 #include "CursorList.h"
 #include "EventHandler.h"
 #include "FloatQuad.h"
 #include "CursorList.h"
 #include "EventHandler.h"
 #include "FloatQuad.h"
 #include "PseudoElement.h"
 #include "RenderArena.h"
 #include "RenderCounter.h"
 #include "PseudoElement.h"
 #include "RenderArena.h"
 #include "RenderCounter.h"
-#include "RenderDeprecatedFlexibleBox.h"
-#include "RenderFlexibleBox.h"
+#include "RenderFlowThread.h"
 #include "RenderGeometryMap.h"
 #include "RenderGeometryMap.h"
-#include "RenderGrid.h"
-#include "RenderImage.h"
-#include "RenderImageResourceStyleImage.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
-#include "RenderListItem.h"
-#include "RenderMultiColumnBlock.h"
 #include "RenderNamedFlowThread.h"
 #include "RenderNamedFlowThread.h"
-#include "RenderRegion.h"
-#include "RenderRuby.h"
-#include "RenderRubyText.h"
 #include "RenderScrollbarPart.h"
 #include "RenderScrollbarPart.h"
-#include "RenderTableCaption.h"
-#include "RenderTableCell.h"
+#include "RenderTable.h"
 #include "RenderTableCol.h"
 #include "RenderTableCol.h"
-#include "RenderTableRow.h"
 #include "RenderTheme.h"
 #include "RenderView.h"
 #include "Settings.h"
 #include "RenderTheme.h"
 #include "RenderView.h"
 #include "Settings.h"
@@ -161,85 +149,6 @@ void RenderObject::operator delete(void* ptr, size_t sz)
     *(size_t *)ptr = sz;
 }
 
     *(size_t *)ptr = sz;
 }
 
-RenderObject* RenderObject::createObject(Element& element, RenderStyle& style)
-{
-    Document& document = element.document();
-    RenderArena& arena = *document.renderArena();
-
-    // Minimal support for content properties replacing an entire element.
-    // Works only if we have exactly one piece of content and it's a URL.
-    // Otherwise acts as if we didn't support this feature.
-    const ContentData* contentData = style.contentData();
-    if (contentData && !contentData->next() && contentData->isImage() && !element.isPseudoElement()) {
-        RenderImage* image = new (arena) RenderImage(&element);
-        // RenderImageResourceStyleImage requires a style being present on the image but we don't want to
-        // trigger a style change now as the node is not fully attached. Moving this code to style change
-        // doesn't make sense as it should be run once at renderer creation.
-        image->setStyleInternal(&style);
-        if (const StyleImage* styleImage = static_cast<const ImageContentData*>(contentData)->image()) {
-            image->setImageResource(RenderImageResourceStyleImage::create(const_cast<StyleImage*>(styleImage)));
-            image->setIsGeneratedContent();
-        } else
-            image->setImageResource(RenderImageResource::create());
-        image->setStyleInternal(0);
-        return image;
-    }
-
-    if (element.hasTagName(rubyTag)) {
-        if (style.display() == INLINE)
-            return new (arena) RenderRubyAsInline(element);
-        else if (style.display() == BLOCK)
-            return new (arena) RenderRubyAsBlock(element);
-    }
-    // treat <rt> as ruby text ONLY if it still has its default treatment of block
-    if (element.hasTagName(rtTag) && style.display() == BLOCK)
-        return new (arena) RenderRubyText(element);
-    if (document.cssRegionsEnabled() && style.isDisplayRegionType() && !style.regionThread().isEmpty())
-        return new (arena) RenderRegion(&element, 0);
-    switch (style.display()) {
-    case NONE:
-        return 0;
-    case INLINE:
-        return new (arena) RenderInline(&element);
-    case BLOCK:
-    case INLINE_BLOCK:
-    case RUN_IN:
-    case COMPACT:
-        if ((!style.hasAutoColumnCount() || !style.hasAutoColumnWidth()) && document.regionBasedColumnsEnabled())
-            return new (arena) RenderMultiColumnBlock(element);
-        return new (arena) RenderBlockFlow(&element);
-    case LIST_ITEM:
-        return new (arena) RenderListItem(element);
-    case TABLE:
-    case INLINE_TABLE:
-        return new (arena) RenderTable(&element);
-    case TABLE_ROW_GROUP:
-    case TABLE_HEADER_GROUP:
-    case TABLE_FOOTER_GROUP:
-        return new (arena) RenderTableSection(&element);
-    case TABLE_ROW:
-        return new (arena) RenderTableRow(&element);
-    case TABLE_COLUMN_GROUP:
-    case TABLE_COLUMN:
-        return new (arena) RenderTableCol(element);
-    case TABLE_CELL:
-        return new (arena) RenderTableCell(&element);
-    case TABLE_CAPTION:
-        return new (arena) RenderTableCaption(element);
-    case BOX:
-    case INLINE_BOX:
-        return new (arena) RenderDeprecatedFlexibleBox(element);
-    case FLEX:
-    case INLINE_FLEX:
-        return new (arena) RenderFlexibleBox(&element);
-    case GRID:
-    case INLINE_GRID:
-        return new (arena) RenderGrid(element);
-    }
-
-    return 0;
-}
-
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, renderObjectCounter, ("RenderObject"));
 
 RenderObject::RenderObject(Node* node)
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, renderObjectCounter, ("RenderObject"));
 
 RenderObject::RenderObject(Node* node)
index fb7ba3c1cd282b2ad3d628d9647a45f33e71e036..f3c8b3779e6849452732e70d056ca3e3e24ed1d3 100644 (file)
@@ -326,8 +326,6 @@ public:
     void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLabel2 = 0, int depth = 0) const;
 #endif
 
     void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLabel2 = 0, int depth = 0) const;
 #endif
 
-    static RenderObject* createObject(Element&, RenderStyle&);
-
     // Overloaded new operator.  Derived classes must override operator new
     // in order to allocate out of the RenderArena.
     void* operator new(size_t, RenderArena&);
     // Overloaded new operator.  Derived classes must override operator new
     // in order to allocate out of the RenderArena.
     void* operator new(size_t, RenderArena&);
index 6e93709070a20407fe7b0d46593fb77f365fcc7e..31d35cf25113731c6bbd2be3ee3d9483d74d7752 100644 (file)
@@ -53,6 +53,7 @@
 #include "RenderCounter.cpp"
 #include "RenderDeprecatedFlexibleBox.cpp"
 #include "RenderDetailsMarker.cpp"
 #include "RenderCounter.cpp"
 #include "RenderDeprecatedFlexibleBox.cpp"
 #include "RenderDetailsMarker.cpp"
+#include "RenderElement.cpp"
 #include "RenderEmbeddedObject.cpp"
 #include "RenderFieldset.cpp"
 #include "RenderFileUploadControl.cpp"
 #include "RenderEmbeddedObject.cpp"
 #include "RenderFieldset.cpp"
 #include "RenderFileUploadControl.cpp"
index 9b41ae319573c3fb2645fde5be44942ebaa5c9e2..d0ea48049fec3f41c2521366ec9028e11067168e 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 using namespace SVGNames;
 
 RenderSVGGradientStop::RenderSVGGradientStop(SVGStopElement* element)
 using namespace SVGNames;
 
 RenderSVGGradientStop::RenderSVGGradientStop(SVGStopElement* element)
-    : RenderObject(element)
+    : RenderElement(element)
 {
 }
 
 {
 }
 
@@ -71,7 +71,7 @@ void RenderSVGGradientStop::layout()
 
 SVGGradientElement* RenderSVGGradientStop::gradientElement() const
 {
 
 SVGGradientElement* RenderSVGGradientStop::gradientElement() const
 {
-    ContainerNode* parentNode = node()->parentNode();
+    ContainerNode* parentNode = element()->parentNode();
     if (parentNode->hasTagName(linearGradientTag) || parentNode->hasTagName(radialGradientTag))
         return toSVGGradientElement(parentNode);
     return 0;
     if (parentNode->hasTagName(linearGradientTag) || parentNode->hasTagName(radialGradientTag))
         return toSVGGradientElement(parentNode);
     return 0;
index 64ba35611b1be3b71ff72349abf9f7f663fb0cf1..3bf154859cc47504763ec9c690678fffd1d9a69a 100644 (file)
@@ -22,7 +22,7 @@
 #define RenderSVGGradientStop_h
 
 #if ENABLE(SVG)
 #define RenderSVGGradientStop_h
 
 #if ENABLE(SVG)
-#include "RenderObject.h"
+#include "RenderElement.h"
 
 namespace WebCore {
     
 
 namespace WebCore {
     
@@ -30,7 +30,7 @@ class SVGGradientElement;
 class SVGStopElement;
 
 // This class exists mostly so we can hear about gradient stop style changes
 class SVGStopElement;
 
 // This class exists mostly so we can hear about gradient stop style changes
-class RenderSVGGradientStop FINAL : public RenderObject {
+class RenderSVGGradientStop FINAL : public RenderElement {
 public:
     RenderSVGGradientStop(SVGStopElement*);
     virtual ~RenderSVGGradientStop();
 public:
     RenderSVGGradientStop(SVGStopElement*);
     virtual ~RenderSVGGradientStop();
index c1756e1204ceebec8b251d23fe7e085e749f1af0..92bfe94c4aba9b6ea368773224e6bc3f64fa837f 100644 (file)
@@ -43,7 +43,7 @@
 namespace WebCore {
 
 RenderSVGModelObject::RenderSVGModelObject(SVGElement& element)
 namespace WebCore {
 
 RenderSVGModelObject::RenderSVGModelObject(SVGElement& element)
-    : RenderObject(&element)
+    : RenderElement(&element)
     , m_hasSVGShadow(false)
 {
 }
     , m_hasSVGShadow(false)
 {
 }
index 6683eff35364cac74f91889b6e5df82c69146809..cfdaeb24badca3d08ab7432ce5a97ed3aa4cb35c 100644 (file)
@@ -33,7 +33,7 @@
 
 #if ENABLE(SVG)
 
 
 #if ENABLE(SVG)
 
-#include "RenderObject.h"
+#include "RenderElement.h"
 #include "SVGElement.h"
 #include "SVGRenderSupport.h"
 
 #include "SVGElement.h"
 #include "SVGRenderSupport.h"
 
@@ -46,7 +46,7 @@ namespace WebCore {
 
 class SVGElement;
 
 
 class SVGElement;
 
-class RenderSVGModelObject : public RenderObject {
+class RenderSVGModelObject : public RenderElement {
 public:
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
     virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL;
 public:
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
     virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL;
@@ -67,7 +67,7 @@ public:
     bool hasSVGShadow() const { return m_hasSVGShadow; }
     void setHasSVGShadow(bool hasShadow) { m_hasSVGShadow = hasShadow; }
 
     bool hasSVGShadow() const { return m_hasSVGShadow; }
     void setHasSVGShadow(bool hasShadow) { m_hasSVGShadow = hasShadow; }
 
-    SVGElement& element() const { return *toSVGElement(RenderObject::node()); }
+    SVGElement& element() const { return *toSVGElement(RenderElement::element()); }
 
 protected:
     explicit RenderSVGModelObject(SVGElement&);
 
 protected:
     explicit RenderSVGModelObject(SVGElement&);
@@ -75,8 +75,6 @@ protected:
     virtual void willBeDestroyed() OVERRIDE;
 
 private:
     virtual void willBeDestroyed() OVERRIDE;
 
 private:
-    void node() const WTF_DELETED_FUNCTION;
-
     // This method should never be called, SVG uses a different nodeAtPoint method
     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
     virtual void absoluteFocusRingQuads(Vector<FloatQuad>&) OVERRIDE FINAL;
     // This method should never be called, SVG uses a different nodeAtPoint method
     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
     virtual void absoluteFocusRingQuads(Vector<FloatQuad>&) OVERRIDE FINAL;
index 583e5c617fdfdd96114b03fbd0699e8e7390450f..0741a08dfec893e26aa822c965db0586ba1ac602 100644 (file)
@@ -624,7 +624,7 @@ void writeSVGGradientStop(TextStream& ts, const RenderSVGGradientStop& stop, int
 {
     writeStandardPrefix(ts, stop, indent);
 
 {
     writeStandardPrefix(ts, stop, indent);
 
-    SVGStopElement* stopElement = toSVGStopElement(toSVGElement(stop.node()));
+    SVGStopElement* stopElement = toSVGStopElement(toSVGElement(stop.element()));
     ASSERT(stopElement);
 
     RenderStyle* style = stop.style();
     ASSERT(stopElement);
 
     RenderStyle* style = stop.style();