Title: [87780] trunk/Source/WebCore
Revision
87780
Author
[email protected]
Date
2011-06-01 00:40:41 -0700 (Wed, 01 Jun 2011)

Log Message

2011-06-01  Dimitri Glazkov  <[email protected]>

        Reviewed by Kent Tamura.

        Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
        https://bugs.webkit.org/show_bug.cgi?id=61816

        This is a near-mechanical move-and-rename of ShadowElement, which is now only
        used by input[type=file]. Next step -- switch it over to new shadow DOM.

        Refactoring, no change in behavior.

        * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
        * GNUmakefile.list.am: Ditto.
        * WebCore.gypi: Ditto.
        * WebCore.pro: Ditto.
        * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCore/rendering/RenderingAllInOne.cpp: Ditto.
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
        (WebCore::UploadButton::detach): Ditto.
        (WebCore::UploadButton::UploadButton): Ditto.
        (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
        * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
        * rendering/RenderProgress.cpp: Ditto.
        * rendering/ShadowElement.cpp: Removed.
        * rendering/ShadowElement.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (87779 => 87780)


--- trunk/Source/WebCore/CMakeLists.txt	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/CMakeLists.txt	2011-06-01 07:40:41 UTC (rev 87780)
@@ -1291,7 +1291,6 @@
     rendering/RenderWordBreak.cpp
     rendering/RootInlineBox.cpp
     rendering/ScrollBehavior.cpp
-    rendering/ShadowElement.cpp
     rendering/TransformState.cpp
     rendering/break_lines.cpp
 

Modified: trunk/Source/WebCore/ChangeLog (87779 => 87780)


--- trunk/Source/WebCore/ChangeLog	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/ChangeLog	2011-06-01 07:40:41 UTC (rev 87780)
@@ -1,3 +1,32 @@
+2011-06-01  Dimitri Glazkov  <[email protected]>
+
+        Reviewed by Kent Tamura.
+
+        Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
+        https://bugs.webkit.org/show_bug.cgi?id=61816
+
+        This is a near-mechanical move-and-rename of ShadowElement, which is now only
+        used by input[type=file]. Next step -- switch it over to new shadow DOM.
+
+        Refactoring, no change in behavior.
+
+        * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
+        * GNUmakefile.list.am: Ditto.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * WebCore/rendering/RenderingAllInOne.cpp: Ditto.
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
+        (WebCore::UploadButton::detach): Ditto.
+        (WebCore::UploadButton::UploadButton): Ditto.
+        (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
+        * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
+        * rendering/RenderProgress.cpp: Ditto.
+        * rendering/ShadowElement.cpp: Removed.
+        * rendering/ShadowElement.h: Removed.
+
 2011-06-01  Nikolas Zimmermann  <[email protected]>
 
         Reviewed by Rob Buis.

Modified: trunk/Source/WebCore/GNUmakefile.list.am (87779 => 87780)


--- trunk/Source/WebCore/GNUmakefile.list.am	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2011-06-01 07:40:41 UTC (rev 87780)
@@ -2937,8 +2937,6 @@
 	Source/WebCore/rendering/RootInlineBox.h \
 	Source/WebCore/rendering/ScrollBehavior.cpp \
 	Source/WebCore/rendering/ScrollBehavior.h \
-	Source/WebCore/rendering/ShadowElement.cpp \
-	Source/WebCore/rendering/ShadowElement.h \
 	Source/WebCore/rendering/VerticalPositionCache.h \
 	Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp \
 	Source/WebCore/rendering/mathml/RenderMathMLBlock.h \

Modified: trunk/Source/WebCore/WebCore.gypi (87779 => 87780)


--- trunk/Source/WebCore/WebCore.gypi	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/WebCore.gypi	2011-06-01 07:40:41 UTC (rev 87780)
@@ -5357,8 +5357,6 @@
             'rendering/RenderingAllInOne.cpp',
             'rendering/RootInlineBox.cpp',
             'rendering/ScrollBehavior.cpp',
-            'rendering/ShadowElement.cpp',
-            'rendering/ShadowElement.h',
             'rendering/TableLayout.h',
             'rendering/TrailingFloatsRootInlineBox.h',
             'rendering/TransformState.cpp',

Modified: trunk/Source/WebCore/WebCore.pro (87779 => 87780)


--- trunk/Source/WebCore/WebCore.pro	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/WebCore.pro	2011-06-01 07:40:41 UTC (rev 87780)
@@ -1161,7 +1161,6 @@
     rendering/RenderWordBreak.cpp \
     rendering/RootInlineBox.cpp \
     rendering/ScrollBehavior.cpp \
-    rendering/ShadowElement.cpp \
     rendering/TransformState.cpp \
     rendering/style/ContentData.cpp \
     rendering/style/CounterDirectives.cpp \
@@ -2192,7 +2191,6 @@
     rendering/RenderWordBreak.h \
     rendering/RootInlineBox.h \
     rendering/ScrollBehavior.h \
-    rendering/ShadowElement.h \
     rendering/style/ContentData.h \
     rendering/style/CounterDirectives.h \
     rendering/style/CursorData.h \

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (87779 => 87780)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2011-06-01 07:40:41 UTC (rev 87780)
@@ -38776,62 +38776,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\rendering\ShadowElement.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug_Cairo_CFLite|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release_Cairo_CFLite|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug_All|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Production|Win32"
-					ExcludedFromBuild="true"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\rendering\ShadowElement.h"
-				>
-			</File>
-			<File
 				RelativePath="..\rendering\svg\SVGMarkerData.h"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (87779 => 87780)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-06-01 07:40:41 UTC (rev 87780)
@@ -982,8 +982,6 @@
 		449B19F50FA72ECE0015CA4A /* HTMLParserQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		44A28AAC12DFB8AC00AE923B /* MathMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAB12DFB8AC00AE923B /* MathMLElementFactory.h */; };
 		44A28AAF12DFB8BF00AE923B /* MathMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */; };
