Changeset 139756 in webkit


Ignore:
Timestamp:
Jan 15, 2013 10:49:17 AM (11 years ago)
Author:
arko@motorola.com
Message:

Microdata: propertiesCollection[name] should return undefined if item doesn't have a property named 'name'
https://bugs.webkit.org/show_bug.cgi?id=106849

Reviewed by Kentaro Hara.

Source/WebCore:

We should return undefined if hasNamedItem() is false.

Test: fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html

  • bindings/v8/custom/V8HTMLCollectionCustom.cpp:

(WebCore::V8HTMLCollection::namedPropertyGetter):

LayoutTests:

  • fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name-expected.txt: Added.
  • fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139753 r139756  
     12013-01-15  Arko Saha  <arko@motorola.com>
     2
     3        Microdata: propertiesCollection[name] should return undefined if item doesn't have a property named 'name'
     4        https://bugs.webkit.org/show_bug.cgi?id=106849
     5
     6        Reviewed by Kentaro Hara.
     7
     8        * fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name-expected.txt: Added.
     9        * fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html: Added.
     10
    1112013-01-15  Emil A Eklund  <eae@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r139755 r139756  
     12013-01-15  Arko Saha  <arko@motorola.com>
     2
     3        Microdata: propertiesCollection[name] should return undefined if item doesn't have a property named 'name'
     4        https://bugs.webkit.org/show_bug.cgi?id=106849
     5
     6        Reviewed by Kentaro Hara.
     7
     8        We should return undefined if hasNamedItem() is false.
     9
     10        Test: fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
     11
     12        * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
     13        (WebCore::V8HTMLCollection::namedPropertyGetter):
     14
    1152013-01-15  Michael Pruett  <michael@68k.org>
    216
  • trunk/Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp

    r139673 r139756  
    5555#if ENABLE(MICRODATA)
    5656    if (imp->type() == ItemProperties) {
     57        if (!static_cast<HTMLPropertiesCollection*>(imp)->hasNamedItem(toWebCoreAtomicString(name)))
     58            return v8Undefined();
    5759        RefPtr<PropertyNodeList> item = static_cast<HTMLPropertiesCollection*>(imp)->propertyNodeList(toWebCoreAtomicString(name));
    5860        if (!item)
Note: See TracChangeset for help on using the changeset viewer.