td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Oct 2015 19:38:12 +0000 (19:38 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Oct 2015 19:38:12 +0000 (19:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148859
<rdar://problem/22588664>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/interfaces-expected.txt:

Source/WebCore:

td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
as per the latest HTML specification:
https://html.spec.whatwg.org/multipage/tables.html#htmltabledatacellelement
https://html.spec.whatwg.org/multipage/tables.html#htmltableheadercellelement

This patch aligns our behavior with the specification and IE. Firefox and Chrome do not
seem to expose HTMLTableDataCellElement / HTMLTableHeaderCellElement at this time.

The compatibility risk is low, given that the API stays the same and those new
interfaces inherit the pre-existing HTMLTableCellElement interface.

No new tests, already covered by existing tests.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::HTMLTableCellElement):
(WebCore::HTMLTableCellElement::colSpan): Deleted.
* html/HTMLTableCellElement.h:
* html/HTMLTableCellElement.idl:
* html/HTMLTableDataCellElement.h: Added.
* html/HTMLTableDataCellElement.idl: Added.
* html/HTMLTableHeaderCellElement.h: Added.
* html/HTMLTableHeaderCellElement.idl: Added.
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::insertCell):
* html/HTMLTagNames.in:

LayoutTests:

Rebaseline existing tests now that new HTMLTableDataCellElement / HTMLTableHeaderCellElement
types are exposed.

* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

29 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/wrapper-classes-expected.txt
LayoutTests/fast/dom/wrapper-classes.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt
LayoutTests/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLTableCellElement.cpp
Source/WebCore/html/HTMLTableCellElement.h
Source/WebCore/html/HTMLTableCellElement.idl
Source/WebCore/html/HTMLTableDataCellElement.h [new file with mode: 0644]
Source/WebCore/html/HTMLTableDataCellElement.idl [new file with mode: 0644]
Source/WebCore/html/HTMLTableHeaderCellElement.h [new file with mode: 0644]
Source/WebCore/html/HTMLTableHeaderCellElement.idl [new file with mode: 0644]
Source/WebCore/html/HTMLTableRowElement.cpp
Source/WebCore/html/HTMLTagNames.in

index e94a2b8b0757ce1fad13d2d3974d3cdc15109b68..bbe876bc56355db6b9c7827420723113369c2708 100644 (file)
@@ -1,3 +1,24 @@
+2015-10-17  Chris Dumez  <cdumez@apple.com>
+
+        td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
+        https://bugs.webkit.org/show_bug.cgi?id=148859
+        <rdar://problem/22588664>
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline existing tests now that new HTMLTableDataCellElement / HTMLTableHeaderCellElement
+        types are exposed.
+
+        * fast/dom/wrapper-classes-expected.txt:
+        * fast/dom/wrapper-classes.html:
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+
 2015-10-16  Alexey Proskuryakov  <ap@apple.com>
 
         Remove [ Debug ] qualifiers from expectations for some imported Blink test,
index 692ba705fed83b295a2708d5e73606b0e6a01a02..1f5e52e88d7b639495c6d3a4092ff97b91520dfe 100644 (file)
@@ -449,18 +449,18 @@ PASS tagJSWrapperConstructorClass('table') is 'HTMLTableElementConstructor'
 PASS tagJSWrapperClass('tbody') is 'HTMLTableSectionElement'
 PASS tagJSWrapperPrototypeClass('tbody') is 'HTMLTableSectionElementPrototype'
 PASS tagJSWrapperConstructorClass('tbody') is 'HTMLTableSectionElementConstructor'
-PASS tagJSWrapperClass('td') is 'HTMLTableCellElement'
-PASS tagJSWrapperPrototypeClass('td') is 'HTMLTableCellElementPrototype'
-PASS tagJSWrapperConstructorClass('td') is 'HTMLTableCellElementConstructor'
+PASS tagJSWrapperClass('td') is 'HTMLTableDataCellElement'
+PASS tagJSWrapperPrototypeClass('td') is 'HTMLTableDataCellElementPrototype'
+PASS tagJSWrapperConstructorClass('td') is 'HTMLTableDataCellElementConstructor'
 PASS tagJSWrapperClass('textarea') is 'HTMLTextAreaElement'
 PASS tagJSWrapperPrototypeClass('textarea') is 'HTMLTextAreaElementPrototype'
 PASS tagJSWrapperConstructorClass('textarea') is 'HTMLTextAreaElementConstructor'
 PASS tagJSWrapperClass('tfoot') is 'HTMLTableSectionElement'
 PASS tagJSWrapperPrototypeClass('tfoot') is 'HTMLTableSectionElementPrototype'
 PASS tagJSWrapperConstructorClass('tfoot') is 'HTMLTableSectionElementConstructor'