-		44D8DA99139545BE00337B75 /* SVGMPathElement.idl in Resources */ = {isa = PBXBuildFile; fileRef = 44D8DA98139545BE00337B75 /* SVGMPathElement.idl */; };
-		44D8DA9B139545CD00337B75 /* SVGAnimateMotionElement.idl in Resources */ = {isa = PBXBuildFile; fileRef = 44D8DA9A139545CD00337B75 /* SVGAnimateMotionElement.idl */; };
 		45099C411370A7800058D513 /* IconURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45099C401370A7800058D513 /* IconURL.cpp */; };
 		45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
@@ -3274,8 +3272,6 @@
 		A7D6B34A0F61104500B79FD1 /* WorkerScriptLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D6B3480F61104500B79FD1 /* WorkerScriptLoader.cpp */; };
 		A7DBF8DD1276919C006B6008 /* TextCheckingHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7DBF8DB1276919C006B6008 /* TextCheckingHelper.cpp */; };
 		A7DBF8DE1276919C006B6008 /* TextCheckingHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DBF8DC1276919C006B6008 /* TextCheckingHelper.h */; };
-		A7F338A311C0EFCA00A320A7 /* ShadowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F338A111C0EFCA00A320A7 /* ShadowElement.cpp */; };
-		A7F338A411C0EFCA00A320A7 /* ShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F338A211C0EFCA00A320A7 /* ShadowElement.h */; };
 		A7F5D94F1384F02D00A29A87 /* NodeRenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */; };
 		A7F5D9501384F02D00A29A87 /* NodeRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */; };
 		A80A38FE0E50CC8200A25EBC /* PatternCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */; };
