Title: [105917] trunk
Revision
105917
Author
[email protected]
Date
2012-01-25 12:47:34 -0800 (Wed, 25 Jan 2012)

Log Message

<content> should create HTMLContentElement object
https://bugs.webkit.org/show_bug.cgi?id=76439

Reviewed by Dimitri Glazkov.

Source/WebCore:

- Added HTMLContentElement.idl which has @select attribute.
- Added "content" element.

Both are behind ENABLE_SHADOW_DOM.

Tests: fast/dom/shadow/content-element-api.html
       fast/dom/shadow/content-element-outside-shadow.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTagNames.in:
* html/shadow/HTMLContentElement.cpp:
(WebCore::contentTagName):
(WebCore):
(WebCore::HTMLContentElement::create):
* html/shadow/HTMLContentElement.h:
(HTMLContentElement):
* html/shadow/HTMLContentElement.idl: Added.

LayoutTests:

Ensure that contnet elements are renderered not only inside the shadow tree
but also the outside that.

* fast/dom/shadow/content-element-api-expected.txt: Added.
* fast/dom/shadow/content-element-api.html: Added.
* fast/dom/shadow/content-element-outside-shadow-expected.txt: Added.
* fast/dom/shadow/content-element-outside-shadow.html: Added.
* platform/efl/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/mac/test_expectations.txt:
* platform/qt/test_expectations.txt:
* platform/win/Skipped:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (105916 => 105917)


--- trunk/LayoutTests/ChangeLog	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/ChangeLog	2012-01-25 20:47:34 UTC (rev 105917)
@@ -1,3 +1,23 @@
+2012-01-25  Hajime Morita  <[email protected]>
+
+        <content> should create HTMLContentElement object
+        https://bugs.webkit.org/show_bug.cgi?id=76439
+
+        Reviewed by Dimitri Glazkov.
+
+        Ensure that contnet elements are renderered not only inside the shadow tree
+        but also the outside that.
+
+        * fast/dom/shadow/content-element-api-expected.txt: Added.
+        * fast/dom/shadow/content-element-api.html: Added.
+        * fast/dom/shadow/content-element-outside-shadow-expected.txt: Added.
+        * fast/dom/shadow/content-element-outside-shadow.html: Added.
+        * platform/efl/test_expectations.txt:
+        * platform/gtk/test_expectations.txt:
+        * platform/mac/test_expectations.txt:
+        * platform/qt/test_expectations.txt:
+        * platform/win/Skipped:
+
 2012-01-25  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r105828.

Added: trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt (0 => 105917)


--- trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-api-expected.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -0,0 +1,12 @@
+This test ensure that the content element is available.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS contentSimplest.select is ''
+PASS contentSimplest.select is 'foo'
+PASS contentSimplest.getAttribute('select') is 'bar'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/shadow/content-element-api.html (0 => 105917)


--- trunk/LayoutTests/fast/dom/shadow/content-element-api.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-api.html	2012-01-25 20:47:34 UTC (rev 105917)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<div>
+  <content id="content-simplest"></content>
+</div>
+<script>
+description("This test ensure that the content element is available.");
+var contentSimplest = document.getElementById("content-simplest");
+shouldBe("contentSimplest.select", "''");
+contentSimplest.setAttribute("select", "foo");
+shouldBe("contentSimplest.select", "'foo'");
+contentSimplest.select = "bar"
+shouldBe("contentSimplest.getAttribute('select')", "'bar'");
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow-expected.txt (0 => 105917)


--- trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow-expected.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -0,0 +1,21 @@
+HTMLContentElement should be able to survive even outside shadow.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+<div><content></content></div>
+PASS targetRenderTree is comparisonRenderTree
+<div><content>Here is a text.</content></div>
+PASS targetRenderTree is comparisonRenderTree
+<div><content><div>Here is a </div><div>series of</div><div>blocks</div></content></div>
+PASS targetRenderTree is comparisonRenderTree
+<div><content><span>Here is a<span><span>series of</span><span>inlines.</span></content></div>
+PASS targetRenderTree is comparisonRenderTree
+<div><content>Here is a <content>nested content</content> inside content.</content></div>
+PASS targetRenderTree is comparisonRenderTree
+<div><content>Here is a <div>block and <content>nested content</content> inside the block</div>.</content></div>
+PASS targetRenderTree is comparisonRenderTree
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow.html (0 => 105917)


--- trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow.html	2012-01-25 20:47:34 UTC (rev 105917)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<div id="targetContainer" style="position: relative;"></div>
+<div id="comparisonContainer" style="position: relative;"></div>
+
+<script src=""
+<script><!--
+description("HTMLContentElement should be able to survive even outside shadow.");
+
+function removeContainerLines(text)
+{
+    var lines = text.split("\n");
+    lines.splice(0, 2);
+    return lines.join("\n");
+}
+
+var cases = [
+    ["<div><content></content></div>",
+     "<div></div>"],
+    ["<div><content>Here is a text.</content></div>",
+     "<div>Here is a text.</div>"],
+    ["<div><content><div>Here is a </div><div>series of</div><div>blocks</div></content></div>",
+     "<div><div>Here is a </div><div>series of</div><div>blocks</div></div>"],
+    ["<div><content><span>Here is a<span><span>series of</span><span>inlines.</span></content></div>",
+     "<div><span>Here is a<span><span>series of</span><span>inlines.</span></div>"],
+    ["<div><content>Here is a <content>nested content</content> inside content.</content></div>",
+     "<div>Here is a <" + "!-- --" + ">nested content<" + "!-- --" + "> inside content.</div>"],
+    ["<div><content>Here is a <div>block and <content>nested content</content> inside the block</div>.</content></div>",
+     "<div>Here is a <div>block and <!" + "-- --" + ">nested content<!" + "-- --" + "> inside the block</div>.</div>"]
+];
+
+var targetContainer = document.getElementById("targetContainer");
+var comparisonContainer = document.getElementById("comparisonContainer");
+
+for (var i = 0; i < cases.length; ++i) {
+    var targetMarkup = cases[i][0];
+    var expectedMarkup = cases[i][1];
+
+    targetContainer.innerHTML = targetMarkup;
+    comparisonContainer.innerHTML = expectedMarkup;
+    targetRenderTree = removeContainerLines(window.internals.elementRenderTreeAsText(targetContainer));
+    comparisonRenderTree = removeContainerLines(window.internals.elementRenderTreeAsText(comparisonContainer));
+    debug(escapeHTML(targetMarkup));
+    shouldBe("targetRenderTree", "comparisonRenderTree");
+}
+
+targetContainer.innerHTML = comparisonContainer.innerHTML = "";
+
+--></script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (105916 => 105917)


--- trunk/LayoutTests/platform/efl/test_expectations.txt	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -1,3 +1,7 @@
 // These are the layout test expectations for the EFL port(s) of WebKit.
 //
 // See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
+
+// Needs ENABLE_SHADOW_DOM
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT

Modified: trunk/LayoutTests/platform/gtk/test_expectations.txt (105916 => 105917)


--- trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/platform/gtk/test_expectations.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -13,6 +13,10 @@
 BUGWK76815 DEBUG : editing/inserting/4960120-2.html = CRASH
 BUGWK76815 DEBUG : editing/execCommand/19455.html = CRASH
 
+// Needs ENABLE_SHADOW_DOM
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT
+
 // Flaky tests
 
 BUGWK68878 : media/video-playing-and-pause.html = PASS TEXT

Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (105916 => 105917)


--- trunk/LayoutTests/platform/mac/test_expectations.txt	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -5,6 +5,10 @@
 BUGWK76478 : compositing/iframes/repaint-after-losing-scrollbars.html = IMAGE
 BUGWK76489 : compositing/webgl/webgl-reflection.html = IMAGE
 
+// Needs ENABLE_SHADOW_DOM
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT
+
 // Our slow tests, in alphabetical order.
 BUGWK57672 : http/tests/local/fileapi/send-sliced-dragged-file.html = TEXT PASS
 

Modified: trunk/LayoutTests/platform/qt/test_expectations.txt (105916 => 105917)