-PASS tagJSWrapperClass('th') is 'HTMLTableCellElement'
-PASS tagJSWrapperPrototypeClass('th') is 'HTMLTableCellElementPrototype'
-PASS tagJSWrapperConstructorClass('th') is 'HTMLTableCellElementConstructor'
+PASS tagJSWrapperClass('th') is 'HTMLTableHeaderCellElement'
+PASS tagJSWrapperPrototypeClass('th') is 'HTMLTableHeaderCellElementPrototype'
+PASS tagJSWrapperConstructorClass('th') is 'HTMLTableHeaderCellElementConstructor'
 PASS tagJSWrapperClass('thead') is 'HTMLTableSectionElement'
 PASS tagJSWrapperPrototypeClass('thead') is 'HTMLTableSectionElementPrototype'
 PASS tagJSWrapperConstructorClass('thead') is 'HTMLTableSectionElementConstructor'
index ff81d8f9050440dc1e31d3083355c663129c9632..46f2063713c1e1ecd7844f39463bf09633c0a05d 100644 (file)
@@ -248,10 +248,10 @@ function runTest()
     testTag("sup", "HTMLElement");
     testTag("table", "HTMLTableElement");
     testTag("tbody", "HTMLTableSectionElement");
-    testTag("td", "HTMLTableCellElement");
+    testTag("td", "HTMLTableDataCellElement");
     testTag("textarea", "HTMLTextAreaElement");
     testTag("tfoot", "HTMLTableSectionElement");
-    testTag("th", "HTMLTableCellElement");
+    testTag("th", "HTMLTableHeaderCellElement");
     testTag("thead", "HTMLTableSectionElement");
     testTag("title", "HTMLTitleElement");
     testTag("tr", "HTMLTableRowElement");
index 86d0b54f566100fde185c898fffc90740d8e1849..acbffaf704ed6728d80b0bd3aa3fb6cdda6e61ed 100644 (file)
@@ -1,3 +1,14 @@
+2015-10-17  Chris Dumez  <cdumez@apple.com>
+
+        td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
+        https://bugs.webkit.org/show_bug.cgi?id=148859
+        <rdar://problem/22588664>
+
+        Reviewed by Ryosuke Niwa.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+        * web-platform-tests/html/semantics/interfaces-expected.txt:
+
 2015-10-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         Update testharness.js to web-platform-tests version
index 7f3d41221ba34816597e2107d109fd18a0cc0c5a..2eb94e78358a59225596d09bd5e74b060d9dfa9c 100644 (file)
@@ -397,6 +397,9 @@ CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'ch' on a non-
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'chOff' on a non-HTMLTableRowElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'vAlign' on a non-HTMLTableRowElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'bgColor' on a non-HTMLTableRowElement object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'abbr' on a non-HTMLTableDataCellElement object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'scope' on a non-HTMLTableHeaderCellElement object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'abbr' on a non-HTMLTableHeaderCellElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'colSpan' on a non-HTMLTableCellElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'rowSpan' on a non-HTMLTableCellElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'headers' on a non-HTMLTableCellElement object.
@@ -3980,13 +3983,15 @@ PASS HTMLTableRowElement interface: document.createElement("tr") must inherit pr
 PASS HTMLTableRowElement interface: document.createElement("tr") must inherit property "chOff" with the proper type (7) 
 PASS HTMLTableRowElement interface: document.createElement("tr") must inherit property "vAlign" with the proper type (8) 
 PASS HTMLTableRowElement interface: document.createElement("tr") must inherit property "bgColor" with the proper type (9) 
-FAIL HTMLTableDataCellElement interface: existence and properties of interface object assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL HTMLTableDataCellElement interface object length assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL HTMLTableDataCellElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL HTMLTableDataCellElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL HTMLTableDataCellElement interface: attribute abbr assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL HTMLTableDataCellElement must be primary interface of document.createElement("td") assert_own_property: self does not have own property "HTMLTableDataCellElement" expected property "HTMLTableDataCellElement" missing
-FAIL Stringification of document.createElement("td") assert_equals: class string of document.createElement("td") expected "[object HTMLTableDataCellElement]" but got "[object HTMLTableCellElement]"
+FAIL HTMLTableDataCellElement interface: existence and properties of interface object assert_equals: class string of HTMLTableDataCellElement expected "[object Function]" but got "[object HTMLTableDataCellElementConstructor]"
+PASS HTMLTableDataCellElement interface object length 
+PASS HTMLTableDataCellElement interface: existence and properties of interface prototype object 
+FAIL HTMLTableDataCellElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLTableDataCellElement.prototype.constructor is not writable expected true got false
+FAIL HTMLTableDataCellElement interface: attribute abbr assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+PASS HTMLTableDataCellElement must be primary interface of document.createElement("td") 
+PASS Stringification of document.createElement("td") 
 PASS HTMLTableDataCellElement interface: document.createElement("td") must inherit property "abbr" with the proper type (0) 
 PASS HTMLTableCellElement interface: document.createElement("td") must inherit property "colSpan" with the proper type (0) 
 PASS HTMLTableCellElement interface: document.createElement("td") must inherit property "rowSpan" with the proper type (1) 