@@ -9848,8 +9844,6 @@
 		A7D6B3480F61104500B79FD1 /* WorkerScriptLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerScriptLoader.cpp; path = workers/WorkerScriptLoader.cpp; sourceTree = "<group>"; };
 		A7DBF8DB1276919C006B6008 /* TextCheckingHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextCheckingHelper.cpp; sourceTree = "<group>"; };
 		A7DBF8DC1276919C006B6008 /* TextCheckingHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCheckingHelper.h; sourceTree = "<group>"; };
-		A7F338A111C0EFCA00A320A7 /* ShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowElement.cpp; sourceTree = "<group>"; };
-		A7F338A211C0EFCA00A320A7 /* ShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowElement.h; sourceTree = "<group>"; };
 		A7F5D94D1384F02D00A29A87 /* NodeRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeRenderingContext.cpp; sourceTree = "<group>"; };
 		A7F5D94E1384F02D00A29A87 /* NodeRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeRenderingContext.h; sourceTree = "<group>"; };
 		A80A38FD0E50CC8200A25EBC /* PatternCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PatternCG.cpp; sourceTree = "<group>"; };
@@ -19286,8 +19280,6 @@
 				A8CFF5DA0A155A05000A4234 /* RootInlineBox.h */,
 				5D925B650F64D4DD00B847F0 /* ScrollBehavior.cpp */,
 				5D925B660F64D4DD00B847F0 /* ScrollBehavior.h */,
-				A7F338A111C0EFCA00A320A7 /* ShadowElement.cpp */,
-				A7F338A211C0EFCA00A320A7 /* ShadowElement.h */,
 				A8CFF04C0A154F09000A4234 /* TableLayout.h */,
 				37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */,
 				0F500AB00F54DB3100EEF928 /* TransformState.cpp */,
@@ -22444,7 +22436,6 @@
 				A74C2D3C13811E0D00F83572 /* ShadowContentElement.h in Headers */,
 				A71C30B91381265E00DBC351 /* ShadowContentSelector.h in Headers */,
 				BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */,
-				A7F338A411C0EFCA00A320A7 /* ShadowElement.h in Headers */,
 				A6D169641346B4C1000EB770 /* ShadowRoot.h in Headers */,
 				A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */,
 				B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */,
@@ -25274,7 +25265,6 @@
 				A766CF8C13810E0C0011A0B3 /* ShadowContentElement.cpp in Sources */,
 				A71C30B81381265E00DBC351 /* ShadowContentSelector.cpp in Sources */,
 				BC5EB8C30E82031B00B25965 /* ShadowData.cpp in Sources */,
-				A7F338A311C0EFCA00A320A7 /* ShadowElement.cpp in Sources */,
 				A6D169621346B49B000EB770 /* ShadowRoot.cpp in Sources */,
 				A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */,
 				B2AFFC930D00A5DF0030074D /* ShapeArabic.c in Sources */,

Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (87779 => 87780)


--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-06-01 07:40:41 UTC (rev 87780)
@@ -28,7 +28,6 @@
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
-#include "ShadowElement.h"
 #include "Icon.h"
 #include "LocalizedStrings.h"
 #include "Page.h"
@@ -53,6 +52,32 @@
 const int defaultWidthNumChars = 34;
 const int buttonShadowHeight = 2;
 
