Changeset 20295 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Mar 18, 2007, 4:02:39 PM (18 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Oliver Hunt.


Exposed some extra toUInt32 functionality, as part of the fix for
REGRESSION: Incomplete document.all implementation breaks abtelectronics.com
(Style Change Through JavaScript Blanks Content)

LayoutTests:

Reviewed by Oliver Hunt.


Layout test for http://bugs.webkit.org/show_bug.cgi?id=13106
REGRESSION: Incomplete document.all implementation breaks abtelectronics.com
(Style Change Through JavaScript Blanks Content)

  • fast/dom/collection-null-like-arguments-expected.txt: Added.
  • fast/dom/collection-null-like-arguments.html: Added.

WebCore:

Reviewed by Oliver Hunt.


Fixed http://bugs.webkit.org/show_bug.cgi?id=13106
REGRESSION: Incomplete document.all implementation breaks abtelectronics.com
(Style Change Through JavaScript Blanks Content)


When indexing into collections, treat the empty string as an invalid argument,
instead of the number 0.

  • bindings/js/kjs_html.cpp: (KJS::JSHTMLCollection::getOwnPropertySlot): (KJS::JSHTMLCollection::callAsFunction): (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/identifier.h

    r17483 r20295  
    5252       
    5353        uint32_t toUInt32(bool* ok) const { return _ustring.toUInt32(ok); }
     54        uint32_t toUInt32(bool* ok, bool tolerateEmptyString) const { return _ustring.toUInt32(ok, tolerateEmptyString); };
    5455        uint32_t toStrictUInt32(bool* ok) const { return _ustring.toStrictUInt32(ok); }
    5556        unsigned toArrayIndex(bool* ok) const { return _ustring.toArrayIndex(ok); }
Note: See TracChangeset for help on using the changeset viewer.