@@ -4001,16 +4006,20 @@ PASS HTMLTableCellElement interface: document.createElement("td") must inherit p
 PASS HTMLTableCellElement interface: document.createElement("td") must inherit property "noWrap" with the proper type (10) 
 PASS HTMLTableCellElement interface: document.createElement("td") must inherit property "vAlign" with the proper type (11) 
 PASS HTMLTableCellElement interface: document.createElement("td") must inherit property "bgColor" with the proper type (12) 
-FAIL HTMLTableHeaderCellElement interface: existence and properties of interface object assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface object length assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: attribute scope assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: attribute abbr assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: attribute sorted assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement interface: operation sort() assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL HTMLTableHeaderCellElement must be primary interface of document.createElement("th") assert_own_property: self does not have own property "HTMLTableHeaderCellElement" expected property "HTMLTableHeaderCellElement" missing
-FAIL Stringification of document.createElement("th") assert_equals: class string of document.createElement("th") expected "[object HTMLTableHeaderCellElement]" but got "[object HTMLTableCellElement]"
+FAIL HTMLTableHeaderCellElement interface: existence and properties of interface object assert_equals: class string of HTMLTableHeaderCellElement expected "[object Function]" but got "[object HTMLTableHeaderCellElementConstructor]"
+PASS HTMLTableHeaderCellElement interface object length 
+PASS HTMLTableHeaderCellElement interface: existence and properties of interface prototype object 
+FAIL HTMLTableHeaderCellElement interface: existence and properties of interface prototype object's "constructor" property assert_true: HTMLTableHeaderCellElement.prototype.constructor is not writable expected true got false
+FAIL HTMLTableHeaderCellElement interface: attribute scope assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL HTMLTableHeaderCellElement interface: attribute abbr assert_throws: getting property on prototype object must throw TypeError function "function () {
+    [native code]
+}" did not throw
+FAIL HTMLTableHeaderCellElement interface: attribute sorted assert_true: The prototype object must have a property "sorted" expected true got false
+FAIL HTMLTableHeaderCellElement interface: operation sort() assert_own_property: interface prototype object missing non-static operation expected property "sort" missing
+PASS HTMLTableHeaderCellElement must be primary interface of document.createElement("th") 
+PASS Stringification of document.createElement("th") 
 PASS HTMLTableHeaderCellElement interface: document.createElement("th") must inherit property "scope" with the proper type (0) 
 PASS HTMLTableHeaderCellElement interface: document.createElement("th") must inherit property "abbr" with the proper type (1) 
 FAIL HTMLTableHeaderCellElement interface: document.createElement("th") must inherit property "sorted" with the proper type (2) assert_inherits: property "sorted" not found in prototype chain
index 023996e6acb8d229a483c9bef3546f9628e5e259..04be10014ed33f8e7bec880ae9653248efdd658c 100644 (file)
@@ -185,14 +185,14 @@ PASS Interfaces for table
 PASS Interfaces for TABLE 
 PASS Interfaces for tbody 
 PASS Interfaces for TBODY 
-FAIL Interfaces for td assert_equals: Element td should have HTMLTableDataCellElement as its primary interface. expected "[object HTMLTableDataCellElement]" but got "[object HTMLTableCellElement]"
-FAIL Interfaces for TD assert_equals: Element TD should have HTMLTableDataCellElement as its primary interface. expected "[object HTMLTableDataCellElement]" but got "[object HTMLTableCellElement]"
+PASS Interfaces for td 
+PASS Interfaces for TD 
 PASS Interfaces for textarea 
 PASS Interfaces for TEXTAREA 
 PASS Interfaces for tfoot 
 PASS Interfaces for TFOOT 