--- trunk/LayoutTests/platform/qt/test_expectations.txt	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/platform/qt/test_expectations.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -4,6 +4,10 @@
 
 BUGWK64526 DEBUG: svg/animations/svgtransform-animation-1.html = CRASH PASS
 
+// Needs ENABLE_SHADOW_DOM
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT
+
 // Slow tests
 // FIXME: File bugs.
 BUG_QT_SLOW SLOW DEBUG: editing/selection/empty-cell-right-click.html = PASS

Modified: trunk/LayoutTests/platform/win/Skipped (105916 => 105917)


--- trunk/LayoutTests/platform/win/Skipped	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/LayoutTests/platform/win/Skipped	2012-01-25 20:47:34 UTC (rev 105917)
@@ -1499,6 +1499,10 @@
 # Pointer Lock is not implemented.
 pointer-lock/
 
+// Needs ENABLE_SHADOW_DOM
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-api.html = TEXT
+BUGWK76439 DEBUG : fast/dom/shadow/content-element-outside-shadow.html = TEXT
+
 # https://bugs.webkit.org/show_bug.cgi?id=72435
 fast/dom/Window/window-postmessage-arrays.html
 

Modified: trunk/Source/WebCore/CMakeLists.txt (105916 => 105917)


--- trunk/Source/WebCore/CMakeLists.txt	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-01-25 20:47:34 UTC (rev 105917)
@@ -306,6 +306,8 @@
     html/canvas/Uint8Array.idl
     html/canvas/Uint8ClampedArray.idl
 
+    html/shadow/HTMLContentElement.idl
+
     html/track/TextTrackList.idl
     html/track/TrackEvent.idl
 

Modified: trunk/Source/WebCore/ChangeLog (105916 => 105917)


--- trunk/Source/WebCore/ChangeLog	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/ChangeLog	2012-01-25 20:47:34 UTC (rev 105917)
@@ -1,3 +1,35 @@
+2012-01-25  Hajime Morita  <[email protected]>
+
+        <content> should create HTMLContentElement object
+        https://bugs.webkit.org/show_bug.cgi?id=76439
+
+        Reviewed by Dimitri Glazkov.
+
+        - Added HTMLContentElement.idl which has @select attribute.
+        - Added "content" element.
+
+        Both are behind ENABLE_SHADOW_DOM.
+
+        Tests: fast/dom/shadow/content-element-api.html
+               fast/dom/shadow/content-element-outside-shadow.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLTagNames.in:
+        * html/shadow/HTMLContentElement.cpp:
+        (WebCore::contentTagName):
+        (WebCore):
+        (WebCore::HTMLContentElement::create):
+        * html/shadow/HTMLContentElement.h:
+        (HTMLContentElement):
+        * html/shadow/HTMLContentElement.idl: Added.
+
 2012-01-25  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r105828.

Modified: trunk/Source/WebCore/DerivedSources.cpp (105916 => 105917)


--- trunk/Source/WebCore/DerivedSources.cpp	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/DerivedSources.cpp	2012-01-25 20:47:34 UTC (rev 105917)
@@ -146,6 +146,7 @@
 #include "JSHTMLButtonElement.cpp"
 #include "JSHTMLCanvasElement.cpp"
 #include "JSHTMLCollection.cpp"
+#include "JSHTMLContentElement.cpp"
 #include "JSHTMLDataListElement.cpp"
 #include "JSHTMLDetailsElement.cpp"
 #include "JSHTMLDirectoryElement.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (105916 => 105917)


--- trunk/Source/WebCore/DerivedSources.make	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/DerivedSources.make	2012-01-25 20:47:34 UTC (rev 105917)
@@ -36,6 +36,7 @@
     $(WebCore)/fileapi \
     $(WebCore)/html \
     $(WebCore)/html/canvas \
+    $(WebCore)/html/shadow \
     $(WebCore)/html/track \
     $(WebCore)/inspector \
     $(WebCore)/loader/appcache \
@@ -297,6 +298,7 @@
     $(WebCore)/html/canvas/WebGLTexture.idl \
     $(WebCore)/html/canvas/WebGLUniformLocation.idl \
     $(WebCore)/html/canvas/WebGLVertexArrayObjectOES.idl \
