Changeset 142831 in webkit
- Timestamp:
- Feb 13, 2013 5:31:14 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142829 r142831 1 2013-02-13 Vineet Chaudhary <rgf748@motorola.com> 2 3 HTMLCollections namedItem() methods should return null than undefined for empty collections. 4 https://bugs.webkit.org/show_bug.cgi?id=104096 5 6 Reviewed by Kentaro Hara. 7 8 As per specification namedItem() should return null if collection is empty. 9 Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection 10 11 * fast/dom/HTMLFormElement/move-option-between-documents-expected.txt: 12 * fast/dom/HTMLFormElement/move-option-between-documents.html: 13 * fast/dom/htmlcollection-namedItem-expected.txt: Added. 14 * fast/dom/htmlcollection-namedItem.html: Added. 15 1 16 2013-02-13 Tony Gentilcore <tonyg@chromium.org> 2 17 -
trunk/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents-expected.txt
r80797 r142831 1 PASS typeof select.options.namedItem('option') is 'undefined'1 PASS select.options.namedItem('option') is null 2 2 PASS successfullyParsed is true 3 3 -
trunk/LayoutTests/fast/dom/HTMLFormElement/move-option-between-documents.html
r98407 r142831 36 36 doc1.body.removeChild(select); 37 37 doc2.body.appendChild(select); 38 shouldBe ("typeof select.options.namedItem('option')", "'undefined'");38 shouldBeNull("select.options.namedItem('option')"); 39 39 finishJSTest(); 40 40 } -
trunk/Source/WebCore/ChangeLog
r142829 r142831 1 2013-02-13 Vineet Chaudhary <rgf748@motorola.com> 2 3 HTMLCollections namedItem() methods should return null than undefined for empty collections. 4 https://bugs.webkit.org/show_bug.cgi?id=104096 5 6 Reviewed by Kentaro Hara. 7 8 As per specification namedItem() should return null if collection is empty. 9 Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection 10 11 Test: fast/dom/htmlcollection-namedItem.html 12 13 * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null. 14 (WebCore::getNamedItems): 15 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto. 16 (WebCore::getNamedItems): 17 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto. 18 (WebCore::getNamedItems): 19 * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto. 20 (WebCore::V8HTMLAllCollection::namedItemCallback): 21 * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto. 22 (WebCore::V8HTMLFormControlsCollection::namedItemCallback): 23 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto. 24 (WebCore::V8HTMLOptionsCollection::namedItemCallback): 25 1 26 2013-02-13 Tony Gentilcore <tonyg@chromium.org> 2 27 -
trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
r140718 r142831 47 47 48 48 if (namedItems.isEmpty()) 49 return js Undefined();49 return jsNull(); 50 50 if (namedItems.size() == 1) 51 51 return toJS(exec, collection->globalObject(), namedItems[0].get()); -
trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp
r136850 r142831 45 45 46 46 if (namedItems.isEmpty()) 47 return js Undefined();47 return jsNull(); 48 48 if (namedItems.size() == 1) 49 49 return toJS(exec, collection->globalObject(), namedItems[0].get()); -
trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
r142810 r142831 45 45 46 46 if (namedItems.isEmpty()) 47 return js Undefined();47 return jsNull(); 48 48 if (namedItems.size() == 1) 49 49 return toJS(exec, collection->globalObject(), namedItems[0].get()); -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
r141763 r142831 98 98 99 99 if (result.IsEmpty()) 100 return v8 ::Undefined();100 return v8Null(args.GetIsolate()); 101 101 102 102 return result; -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp
r141763 r142831 72 72 73 73 if (result.IsEmpty()) 74 return v8 ::Undefined(args.GetIsolate());74 return v8Null(args.GetIsolate()); 75 75 76 76 return result; -
trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
r142810 r142831 78 78 79 79 if (result.IsEmpty()) 80 return v8 ::Undefined(args.GetIsolate());80 return v8Null(args.GetIsolate()); 81 81 82 82 return result;
Note: See TracChangeset
for help on using the changeset viewer.