-FAIL Interfaces for th assert_equals: Element th should have HTMLTableHeaderCellElement as its primary interface. expected "[object HTMLTableHeaderCellElement]" but got "[object HTMLTableCellElement]"
-FAIL Interfaces for TH assert_equals: Element TH should have HTMLTableHeaderCellElement as its primary interface. expected "[object HTMLTableHeaderCellElement]" but got "[object HTMLTableCellElement]"
+PASS Interfaces for th 
+PASS Interfaces for TH 
 PASS Interfaces for thead 
 PASS Interfaces for THEAD 
 PASS Interfaces for title 
index 982d195950a500a3d80d75d0ffaea601ec466534..9f75d4e156568956fdcae225c29496debd7ea49f 100644 (file)
@@ -678,11 +678,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index 9bc3bd97a411c71a6248cfedd406501e1bcc906d..faaba87e45da47c054326227241f784290c09556 100644 (file)
@@ -693,11 +693,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index f1f84a002369b2001f66af8cb58b097b7b5b1e85..733f67280d0c9a4529360a3ad6136805d4ae8e4d 100644 (file)
@@ -693,11 +693,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index 257d9b4662dc0c2759e5e9cf5084c1d0b55ac624..eefdfe01f1916f95fc778094fca17beaa48b4d91 100644 (file)
@@ -693,11 +693,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index 134d847432d75f443f707280b15480773cd71ceb..b3bc32ee941267770944a6755af9ecf710f7937b 100644 (file)
@@ -693,11 +693,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index 176437449076f84fe26a4e150c950079bb861f5f..085fbe69c1e88d3fdc98ca0265b0afb178ef36d6 100644 (file)
@@ -693,11 +693,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index bcb4a23960889923ed55b1dd8b31515dcf6cb03f..932d37e49a39d18dcf8ae46719498cec2b1dbded 100644 (file)
@@ -613,11 +613,21 @@ PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProper
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableColElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').value is HTMLTableDataCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableDataCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').value is HTMLTableElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableElement').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').value is HTMLTableHeaderCellElement
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableHeaderCellElement').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').value is HTMLTableRowElement
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'HTMLTableRowElement').hasOwnProperty('set') is false
index d6f5f1a090cc63f1c3814714e2d3914dfccee10a..d564bc495c62034a0b1092e92c6bd0e2bfd569ba 100644 (file)
@@ -517,7 +517,9 @@ set(WebCore_NON_SVG_IDL_FILES
     html/HTMLTableCaptionElement.idl
     html/HTMLTableCellElement.idl
     html/HTMLTableColElement.idl
+    html/HTMLTableDataCellElement.idl
     html/HTMLTableElement.idl
+    html/HTMLTableHeaderCellElement.idl
     html/HTMLTableRowElement.idl
     html/HTMLTableSectionElement.idl
     html/HTMLTemplateElement.idl
index 8e2481fbb696d74e0c3cb6b769598663bc15547f..36b71540b0c007f86ce6c8eee32aef79e7e58ade 100644 (file)
@@ -1,3 +1,43 @@
+2015-10-17  Chris Dumez  <cdumez@apple.com>
+
+        td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
+        https://bugs.webkit.org/show_bug.cgi?id=148859
+        <rdar://problem/22588664>
+
+        Reviewed by Ryosuke Niwa.
+
+        td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
+        as per the latest HTML specification:
+        https://html.spec.whatwg.org/multipage/tables.html#htmltabledatacellelement
+        https://html.spec.whatwg.org/multipage/tables.html#htmltableheadercellelement
+
+        This patch aligns our behavior with the specification and IE. Firefox and Chrome do not
+        seem to expose HTMLTableDataCellElement / HTMLTableHeaderCellElement at this time.
+
+        The compatibility risk is low, given that the API stays the same and those new
+        interfaces inherit the pre-existing HTMLTableCellElement interface.
+
+        No new tests, already covered by existing tests.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLTableCellElement.cpp:
+        (WebCore::HTMLTableCellElement::HTMLTableCellElement):
+        (WebCore::HTMLTableCellElement::colSpan): Deleted.
+        * html/HTMLTableCellElement.h:
+        * html/HTMLTableCellElement.idl:
+        * html/HTMLTableDataCellElement.h: Added.
+        * html/HTMLTableDataCellElement.idl: Added.
+        * html/HTMLTableHeaderCellElement.h: Added.
+        * html/HTMLTableHeaderCellElement.idl: Added.
+        * html/HTMLTableRowElement.cpp:
+        (WebCore::HTMLTableRowElement::insertCell):
+        * html/HTMLTagNames.in:
+
 2015-10-17  Zalan Bujtas  <zalan@apple.com>
 
         RenderBlockFlow::xPositionForFloatIncludingMargin/yPositionForFloatIncludingMargin/flipFloatForWritingModeForChild
index 4b2d104b2b07c3125d59e77230d891194d33ccc4..3633d71df6e76529a8c4a8932c5bd5258c60168b 100644 (file)
 #include "JSHTMLTableCaptionElement.cpp"
 #include "JSHTMLTableCellElement.cpp"
 #include "JSHTMLTableColElement.cpp"
+#include "JSHTMLTableDataCellElement.cpp"
 #include "JSHTMLTableElement.cpp"
+#include "JSHTMLTableHeaderCellElement.cpp"
 #include "JSHTMLTableRowElement.cpp"
 #include "JSHTMLTableSectionElement.cpp"
 #if ENABLE(TEMPLATE_ELEMENT)
index 46654f2ad31889db34257bfd8c8fac93e2df04b5..4df4ab502668da576a81e8b8e523045313923476 100644 (file)
@@ -407,7 +407,9 @@ NON_SVG_BINDING_IDLS = \
     $(WebCore)/html/HTMLTableCaptionElement.idl \
     $(WebCore)/html/HTMLTableCellElement.idl \
     $(WebCore)/html/HTMLTableColElement.idl \
+    $(WebCore)/html/HTMLTableDataCellElement.idl \
     $(WebCore)/html/HTMLTableElement.idl \
+    $(WebCore)/html/HTMLTableHeaderCellElement.idl \
     $(WebCore)/html/HTMLTableRowElement.idl \
     $(WebCore)/html/HTMLTableSectionElement.idl \
     $(WebCore)/html/HTMLTemplateElement.idl \
index 34a657501047108c9a8c45b38e1b53092cfe6587..bdd4607ac60e8eb5d6b689e588560ce4f4b0570c 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableDataCellElement.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="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableElement.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableHeaderCellElement.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="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableRowElement.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
index ade8d1b60cff403806b53ae8fddd43e054a9517e..fc7e4458a2c2c5f13a3febf797025ae2bd1df393 100644 (file)
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableColElement.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableDataCellElement.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableElement.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableHeaderCellElement.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableRowElement.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableColElement.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableDataCellElement.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableElement.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableHeaderCellElement.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSHTMLTableRowElement.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
index 535555fb9e14555ddcc65f593d3aa9d01316e655..90bcd64bdb4a83f68845bf0926f0dc381a192a65 100644 (file)
                8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8348BFAA1B85729500912F36 /* ClassCollection.h */; };
                83520C7E1A71BFCC006BD2AA /* CSSFontFamily.h in Headers */ = {isa = PBXBuildFile; fileRef = 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */; };
                835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D363619FF6193004C93AB /* StyleBuilderCustom.h */; };