+    $(WebCore)/html/shadow/HTMLContentElement.idl \
     $(WebCore)/html/track/TextTrackList.idl \
     $(WebCore)/html/track/TrackEvent.idl \
     $(WebCore)/inspector/InjectedScriptHost.idl \

Modified: trunk/Source/WebCore/DerivedSources.pri (105916 => 105917)


--- trunk/Source/WebCore/DerivedSources.pri	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/DerivedSources.pri	2012-01-25 20:47:34 UTC (rev 105917)
@@ -328,6 +328,7 @@
     $$PWD/html/TimeRanges.idl \
     $$PWD/html/ValidityState.idl \
     $$PWD/html/VoidCallback.idl \
+    $$PWD/html/shadow/HTMLContentElement.idl \
     $$PWD/inspector/InjectedScriptHost.idl \
     $$PWD/inspector/InspectorFrontendHost.idl \
     $$PWD/inspector/_javascript_CallFrame.idl \

Modified: trunk/Source/WebCore/GNUmakefile.am (105916 => 105917)


--- trunk/Source/WebCore/GNUmakefile.am	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/GNUmakefile.am	2012-01-25 20:47:34 UTC (rev 105917)
@@ -753,6 +753,7 @@
     $(WebCore)/fileapi \
     $(WebCore)/html \
     $(WebCore)/html/canvas \
+    $(WebCore)/html/shadow \
     $(WebCore)/html/track \
     $(WebCore)/inspector \
     $(WebCore)/loader/appcache \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (105916 => 105917)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-01-25 20:47:34 UTC (rev 105917)
@@ -218,6 +218,8 @@
 	DerivedSources/WebCore/JSHTMLCanvasElement.h \
 	DerivedSources/WebCore/JSHTMLCollection.cpp \
 	DerivedSources/WebCore/JSHTMLCollection.h \
+	DerivedSources/WebCore/JSHTMLContentElement.cpp \
+	DerivedSources/WebCore/JSHTMLContentElement.h \
 	DerivedSources/WebCore/JSHTMLDataListElement.cpp \
 	DerivedSources/WebCore/JSHTMLDataListElement.h \
 	DerivedSources/WebCore/JSHTMLDetailsElement.cpp \
@@ -859,6 +861,7 @@
 	$(WebCore)/html/canvas/WebGLTexture.idl \
 	$(WebCore)/html/canvas/WebGLUniformLocation.idl \
 	$(WebCore)/html/canvas/WebGLVertexArrayObjectOES.idl \
+	$(WebCore)/html/shadow/HTMLContentElement.idl \
 	$(WebCore)/html/track/TextTrackList.idl \
 	$(WebCore)/html/track/TrackEvent.idl \
 	$(WebCore)/inspector/InjectedScriptHost.idl \

Modified: trunk/Source/WebCore/WebCore.gypi (105916 => 105917)


--- trunk/Source/WebCore/WebCore.gypi	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/WebCore.gypi	2012-01-25 20:47:34 UTC (rev 105917)
@@ -978,6 +978,7 @@
             'html/canvas/WebGLTexture.idl',
             'html/canvas/WebGLUniformLocation.idl',
             'html/canvas/WebGLVertexArrayObjectOES.idl',
+            'html/shadow/HTMLContentElement.idl',
             'html/track/TextTrackList.idl',
             'html/track/TrackEvent.idl',
             'inspector/InjectedScriptHost.idl',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (105916 => 105917)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-01-25 20:47:34 UTC (rev 105917)
@@ -6198,6 +6198,62 @@
 				>
 			</File>
 			<File
