Changeset 196793 in webkit


Ignore:
Timestamp:
Feb 18, 2016 6:45:50 PM (8 years ago)
Author:
Chris Dumez
Message:

HTMLTableHeaderCellElement.scope should only return known values
https://bugs.webkit.org/show_bug.cgi?id=154423
<rdar://problem/24731018>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

  • web-platform-tests/html/dom/reflection-tabular-expected.txt:

Source/WebCore:

HTMLTableHeaderCellElement.scope should only return known values as per:

Known values are document here:

No new tests, already covered by existing test.

  • CMakeLists.txt:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLElementsAllInOne.cpp:
  • html/HTMLTableHeaderCellElement.cpp: Copied from Source/WebCore/html/HTMLTableHeaderCellElement.h.

(WebCore::HTMLTableHeaderCellElement::scope):
(WebCore::HTMLTableHeaderCellElement::setScope):

  • html/HTMLTableHeaderCellElement.h:
  • html/HTMLTableHeaderCellElement.idl:
Location:
trunk
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r196770 r196793  
     12016-02-18  Chris Dumez  <cdumez@apple.com>
     2
     3        HTMLTableHeaderCellElement.scope should only return known values
     4        https://bugs.webkit.org/show_bug.cgi?id=154423
     5        <rdar://problem/24731018>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Rebaseline now that more checks are passing.
     10
     11        * web-platform-tests/html/dom/reflection-tabular-expected.txt:
     12
    1132016-02-18  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt

    r196769 r196793  
    1263512635PASS th.scope: setAttribute() to "" followed by IDL get
    1263612636PASS th.scope: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    12637 FAIL th.scope: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected "" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo "
     12637PASS th.scope: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1263812638PASS th.scope: setAttribute() to undefined followed by getAttribute()
    12639 FAIL th.scope: setAttribute() to undefined followed by IDL get assert_equals: expected "" but got "undefined"
     12639PASS th.scope: setAttribute() to undefined followed by IDL get
    1264012640PASS th.scope: setAttribute() to 7 followed by getAttribute()
    12641 FAIL th.scope: setAttribute() to 7 followed by IDL get assert_equals: expected "" but got "7"
     12641PASS th.scope: setAttribute() to 7 followed by IDL get
    1264212642PASS th.scope: setAttribute() to 1.5 followed by getAttribute()
    12643 FAIL th.scope: setAttribute() to 1.5 followed by IDL get assert_equals: expected "" but got "1.5"
     12643PASS th.scope: setAttribute() to 1.5 followed by IDL get
    1264412644PASS th.scope: setAttribute() to true followed by getAttribute()
    12645 FAIL th.scope: setAttribute() to true followed by IDL get assert_equals: expected "" but got "true"
     12645PASS th.scope: setAttribute() to true followed by IDL get
    1264612646PASS th.scope: setAttribute() to false followed by getAttribute()
    12647 FAIL th.scope: setAttribute() to false followed by IDL get assert_equals: expected "" but got "false"
     12647PASS th.scope: setAttribute() to false followed by IDL get
    1264812648PASS th.scope: setAttribute() to object "[object Object]" followed by getAttribute()
    12649 FAIL th.scope: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "" but got "[object Object]"
     12649PASS th.scope: setAttribute() to object "[object Object]" followed by IDL get
    1265012650PASS th.scope: setAttribute() to NaN followed by getAttribute()
    12651 FAIL th.scope: setAttribute() to NaN followed by IDL get assert_equals: expected "" but got "NaN"
     12651PASS th.scope: setAttribute() to NaN followed by IDL get
    1265212652PASS th.scope: setAttribute() to Infinity followed by getAttribute()
    12653 FAIL th.scope: setAttribute() to Infinity followed by IDL get assert_equals: expected "" but got "Infinity"
     12653PASS th.scope: setAttribute() to Infinity followed by IDL get
    1265412654PASS th.scope: setAttribute() to -Infinity followed by getAttribute()
    12655 FAIL th.scope: setAttribute() to -Infinity followed by IDL get assert_equals: expected "" but got "-Infinity"
     12655PASS th.scope: setAttribute() to -Infinity followed by IDL get
    1265612656PASS th.scope: setAttribute() to "\0" followed by getAttribute()
    12657 FAIL th.scope: setAttribute() to "\0" followed by IDL get assert_equals: expected "" but got "\0"
     12657PASS th.scope: setAttribute() to "\0" followed by IDL get
    1265812658PASS th.scope: setAttribute() to null followed by getAttribute()
    12659 FAIL th.scope: setAttribute() to null followed by IDL get assert_equals: expected "" but got "null"
     12659PASS th.scope: setAttribute() to null followed by IDL get
    1266012660PASS th.scope: setAttribute() to object "test-toString" followed by getAttribute()
    12661 FAIL th.scope: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "" but got "test-toString"
     12661PASS th.scope: setAttribute() to object "test-toString" followed by IDL get
    1266212662PASS th.scope: setAttribute() to object "test-valueOf" followed by getAttribute()
    12663 FAIL th.scope: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "" but got "test-valueOf"
     12663PASS th.scope: setAttribute() to object "test-valueOf" followed by IDL get
    1266412664PASS th.scope: setAttribute() to "row" followed by getAttribute()
    1266512665PASS th.scope: setAttribute() to "row" followed by IDL get
    1266612666PASS th.scope: setAttribute() to "xrow" followed by getAttribute()
    12667 FAIL th.scope: setAttribute() to "xrow" followed by IDL get assert_equals: expected "" but got "xrow"
     12667PASS th.scope: setAttribute() to "xrow" followed by IDL get
    1266812668PASS th.scope: setAttribute() to "row\0" followed by getAttribute()
    12669 FAIL th.scope: setAttribute() to "row\0" followed by IDL get assert_equals: expected "" but got "row\0"
     12669PASS th.scope: setAttribute() to "row\0" followed by IDL get
    1267012670PASS th.scope: setAttribute() to "ow" followed by getAttribute()
    12671 FAIL th.scope: setAttribute() to "ow" followed by IDL get assert_equals: expected "" but got "ow"
     12671PASS th.scope: setAttribute() to "ow" followed by IDL get
    1267212672PASS th.scope: setAttribute() to "ROW" followed by getAttribute()
    12673 FAIL th.scope: setAttribute() to "ROW" followed by IDL get assert_equals: expected "row" but got "ROW"
     12673PASS th.scope: setAttribute() to "ROW" followed by IDL get
    1267412674PASS th.scope: setAttribute() to "col" followed by getAttribute()
    1267512675PASS th.scope: setAttribute() to "col" followed by IDL get
    1267612676PASS th.scope: setAttribute() to "xcol" followed by getAttribute()
    12677 FAIL th.scope: setAttribute() to "xcol" followed by IDL get assert_equals: expected "" but got "xcol"
     12677PASS th.scope: setAttribute() to "xcol" followed by IDL get
    1267812678PASS th.scope: setAttribute() to "col\0" followed by getAttribute()
    12679 FAIL th.scope: setAttribute() to "col\0" followed by IDL get assert_equals: expected "" but got "col\0"
     12679PASS th.scope: setAttribute() to "col\0" followed by IDL get
    1268012680PASS th.scope: setAttribute() to "ol" followed by getAttribute()
    12681 FAIL th.scope: setAttribute() to "ol" followed by IDL get assert_equals: expected "" but got "ol"
     12681PASS th.scope: setAttribute() to "ol" followed by IDL get
    1268212682PASS th.scope: setAttribute() to "COL" followed by getAttribute()
    12683 FAIL th.scope: setAttribute() to "COL" followed by IDL get assert_equals: expected "col" but got "COL"
     12683PASS th.scope: setAttribute() to "COL" followed by IDL get
    1268412684PASS th.scope: setAttribute() to "rowgroup" followed by getAttribute()
    1268512685PASS th.scope: setAttribute() to "rowgroup" followed by IDL get
    1268612686PASS th.scope: setAttribute() to "xrowgroup" followed by getAttribute()
    12687 FAIL th.scope: setAttribute() to "xrowgroup" followed by IDL get assert_equals: expected "" but got "xrowgroup"
     12687PASS th.scope: setAttribute() to "xrowgroup" followed by IDL get
    1268812688PASS th.scope: setAttribute() to "rowgroup\0" followed by getAttribute()
    12689 FAIL th.scope: setAttribute() to "rowgroup\0" followed by IDL get assert_equals: expected "" but got "rowgroup\0"
     12689PASS th.scope: setAttribute() to "rowgroup\0" followed by IDL get
    1269012690PASS th.scope: setAttribute() to "owgroup" followed by getAttribute()
    12691 FAIL th.scope: setAttribute() to "owgroup" followed by IDL get assert_equals: expected "" but got "owgroup"
     12691PASS th.scope: setAttribute() to "owgroup" followed by IDL get
    1269212692PASS th.scope: setAttribute() to "ROWGROUP" followed by getAttribute()
    12693 FAIL th.scope: setAttribute() to "ROWGROUP" followed by IDL get assert_equals: expected "rowgroup" but got "ROWGROUP"
     12693PASS th.scope: setAttribute() to "ROWGROUP" followed by IDL get
    1269412694PASS th.scope: setAttribute() to "colgroup" followed by getAttribute()
    1269512695PASS th.scope: setAttribute() to "colgroup" followed by IDL get
    1269612696PASS th.scope: setAttribute() to "xcolgroup" followed by getAttribute()
    12697 FAIL th.scope: setAttribute() to "xcolgroup" followed by IDL get assert_equals: expected "" but got "xcolgroup"
     12697PASS th.scope: setAttribute() to "xcolgroup" followed by IDL get
    1269812698PASS th.scope: setAttribute() to "colgroup\0" followed by getAttribute()
    12699 FAIL th.scope: setAttribute() to "colgroup\0" followed by IDL get assert_equals: expected "" but got "colgroup\0"
     12699PASS th.scope: setAttribute() to "colgroup\0" followed by IDL get
    1270012700PASS th.scope: setAttribute() to "olgroup" followed by getAttribute()
    12701 FAIL th.scope: setAttribute() to "olgroup" followed by IDL get assert_equals: expected "" but got "olgroup"
     12701PASS th.scope: setAttribute() to "olgroup" followed by IDL get
    1270212702PASS th.scope: setAttribute() to "COLGROUP" followed by getAttribute()
    12703 FAIL th.scope: setAttribute() to "COLGROUP" followed by IDL get assert_equals: expected "colgroup" but got "COLGROUP"
     12703PASS th.scope: setAttribute() to "COLGROUP" followed by IDL get
    1270412704PASS th.scope: IDL set to "" should not throw
    1270512705PASS th.scope: IDL set to "" followed by getAttribute()
     
    1270712707PASS th.scope: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " should not throw
    1270812708PASS th.scope: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    12709 FAIL th.scope: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected "" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo "
     12709PASS th.scope: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1271012710PASS th.scope: IDL set to undefined should not throw
    1271112711PASS th.scope: IDL set to undefined followed by getAttribute()
    12712 FAIL th.scope: IDL set to undefined followed by IDL get assert_equals: expected "" but got "undefined"
     12712PASS th.scope: IDL set to undefined followed by IDL get
    1271312713PASS th.scope: IDL set to 7 should not throw
    1271412714PASS th.scope: IDL set to 7 followed by getAttribute()
    12715 FAIL th.scope: IDL set to 7 followed by IDL get assert_equals: expected "" but got "7"
     12715PASS th.scope: IDL set to 7 followed by IDL get
    1271612716PASS th.scope: IDL set to 1.5 should not throw
    1271712717PASS th.scope: IDL set to 1.5 followed by getAttribute()
    12718 FAIL th.scope: IDL set to 1.5 followed by IDL get assert_equals: expected "" but got "1.5"
     12718PASS th.scope: IDL set to 1.5 followed by IDL get
    1271912719PASS th.scope: IDL set to true should not throw
    1272012720PASS th.scope: IDL set to true followed by getAttribute()
    12721 FAIL th.scope: IDL set to true followed by IDL get assert_equals: expected "" but got "true"
     12721PASS th.scope: IDL set to true followed by IDL get
    1272212722PASS th.scope: IDL set to false should not throw
    1272312723PASS th.scope: IDL set to false followed by getAttribute()
    12724 FAIL th.scope: IDL set to false followed by IDL get assert_equals: expected "" but got "false"
     12724PASS th.scope: IDL set to false followed by IDL get
    1272512725PASS th.scope: IDL set to object "[object Object]" should not throw
    1272612726PASS th.scope: IDL set to object "[object Object]" followed by getAttribute()
    12727 FAIL th.scope: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "" but got "[object Object]"
     12727PASS th.scope: IDL set to object "[object Object]" followed by IDL get
    1272812728PASS th.scope: IDL set to NaN should not throw
    1272912729PASS th.scope: IDL set to NaN followed by getAttribute()
    12730 FAIL th.scope: IDL set to NaN followed by IDL get assert_equals: expected "" but got "NaN"
     12730PASS th.scope: IDL set to NaN followed by IDL get
    1273112731PASS th.scope: IDL set to Infinity should not throw
    1273212732PASS th.scope: IDL set to Infinity followed by getAttribute()
    12733 FAIL th.scope: IDL set to Infinity followed by IDL get assert_equals: expected "" but got "Infinity"
     12733PASS th.scope: IDL set to Infinity followed by IDL get
    1273412734PASS th.scope: IDL set to -Infinity should not throw
    1273512735PASS th.scope: IDL set to -Infinity followed by getAttribute()
    12736 FAIL th.scope: IDL set to -Infinity followed by IDL get assert_equals: expected "" but got "-Infinity"
     12736PASS th.scope: IDL set to -Infinity followed by IDL get
    1273712737PASS th.scope: IDL set to "\0" should not throw
    1273812738PASS th.scope: IDL set to "\0" followed by getAttribute()
    12739 FAIL th.scope: IDL set to "\0" followed by IDL get assert_equals: expected "" but got "\0"
     12739PASS th.scope: IDL set to "\0" followed by IDL get
    1274012740PASS th.scope: IDL set to null should not throw
    12741 FAIL th.scope: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
     12741PASS th.scope: IDL set to null followed by IDL get
    1274212742PASS th.scope: IDL set to object "test-toString" should not throw
    1274312743PASS th.scope: IDL set to object "test-toString" followed by getAttribute()
    12744 FAIL th.scope: IDL set to object "test-toString" followed by IDL get assert_equals: expected "" but got "test-toString"
     12744PASS th.scope: IDL set to object "test-toString" followed by IDL get
    1274512745PASS th.scope: IDL set to object "test-valueOf" should not throw
    1274612746PASS th.scope: IDL set to object "test-valueOf" followed by getAttribute()
    12747 FAIL th.scope: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "" but got "test-valueOf"
     12747PASS th.scope: IDL set to object "test-valueOf" followed by IDL get
    1274812748PASS th.scope: IDL set to "row" should not throw
    1274912749PASS th.scope: IDL set to "row" followed by getAttribute()
     
    1275112751PASS th.scope: IDL set to "xrow" should not throw
    1275212752PASS th.scope: IDL set to "xrow" followed by getAttribute()
    12753 FAIL th.scope: IDL set to "xrow" followed by IDL get assert_equals: expected "" but got "xrow"
     12753PASS th.scope: IDL set to "xrow" followed by IDL get
    1275412754PASS th.scope: IDL set to "row\0" should not throw
    1275512755PASS th.scope: IDL set to "row\0" followed by getAttribute()
    12756 FAIL th.scope: IDL set to "row\0" followed by IDL get assert_equals: expected "" but got "row\0"
     12756PASS th.scope: IDL set to "row\0" followed by IDL get
    1275712757PASS th.scope: IDL set to "ow" should not throw
    1275812758PASS th.scope: IDL set to "ow" followed by getAttribute()
    12759 FAIL th.scope: IDL set to "ow" followed by IDL get assert_equals: expected "" but got "ow"
     12759PASS th.scope: IDL set to "ow" followed by IDL get
    1276012760PASS th.scope: IDL set to "ROW" should not throw
    1276112761PASS th.scope: IDL set to "ROW" followed by getAttribute()
    12762 FAIL th.scope: IDL set to "ROW" followed by IDL get assert_equals: expected "row" but got "ROW"
     12762PASS th.scope: IDL set to "ROW" followed by IDL get
    1276312763PASS th.scope: IDL set to "col" should not throw
    1276412764PASS th.scope: IDL set to "col" followed by getAttribute()
     
    1276612766PASS th.scope: IDL set to "xcol" should not throw
    1276712767PASS th.scope: IDL set to "xcol" followed by getAttribute()
    12768 FAIL th.scope: IDL set to "xcol" followed by IDL get assert_equals: expected "" but got "xcol"
     12768PASS th.scope: IDL set to "xcol" followed by IDL get
    1276912769PASS th.scope: IDL set to "col\0" should not throw
    1277012770PASS th.scope: IDL set to "col\0" followed by getAttribute()
    12771 FAIL th.scope: IDL set to "col\0" followed by IDL get assert_equals: expected "" but got "col\0"
     12771PASS th.scope: IDL set to "col\0" followed by IDL get
    1277212772PASS th.scope: IDL set to "ol" should not throw
    1277312773PASS th.scope: IDL set to "ol" followed by getAttribute()
    12774 FAIL th.scope: IDL set to "ol" followed by IDL get assert_equals: expected "" but got "ol"
     12774PASS th.scope: IDL set to "ol" followed by IDL get
    1277512775PASS th.scope: IDL set to "COL" should not throw
    1277612776PASS th.scope: IDL set to "COL" followed by getAttribute()
    12777 FAIL th.scope: IDL set to "COL" followed by IDL get assert_equals: expected "col" but got "COL"
     12777PASS th.scope: IDL set to "COL" followed by IDL get
    1277812778PASS th.scope: IDL set to "rowgroup" should not throw
    1277912779PASS th.scope: IDL set to "rowgroup" followed by getAttribute()
     
    1278112781PASS th.scope: IDL set to "xrowgroup" should not throw
    1278212782PASS th.scope: IDL set to "xrowgroup" followed by getAttribute()
    12783 FAIL th.scope: IDL set to "xrowgroup" followed by IDL get assert_equals: expected "" but got "xrowgroup"
     12783PASS th.scope: IDL set to "xrowgroup" followed by IDL get
    1278412784PASS th.scope: IDL set to "rowgroup\0" should not throw
    1278512785PASS th.scope: IDL set to "rowgroup\0" followed by getAttribute()
    12786 FAIL th.scope: IDL set to "rowgroup\0" followed by IDL get assert_equals: expected "" but got "rowgroup\0"
     12786PASS th.scope: IDL set to "rowgroup\0" followed by IDL get
    1278712787PASS th.scope: IDL set to "owgroup" should not throw
    1278812788PASS th.scope: IDL set to "owgroup" followed by getAttribute()
    12789 FAIL th.scope: IDL set to "owgroup" followed by IDL get assert_equals: expected "" but got "owgroup"
     12789PASS th.scope: IDL set to "owgroup" followed by IDL get
    1279012790PASS th.scope: IDL set to "ROWGROUP" should not throw
    1279112791PASS th.scope: IDL set to "ROWGROUP" followed by getAttribute()
    12792 FAIL th.scope: IDL set to "ROWGROUP" followed by IDL get assert_equals: expected "rowgroup" but got "ROWGROUP"
     12792PASS th.scope: IDL set to "ROWGROUP" followed by IDL get
    1279312793PASS th.scope: IDL set to "colgroup" should not throw
    1279412794PASS th.scope: IDL set to "colgroup" followed by getAttribute()
     
    1279612796PASS th.scope: IDL set to "xcolgroup" should not throw
    1279712797PASS th.scope: IDL set to "xcolgroup" followed by getAttribute()
    12798 FAIL th.scope: IDL set to "xcolgroup" followed by IDL get assert_equals: expected "" but got "xcolgroup"
     12798PASS th.scope: IDL set to "xcolgroup" followed by IDL get
    1279912799PASS th.scope: IDL set to "colgroup\0" should not throw
    1280012800PASS th.scope: IDL set to "colgroup\0" followed by getAttribute()
    12801 FAIL th.scope: IDL set to "colgroup\0" followed by IDL get assert_equals: expected "" but got "colgroup\0"
     12801PASS th.scope: IDL set to "colgroup\0" followed by IDL get
    1280212802PASS th.scope: IDL set to "olgroup" should not throw
    1280312803PASS th.scope: IDL set to "olgroup" followed by getAttribute()
    12804 FAIL th.scope: IDL set to "olgroup" followed by IDL get assert_equals: expected "" but got "olgroup"
     12804PASS th.scope: IDL set to "olgroup" followed by IDL get
    1280512805PASS th.scope: IDL set to "COLGROUP" should not throw
    1280612806PASS th.scope: IDL set to "COLGROUP" followed by getAttribute()
    12807 FAIL th.scope: IDL set to "COLGROUP" followed by IDL get assert_equals: expected "colgroup" but got "COLGROUP"
     12807PASS th.scope: IDL set to "COLGROUP" followed by IDL get
    1280812808PASS th.abbr: typeof IDL attribute
    1280912809PASS th.abbr: IDL get with DOM attribute unset
  • trunk/Source/WebCore/CMakeLists.txt

    r196747 r196793  
    17301730    html/HTMLTableColElement.cpp
    17311731    html/HTMLTableElement.cpp
     1732    html/HTMLTableHeaderCellElement.cpp
    17321733    html/HTMLTablePartElement.cpp
    17331734    html/HTMLTableRowElement.cpp
  • trunk/Source/WebCore/ChangeLog

    r196791 r196793  
     12016-02-18  Chris Dumez  <cdumez@apple.com>
     2
     3        HTMLTableHeaderCellElement.scope should only return known values
     4        https://bugs.webkit.org/show_bug.cgi?id=154423
     5        <rdar://problem/24731018>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        HTMLTableHeaderCellElement.scope should only return known values as per:
     10        - https://html.spec.whatwg.org/multipage/tables.html#dom-th-scope
     11
     12        Known values are document here:
     13        - https://html.spec.whatwg.org/multipage/tables.html#attr-th-scope
     14
     15        No new tests, already covered by existing test.
     16
     17        * CMakeLists.txt:
     18        * WebCore.vcxproj/WebCore.vcxproj:
     19        * WebCore.vcxproj/WebCore.vcxproj.filters:
     20        * WebCore.xcodeproj/project.pbxproj:
     21        * html/HTMLElementsAllInOne.cpp:
     22        * html/HTMLTableHeaderCellElement.cpp: Copied from Source/WebCore/html/HTMLTableHeaderCellElement.h.
     23        (WebCore::HTMLTableHeaderCellElement::scope):
     24        (WebCore::HTMLTableHeaderCellElement::setScope):
     25        * html/HTMLTableHeaderCellElement.h:
     26        * html/HTMLTableHeaderCellElement.idl:
     27
    1282016-02-18  Brent Fulgham  <bfulgham@apple.com>
    229
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r196747 r196793  
    1731717317    </ClCompile>
    1731817318    <ClCompile Include="..\html\HTMLTableElement.cpp">
     17319      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     17320      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     17321      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     17322      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     17323      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     17324      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     17325      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     17326      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     17327      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     17328      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     17329      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     17330      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     17331    </ClCompile>
     17332    <ClCompile Include="..\html\HTMLTableHeaderCellElement.cpp">
    1731917333      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    1732017334      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r196747 r196793  
    39273927      <Filter>html</Filter>
    39283928    </ClCompile>
     3929    <ClCompile Include="..\html\HTMLTableHeaderCellElement.cpp">
     3930      <Filter>html</Filter>
     3931    </ClCompile>
    39293932    <ClCompile Include="..\html\HTMLTablePartElement.cpp">
    39303933      <Filter>html</Filter>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r196747 r196793  
    17201720                46DB7D571B20FE46005651B2 /* VNodeTrackerCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D561B20FE3C005651B2 /* VNodeTrackerCocoa.cpp */; };
    17211721                46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */; };
     1722                46DCFDC01C768A150025B868 /* HTMLTableHeaderCellElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DCFDBF1C768A150025B868 /* HTMLTableHeaderCellElement.cpp */; };
    17221723                46EBEA021B7D4D6500BE4941 /* CollectionTraversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */; };
    17231724                46F3E3F91B2109000087ED13 /* VNodeTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DB7D581B20FE58005651B2 /* VNodeTracker.cpp */; };
     
    92339234                46DB7D591B20FE58005651B2 /* VNodeTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VNodeTracker.h; sourceTree = "<group>"; };
    92349235                46DBB64E1AB8C96F00D9A813 /* PowerObserverMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PowerObserverMac.h; sourceTree = "<group>"; };
     9236                46DCFDBF1C768A150025B868 /* HTMLTableHeaderCellElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTableHeaderCellElement.cpp; sourceTree = "<group>"; };
    92359237                46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionTraversal.h; sourceTree = "<group>"; };
    92369238                46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMNamedFlowCollectionCustom.cpp; sourceTree = "<group>"; };
     
    1931719319                                A871DB190A150BD600B12A68 /* HTMLTableElement.h */,
    1931819320                                8555425A0AA48B1E00BA89F2 /* HTMLTableElement.idl */,
     19321                                46DCFDBF1C768A150025B868 /* HTMLTableHeaderCellElement.cpp */,
    1931919322                                836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */,
    1932019323                                83FE5F1F1BD1C55E0038BEEC /* HTMLTableHeaderCellElement.idl */,
     
    2943329436                                859A9C480AA5E3BD00B694B2 /* DOMHTMLBaseElement.mm in Sources */,
    2943429437                                85ECBEEE0AA7626900544F0B /* DOMHTMLBaseFontElement.mm in Sources */,
     29438                                46DCFDC01C768A150025B868 /* HTMLTableHeaderCellElement.cpp in Sources */,
    2943529439                                859A9C4A0AA5E3BD00B694B2 /* DOMHTMLBodyElement.mm in Sources */,
    2943629440                                85183B430AA6926100F19FA3 /* DOMHTMLBRElement.mm in Sources */,
  • trunk/Source/WebCore/html/HTMLElementsAllInOne.cpp

    r195627 r196793  
    104104#include "HTMLTableColElement.cpp"
    105105#include "HTMLTableElement.cpp"
     106#include "HTMLTableHeaderCellElement.cpp"
    106107#include "HTMLTablePartElement.cpp"
    107108#include "HTMLTableRowElement.cpp"
  • trunk/Source/WebCore/html/HTMLTableHeaderCellElement.cpp

    r196792 r196793  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef HTMLTableHeaderCellElement_h
    27 #define HTMLTableHeaderCellElement_h
     26#include "config.h"
     27#include "HTMLTableHeaderCellElement.h"
    2828
    2929#include "HTMLNames.h"
    30 #include "HTMLTableCellElement.h"
     30#include <wtf/text/AtomicString.h>
    3131
    3232namespace WebCore {
    3333
    34 class HTMLTableHeaderCellElement final : public HTMLTableCellElement {
    35 public:
    36     static Ref<HTMLTableHeaderCellElement> create(Document& document)
    37     {
    38         return adoptRef(*new HTMLTableHeaderCellElement(HTMLNames::thTag, document));
    39     }
     34const AtomicString& HTMLTableHeaderCellElement::scope() const
     35{
     36    // https://html.spec.whatwg.org/multipage/tables.html#attr-th-scope
     37    static NeverDestroyed<const AtomicString> row("row", AtomicString::ConstructFromLiteral);
     38    static NeverDestroyed<const AtomicString> col("col", AtomicString::ConstructFromLiteral);
     39    static NeverDestroyed<const AtomicString> rowgroup("rowgroup", AtomicString::ConstructFromLiteral);
     40    static NeverDestroyed<const AtomicString> colgroup("colgroup", AtomicString::ConstructFromLiteral);
    4041
    41     static Ref<HTMLTableHeaderCellElement> create(const QualifiedName& tagName, Document& document)
    42     {
    43         ASSERT(tagName == HTMLNames::thTag);
    44         return adoptRef(*new HTMLTableHeaderCellElement(tagName, document));
    45     }
    46 
    47 private:
    48     using HTMLTableCellElement::HTMLTableCellElement;
    49 };
    50 
     42    const AtomicString& value = fastGetAttribute(HTMLNames::scopeAttr);
     43    if (equalIgnoringASCIICase(value, row))
     44        return row;
     45    if (equalIgnoringASCIICase(value, col))
     46        return col;
     47    if (equalIgnoringASCIICase(value, rowgroup))
     48        return rowgroup;
     49    if (equalIgnoringASCIICase(value, colgroup))
     50        return colgroup;
     51    return emptyAtom;
    5152}
    5253
    53 #endif // HTMLTableHeaderCellElement_h
     54void HTMLTableHeaderCellElement::setScope(const AtomicString& scope)
     55{
     56    setAttributeWithoutSynchronization(HTMLNames::scopeAttr, scope);
     57}
    5458
     59} // namespace WebCore
  • trunk/Source/WebCore/html/HTMLTableHeaderCellElement.h

    r191247 r196793  
    4545    }
    4646
     47    const AtomicString& scope() const;
     48    void setScope(const AtomicString&);
     49
    4750private:
    4851    using HTMLTableCellElement::HTMLTableCellElement;
  • trunk/Source/WebCore/html/HTMLTableHeaderCellElement.idl

    r191247 r196793  
    2626interface HTMLTableHeaderCellElement : HTMLTableCellElement {
    2727    [Reflect] attribute DOMString abbr;
    28     [Reflect] attribute DOMString scope;
     28    attribute DOMString scope;
    2929};
Note: See TracChangeset for help on using the changeset viewer.