+               836BAD211BD1CA670037356A /* HTMLTableHeaderCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */; };
+               836BAD221BD1CA670037356A /* HTMLTableDataCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836BAD201BD1CA670037356A /* HTMLTableDataCellElement.h */; };
+               836CB1F61BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836CB1F21BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h */; };
+               836CB1F71BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836CB1F31BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp */; };
+               836CB1F81BD1E41800AF1591 /* JSHTMLTableDataCellElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 836CB1F41BD1E41800AF1591 /* JSHTMLTableDataCellElement.h */; };
+               836CB1F91BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836CB1F51BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp */; };
                836FBCEA178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */; };
                836FBCEC178C117F00B21A15 /* SVGAnimatedProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */; };
                837131781BAB7A720009363B /* JSDOMTokenListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 837131771BAB7A720009363B /* JSDOMTokenListCustom.cpp */; };
                83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFamily.h; sourceTree = "<group>"; };
                835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = "<group>"; };
                8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NonDocumentTypeChildNode.idl; sourceTree = "<group>"; };
+               836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTableHeaderCellElement.h; sourceTree = "<group>"; };
+               836BAD201BD1CA670037356A /* HTMLTableDataCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTableDataCellElement.h; sourceTree = "<group>"; };
+               836CB1F21BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLTableHeaderCellElement.h; sourceTree = "<group>"; };
+               836CB1F31BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTableHeaderCellElement.cpp; sourceTree = "<group>"; };
+               836CB1F41BD1E41800AF1591 /* JSHTMLTableDataCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLTableDataCellElement.h; sourceTree = "<group>"; };
+               836CB1F51BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTableDataCellElement.cpp; sourceTree = "<group>"; };
                836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = "<group>"; };
                836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = "<group>"; };
                837131771BAB7A720009363B /* JSDOMTokenListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMTokenListCustom.cpp; sourceTree = "<group>"; };
                83E359A11BB1031D002CEB98 /* JSHTMLTimeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTimeElement.cpp; sourceTree = "<group>"; };
                83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = "<group>"; };
                83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
+               83FE5F1F1BD1C55E0038BEEC /* HTMLTableHeaderCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableHeaderCellElement.idl; sourceTree = "<group>"; };
+               83FE5F201BD1C55E0038BEEC /* HTMLTableDataCellElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTableDataCellElement.idl; sourceTree = "<group>"; };
                8419D2A4120D92D000141F8F /* SVGPathByteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStream.h; sourceTree = "<group>"; };
                8419D2A5120D92D000141F8F /* SVGPathByteStreamBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathByteStreamBuilder.cpp; sourceTree = "<group>"; };
                8419D2A6120D92D000141F8F /* SVGPathByteStreamBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStreamBuilder.h; sourceTree = "<group>"; };
                                A871DB1B0A150BD600B12A68 /* HTMLTableColElement.cpp */,
                                A871DB210A150BD600B12A68 /* HTMLTableColElement.h */,
                                855542590AA48B1E00BA89F2 /* HTMLTableColElement.idl */,
