Changeset 116513 in webkit


Ignore:
Timestamp:
May 9, 2012 4:10:53 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
https://bugs.webkit.org/show_bug.cgi?id=85937

Patch by Yoshifumi Inoue <yosin@chromium.org> on 2012-05-09
Reviewed by Kentaro Hara.

Source/WebCore:

This patch adds numeric indices to properties in enumeration to HTMLOptionsCollection V8 binding
to changes Objects.keys in ECMAScript5 and for-in statement behavior for compatibility with
Firefox 12, IE9, Opera 11, and Safari 5.

Test: fast/forms/select/options-indexed-properties.html

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateImplementationIndexer): Set $hasEnumerator true for interface HTMLOptionsCollection

LayoutTests:

  • fast/forms/select/options-indexed-properties-expected.txt: Added.
  • fast/forms/select/options-indexed-properties.html: Added.
  • platform/chromium/inspector/console/console-format-collections-expected.txt: Changed for HTMLOptionCollection printed output
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116512 r116513  
     12012-05-09  Yoshifumi Inoue  <yosin@chromium.org>
     2
     3        [Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
     4        https://bugs.webkit.org/show_bug.cgi?id=85937
     5
     6        Reviewed by Kentaro Hara.
     7
     8        * fast/forms/select/options-indexed-properties-expected.txt: Added.
     9        * fast/forms/select/options-indexed-properties.html: Added.
     10        * platform/chromium/inspector/console/console-format-collections-expected.txt: Changed for HTMLOptionCollection printed output
     11
    1122012-05-09  Christophe Dumez  <christophe.dumez@intel.com>
    213
  • trunk/LayoutTests/platform/chromium/inspector/console/console-format-collections-expected.txt

    r114200 r116513  
    1212[<select id="sel" name="sel">…</select>] console-format-collections.html:15
    1313[<script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>] console-format-collections.html:19
    14 [undefined × 2] console-format-collections.html:23
     14[<option value="1">one</option>, <option value="2">two</option>] console-format-collections.html:23
    1515[<html>…</html>, <head>…</head>, <script src="../../http/tests/inspector/inspector-test.js"></script>, <script src="../../http/tests/inspector/console-test.js"></script>, <script>…</script>, <body onload="onload()">…</body>, <p>
    1616Tests that console nicely formats HTML Collections and NodeLists.
  • trunk/Source/WebCore/ChangeLog

    r116508 r116513  
     12012-05-09  Yoshifumi Inoue  <yosin@chromium.org>
     2
     3        [Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
     4        https://bugs.webkit.org/show_bug.cgi?id=85937
     5
     6        Reviewed by Kentaro Hara.
     7
     8        This patch adds numeric indices to properties in enumeration to HTMLOptionsCollection V8 binding
     9        to changes Objects.keys in ECMAScript5 and for-in statement behavior for compatibility with
     10        Firefox 12, IE9, Opera 11, and Safari 5.
     11
     12        Test: fast/forms/select/options-indexed-properties.html
     13
     14        * bindings/scripts/CodeGeneratorV8.pm:
     15        (GenerateImplementationIndexer): Set $hasEnumerator true for interface HTMLOptionsCollection
     16
    1172012-05-09  Shinya Kawanaka  <shinyak@chromium.org>
    218
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r116269 r116513  
    21252125    my $hasGetter = $dataNode->extendedAttributes->{"IndexedGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
    21262126
    2127     # FIXME: Find a way to not have to special-case HTMLOptionsCollection.
    2128     if ($interfaceName eq "HTMLOptionsCollection") {
    2129         $hasGetter = 1;
    2130     }
    2131 
    21322127    # FIXME: Investigate and remove this nastinesss. In V8, named property handling and indexer handling are apparently decoupled,
    21332128    # which means that object[X] where X is a number doesn't reach named property indexer. So we need to provide
     
    21412136    }
    21422137
     2138    my $hasEnumerator = !$isSpecialCase && IsNodeSubType($dataNode);
     2139
     2140    # FIXME: Find a way to not have to special-case HTMLOptionsCollection.
     2141    if ($interfaceName eq "HTMLOptionsCollection") {
     2142        $hasEnumerator = 1;
     2143        $hasGetter = 1;
     2144    }
     2145
    21432146    if (!$hasGetter) {
    21442147        return;
     
    21822185
    21832186    my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"};
    2184     my $hasEnumerator = !$isSpecialCase && IsNodeSubType($dataNode);
    21852187    my $setOn = "Instance";
    21862188
Note: See TracChangeset for help on using the changeset viewer.