+				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLContentElement.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="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLContentElement.h"
+				>
+			</File>
+			<File
 				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataListElement.cpp"
 				>
 				<FileConfiguration

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (105916 => 105917)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-01-25 20:47:34 UTC (rev 105917)
@@ -10395,6 +10395,7 @@
 		A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalSettings.cpp; sourceTree = "<group>"; };
 		A7B4EA7914C9348400C8F5BF /* JSInternalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalSettings.h; sourceTree = "<group>"; };
 		A7B6E69D0B291A9600D0529F /* DragData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragData.h; sourceTree = "<group>"; };
+		A7B7749614CF6353004044BB /* HTMLContentElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLContentElement.idl; sourceTree = "<group>"; };
 		A7BBE26411AFB3F20005EA03 /* JSHTMLMeterElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMeterElement.cpp; sourceTree = "<group>"; };
 		A7BBE26511AFB3F20005EA03 /* JSHTMLMeterElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLMeterElement.h; sourceTree = "<group>"; };
 		A7BF7EDC14C9175A0014489D /* InternalSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InternalSettings.cpp; sourceTree = "<group>"; };
@@ -14267,6 +14268,7 @@
 				A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
 				57B791A714C6A63300F202D1 /* HTMLContentElement.cpp */,
 				57B791A814C6A63300F202D1 /* HTMLContentElement.h */,
+				A7B7749614CF6353004044BB /* HTMLContentElement.idl */,
 				417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
 				417253A91354BBBC00360F2A /* MediaControlElements.h */,
 				4157AF7F12F1FB0400A8C6F5 /* MediaControlRootElement.cpp */,

Modified: trunk/Source/WebCore/html/HTMLTagNames.in (105916 => 105917)


--- trunk/Source/WebCore/html/HTMLTagNames.in	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/html/HTMLTagNames.in	2012-01-25 20:47:34 UTC (rev 105917)
@@ -31,6 +31,7 @@
 col interfaceName=HTMLTableColElement
 colgroup interfaceName=HTMLTableColElement
 command interfaceName=HTMLElement
+content interfaceName=HTMLContentElement, conditional=SHADOW_DOM
 datalist interfaceName=HTMLDataListElement, conditional=DATALIST
 dd interfaceName=HTMLElement
 del interfaceName=HTMLModElement

Modified: trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp (105916 => 105917)


--- trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp	2012-01-25 20:47:34 UTC (rev 105917)
@@ -38,9 +38,23 @@
 
 using HTMLNames::selectAttr;
 
+static const QualifiedName& contentTagName()
+{
+#if ENABLE(SHADOW_DOM)
+    return HTMLNames::contentTag;
+#else
+    DEFINE_STATIC_LOCAL(QualifiedName, tagName, (nullAtom, "webkitShadowContent", HTMLNames::divTag.namespaceURI()));
+    return tagName;
+#endif
+}
+
 PassRefPtr<HTMLContentElement> HTMLContentElement::create(Document* document)
 {
-    DEFINE_STATIC_LOCAL(QualifiedName, tagName, (nullAtom, "webkitShadowContent", HTMLNames::divTag.namespaceURI()));
+    return adoptRef(new HTMLContentElement(contentTagName(), document));
+}
+
+PassRefPtr<HTMLContentElement> HTMLContentElement::create(const QualifiedName& tagName, Document* document)
+{
     return adoptRef(new HTMLContentElement(tagName, document));
 }
 

Modified: trunk/Source/WebCore/html/shadow/HTMLContentElement.h (105916 => 105917)


--- trunk/Source/WebCore/html/shadow/HTMLContentElement.h	2012-01-25 20:37:13 UTC (rev 105916)
+++ trunk/Source/WebCore/html/shadow/HTMLContentElement.h	2012-01-25 20:47:34 UTC (rev 105917)
@@ -44,6 +44,7 @@
 // You should create HTMLContentElement during the host construction.
 class HTMLContentElement : public HTMLElement {
 public:
+    static PassRefPtr<HTMLContentElement> create(const QualifiedName&, Document*);
     static PassRefPtr<HTMLContentElement> create(Document*);
 
     virtual ~HTMLContentElement();

Added: trunk/Source/WebCore/html/shadow/HTMLContentElement.idl (0 => 105917)


--- trunk/Source/WebCore/html/shadow/HTMLContentElement.idl	                        (rev 0)
+++ trunk/Source/WebCore/html/shadow/HTMLContentElement.idl	2012-01-25 20:47:34 UTC (rev 105917)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+module html {
+    interface [
+        Conditional=SHADOW_DOM,
+        EnabledAtRuntime=shadowDOM
+    ] HTMLContentElement : HTMLElement {
+        attribute [Reflect] DOMString select;
+    };
+}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to