+                               836BAD201BD1CA670037356A /* HTMLTableDataCellElement.h */,
+                               83FE5F201BD1C55E0038BEEC /* HTMLTableDataCellElement.idl */,
                                A871DB1A0A150BD600B12A68 /* HTMLTableElement.cpp */,
                                A871DB190A150BD600B12A68 /* HTMLTableElement.h */,
                                8555425A0AA48B1E00BA89F2 /* HTMLTableElement.idl */,
+                               836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */,
+                               83FE5F1F1BD1C55E0038BEEC /* HTMLTableHeaderCellElement.idl */,
                                A871DB1F0A150BD600B12A68 /* HTMLTablePartElement.cpp */,
                                A871DB1E0A150BD600B12A68 /* HTMLTablePartElement.h */,
                                A871DB220A150BD600B12A68 /* HTMLTableRowElement.cpp */,
                                BC06EDE20BFD6D0D00856E9D /* JSHTMLTableCellElement.h */,
                                BC06ED990BFD660600856E9D /* JSHTMLTableColElement.cpp */,
                                BC06ED9A0BFD660600856E9D /* JSHTMLTableColElement.h */,
+                               836CB1F51BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp */,
+                               836CB1F41BD1E41800AF1591 /* JSHTMLTableDataCellElement.h */,
                                BC06EE020BFD71AA00856E9D /* JSHTMLTableElement.cpp */,
                                BC06EE030BFD71AA00856E9D /* JSHTMLTableElement.h */,
+                               836CB1F31BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp */,
+                               836CB1F21BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h */,
                                BC06ED9B0BFD660600856E9D /* JSHTMLTableRowElement.cpp */,
                                BC06ED9C0BFD660600856E9D /* JSHTMLTableRowElement.h */,
                                BC06ED040BFD5BAE00856E9D /* JSHTMLTableSectionElement.cpp */,
                                E125F82C1822CFEC00D84CD9 /* CryptoAlgorithmSHA1.h in Headers */,
                                E19AC3EF1824DC7900349426 /* CryptoAlgorithmSHA224.h in Headers */,
                                E19AC3F11824DC7900349426 /* CryptoAlgorithmSHA256.h in Headers */,
+                               836CB1F81BD1E41800AF1591 /* JSHTMLTableDataCellElement.h in Headers */,
                                E19AC3F31824DC7900349426 /* CryptoAlgorithmSHA384.h in Headers */,
                                E19AC3F51824DC7900349426 /* CryptoAlgorithmSHA512.h in Headers */,
                                E1FE136718343A1000892F13 /* CryptoDigest.h in Headers */,
                                8542A7930AE5C93F00DF58DF /* JSSVGRect.h in Headers */,
                                B2FA3DEE0AB75A6F000E5AC4 /* JSSVGRectElement.h in Headers */,
                                B2FA3DF10AB75A6F000E5AC4 /* JSSVGRenderingIntent.h in Headers */,
+                               836CB1F61BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.h in Headers */,
                                B2FA3DF30AB75A6F000E5AC4 /* JSSVGScriptElement.h in Headers */,
                                B2FA3DF50AB75A6F000E5AC4 /* JSSVGSetElement.h in Headers */,
                                B2FA3DF70AB75A6F000E5AC4 /* JSSVGStopElement.h in Headers */,
                                9393E605151A9A1800066F06 /* StyleCachedImageSet.h in Headers */,
                                9DAC7C571AF2CB6400437C44 /* StyleContentAlignmentData.h in Headers */,
                                BC779E171BB227CA00CAA8BF /* StyleCustomPropertyData.h in Headers */,