+class UploadButton : public HTMLInputElement {
+public:
+    static PassRefPtr<UploadButton> create(HTMLInputElement*);
+    virtual void detach();
+
+private:
+    UploadButton(HTMLInputElement*);
+};
+
+PassRefPtr<UploadButton> UploadButton::create(HTMLInputElement* shadowParent)
+{
+    return adoptRef(new UploadButton(shadowParent));
+}
+
+void UploadButton::detach()
+{
+    HTMLInputElement::detach();
+    setShadowHost(0);
+}
+
+UploadButton::UploadButton(HTMLInputElement* shadowParent)
+    : HTMLInputElement(inputTag, shadowParent->document(), 0, false)
+{
+    setShadowHost(shadowParent);
+}
+
 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input)
     : RenderBlock(input)
 {
@@ -154,7 +179,7 @@
     ASSERT(inputElement->isFileUpload());
     
     if (!m_button) {
-        m_button = ShadowInputElement::create(inputElement);
+        m_button = UploadButton::create(inputElement);
         m_button->setType("button");
         m_button->setValue(fileButtonChooseFileLabel());
         RefPtr<RenderStyle> buttonStyle = createButtonStyle(style());

Modified: trunk/Source/WebCore/rendering/RenderMeter.cpp (87779 => 87780)


--- trunk/Source/WebCore/rendering/RenderMeter.cpp	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/RenderMeter.cpp	2011-06-01 07:40:41 UTC (rev 87780)
@@ -27,7 +27,6 @@
 #include "HTMLMeterElement.h"
 #include "HTMLNames.h"
 #include "RenderTheme.h"
-#include "ShadowElement.h"
 
 using namespace std;
 

Modified: trunk/Source/WebCore/rendering/RenderProgress.cpp (87779 => 87780)


--- trunk/Source/WebCore/rendering/RenderProgress.cpp	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/RenderProgress.cpp	2011-06-01 07:40:41 UTC (rev 87780)
@@ -28,7 +28,6 @@
 #include "HTMLProgressElement.h"
 #include "PaintInfo.h"
 #include "RenderTheme.h"
-#include "ShadowElement.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/RefPtr.h>
 

Modified: trunk/Source/WebCore/rendering/RenderingAllInOne.cpp (87779 => 87780)


--- trunk/Source/WebCore/rendering/RenderingAllInOne.cpp	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/RenderingAllInOne.cpp	2011-06-01 07:40:41 UTC (rev 87780)
@@ -107,6 +107,5 @@
 #include "RenderWordBreak.cpp"
 #include "RootInlineBox.cpp"
 #include "ScrollBehavior.cpp"
-#include "ShadowElement.cpp"
 #include "TransformState.cpp"
 #include "break_lines.cpp"

Deleted: trunk/Source/WebCore/rendering/ShadowElement.cpp (87779 => 87780)


--- trunk/Source/WebCore/rendering/ShadowElement.cpp	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/ShadowElement.cpp	2011-06-01 07:40:41 UTC (rev 87780)
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple 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 "ShadowElement.h"
-
-#include "HTMLNames.h"
-#include "RenderTheme.h"
-#include "RenderView.h"
-
-namespace WebCore {
-
-using namespace HTMLNames;
-
-PassRefPtr<ShadowInputElement> ShadowInputElement::create(HTMLElement* shadowParent)
-{
-    return adoptRef(new ShadowInputElement(shadowParent));
-}
-
-ShadowInputElement::ShadowInputElement(HTMLElement* shadowParent)
-    : ShadowElement<HTMLInputElement>(inputTag, shadowParent, 0, false)
-{
-}
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/rendering/ShadowElement.h (87779 => 87780)


--- trunk/Source/WebCore/rendering/ShadowElement.h	2011-06-01 07:30:10 UTC (rev 87779)
+++ trunk/Source/WebCore/rendering/ShadowElement.h	2011-06-01 07:40:41 UTC (rev 87780)
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ShadowElement_h
-#define ShadowElement_h
-
-#include "HTMLDivElement.h"
-#include "HTMLInputElement.h"
-
-namespace WebCore {
-
-template<class BaseElement>
-class ShadowElement : public BaseElement {
-protected:
-    ShadowElement(const QualifiedName& name, HTMLElement* shadowParent)
-        : BaseElement(name, shadowParent->document())
-    {
-        BaseElement::setShadowHost(shadowParent);
-    }
-
-    ShadowElement(const QualifiedName& name, HTMLElement* shadowParent, HTMLFormElement* form, bool createdByParser)
-        : BaseElement(name, shadowParent->document(), form, createdByParser)
-    {
-        BaseElement::setShadowHost(shadowParent);
-    }
-
-public:
-    virtual void detach();
-};
-
-template<class BaseElement>
-void ShadowElement<BaseElement>::detach()
-{
-    BaseElement::detach();
-    // FIXME: Remove once shadow DOM uses Element::setShadowRoot().
-    BaseElement::setShadowHost(0);
-}
-
-class ShadowInputElement : public ShadowElement<HTMLInputElement> {
-public:
-    static PassRefPtr<ShadowInputElement> create(HTMLElement*);
-protected:
-    ShadowInputElement(HTMLElement*);
-};
-
-} // namespace WebCore
-
-#endif // ShadowElement_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to