+                               836BAD211BD1CA670037356A /* HTMLTableHeaderCellElement.h in Headers */,
                                BC5EB67F0E81D4A700B25965 /* StyleDashboardRegion.h in Headers */,
                                A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */,
                                BC5EB8B90E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.h in Headers */,
                                43A625F813B3304000AC94B8 /* SVGAnimatedColor.h in Headers */,
                                08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */,
                                71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */,
+                               836BAD221BD1CA670037356A /* HTMLTableDataCellElement.h in Headers */,
                                0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */,
                                71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */,
                                089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */,
                                5824ABAA1AE849C8009074B7 /* RenderTreePosition.cpp in Sources */,
                                E44614510CD68A3500FADA75 /* RenderVideo.cpp in Sources */,
                                BCEA4867097D93020094C9E4 /* RenderView.cpp in Sources */,
+                               836CB1F71BD1E41800AF1591 /* JSHTMLTableHeaderCellElement.cpp in Sources */,
                                BE20507D18A458BF0080647E /* RenderVTTCue.cpp in Sources */,
                                A871DFE50A15376B00B12A68 /* RenderWidget.cpp in Sources */,
                                F5528DA61AC1033E000EF7AD /* ReplaceDeleteFromTextNodeCommand.cpp in Sources */,
                                A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */,
                                BCDFD48F0E305290009D10AD /* XMLHttpRequestUpload.cpp in Sources */,
                                A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */,
+                               836CB1F91BD1E41800AF1591 /* JSHTMLTableDataCellElement.cpp in Sources */,
                                E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */,
                                1ACE53EA0A8D18E70022947D /* XMLSerializer.cpp in Sources */,
                                5905ADBF1302F3CE00F116DF /* XMLTreeViewer.cpp in Sources */,
index 61ab9e6986ce328abf8c0764a4473bf1875bf003..9e8a399d3278877241169745fed9fd2d460f7333 100644 (file)
@@ -38,14 +38,10 @@ static const int maxRowspan = 8190;
 
 using namespace HTMLNames;
 
-inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName, Document& document)
+HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tagName, Document& document)
     : HTMLTablePartElement(tagName, document)
 {
-}
-
-Ref<HTMLTableCellElement> HTMLTableCellElement::create(const QualifiedName& tagName, Document& document)
-{
-    return adoptRef(*new HTMLTableCellElement(tagName, document));
+    ASSERT(tagName == thTag || tagName == tdTag);
 }
 
 int HTMLTableCellElement::colSpan() const
index d9d9b748bc6fec4d6ab1043564a422e1805c9860..5d238a8548404ae0dd3be3f180ee367038c1bf90 100644 (file)
 
 namespace WebCore {
 
-class HTMLTableCellElement final : public HTMLTablePartElement {
+class HTMLTableCellElement : public HTMLTablePartElement {
 public:
-    static Ref<HTMLTableCellElement> create(const QualifiedName&, Document&);
-
     int cellIndex() const;
     int colSpan() const;
     int rowSpan() const;
@@ -49,7 +47,7 @@ public:
 
     WEBCORE_EXPORT HTMLTableCellElement* cellAbove() const;
 
-private:
+protected:
     HTMLTableCellElement(const QualifiedName&, Document&);
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
index ca04630bd767daa44f8315e30819fdbe38800ad0..b76ba258fdc65c6fbc7cfce2c0864b298691b6a1 100644 (file)
@@ -20,7 +20,6 @@
 
 interface HTMLTableCellElement : HTMLElement {
     readonly attribute long cellIndex;
-    [Reflect] attribute DOMString abbr;
     [Reflect] attribute DOMString align;
     [Reflect] attribute DOMString axis;
     [Reflect] attribute DOMString bgColor;
@@ -35,8 +34,12 @@ interface HTMLTableCellElement : HTMLElement {
     [Reflect] attribute DOMString height;
     [Reflect] attribute boolean noWrap;
     attribute long rowSpan;
-    [Reflect] attribute DOMString scope;
     [Reflect] attribute DOMString vAlign;
     [Reflect] attribute DOMString width;
+
+#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
+    [Reflect] attribute DOMString abbr;
+    [Reflect] attribute DOMString scope;
+#endif
 };
 
diff --git a/Source/WebCore/html/HTMLTableDataCellElement.h b/Source/WebCore/html/HTMLTableDataCellElement.h
new file mode 100644 (file)
index 0000000..29ce1cd
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2015 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 HTMLTableDataCellElement_h
+#define HTMLTableDataCellElement_h
+
+#include "HTMLNames.h"
+#include "HTMLTableCellElement.h"
+
+namespace WebCore {
+
+class HTMLTableDataCellElement final : public HTMLTableCellElement {
+public:
+    static Ref<HTMLTableDataCellElement> create(Document& document)
+    {
+        return adoptRef(*new HTMLTableDataCellElement(HTMLNames::tdTag, document));
+    }
+
+    static Ref<HTMLTableDataCellElement> create(const QualifiedName& tagName, Document& document)
+    {
+        ASSERT(tagName == HTMLNames::tdTag);
+        return adoptRef(*new HTMLTableDataCellElement(tagName, document));
+    }
+
+private:
+    using HTMLTableCellElement::HTMLTableCellElement;
+};
+
+}
+
+#endif // HTMLTableDataCellElement_h
+
diff --git a/Source/WebCore/html/HTMLTableDataCellElement.idl b/Source/WebCore/html/HTMLTableDataCellElement.idl
new file mode 100644 (file)
index 0000000..6a66e8d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2015 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 INC. 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.
+ */
+
+interface HTMLTableDataCellElement : HTMLTableCellElement {
+    // Legacy attributes that were kept for backward compatibility.
+    [Reflect] attribute DOMString abbr;
+    [Reflect] attribute DOMString scope;
+};
diff --git a/Source/WebCore/html/HTMLTableHeaderCellElement.h b/Source/WebCore/html/HTMLTableHeaderCellElement.h
new file mode 100644 (file)
index 0000000..d4d9290
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2015 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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 HTMLTableHeaderCellElement_h
+#define HTMLTableHeaderCellElement_h
+
+#include "HTMLNames.h"
+#include "HTMLTableCellElement.h"
+
+namespace WebCore {
+
+class HTMLTableHeaderCellElement final : public HTMLTableCellElement {
+public:
+    static Ref<HTMLTableHeaderCellElement> create(Document& document)
+    {
+        return adoptRef(*new HTMLTableHeaderCellElement(HTMLNames::thTag, document));
+    }
+
+    static Ref<HTMLTableHeaderCellElement> create(const QualifiedName& tagName, Document& document)
+    {
+        ASSERT(tagName == HTMLNames::thTag);
+        return adoptRef(*new HTMLTableHeaderCellElement(tagName, document));
+    }
+
+private:
+    using HTMLTableCellElement::HTMLTableCellElement;
+};
+
+}
+
+#endif // HTMLTableHeaderCellElement_h
+
diff --git a/Source/WebCore/html/HTMLTableHeaderCellElement.idl b/Source/WebCore/html/HTMLTableHeaderCellElement.idl
new file mode 100644 (file)
index 0000000..83b5e0f
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2015 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 INC. 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.
+ */
+
+interface HTMLTableHeaderCellElement : HTMLTableCellElement {
+    [Reflect] attribute DOMString abbr;
+    [Reflect] attribute DOMString scope;
+};
index 9030c52936f95c5fe92e9a83c1a99667498739ea..28cdda85e03304799c15e7d63dab445cb21c57d4 100644 (file)
@@ -28,6 +28,7 @@
 #include "ExceptionCode.h"
 #include "GenericCachedHTMLCollection.h"
 #include "HTMLNames.h"
+#include "HTMLTableDataCellElement.h"
 #include "HTMLTableElement.h"
 #include "HTMLTableSectionElement.h"
 #include "NodeList.h"
@@ -111,7 +112,7 @@ RefPtr<HTMLTableCellElement> HTMLTableRowElement::insertCell(int index, Exceptio
         return nullptr;
     }
 
-    Ref<HTMLTableCellElement> cell = HTMLTableCellElement::create(tdTag, document());
+    auto cell = HTMLTableDataCellElement::create(document());
     if (index < 0 || index >= numCells)
         appendChild(cell.copyRef(), ec);
     else {
index d1dc5667fd88445db6dbc1a935d3ee70c60f209a..95c8343c1dc6f8c8706812daaa06823666cb10eb 100644 (file)
@@ -123,11 +123,11 @@ summary interfaceName=HTMLSummaryElement, JSInterfaceName=HTMLElement, condition
 sup interfaceName=HTMLElement
 table
 tbody interfaceName=HTMLTableSectionElement
-td interfaceName=HTMLTableCellElement
+td interfaceName=HTMLTableDataCellElement
 template conditional=TEMPLATE_ELEMENT
 textarea interfaceName=HTMLTextAreaElement, constructorNeedsFormElement
 tfoot interfaceName=HTMLTableSectionElement
-th interfaceName=HTMLTableCellElement
+th interfaceName=HTMLTableHeaderCellElement
 thead interfaceName=HTMLTableSectionElement
 time
 title