Changeset 51584 in webkit


Ignore:
Timestamp:
Dec 1, 2009 9:17:10 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-01 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.

Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
pattern and step attributes of HTMLInputElement.
https://bugs.webkit.org/show_bug.cgi?id=31708

  • fast/forms/input-minmax-expected.txt:
  • fast/forms/input-pattern-expected.txt: Added.
  • fast/forms/input-pattern.html: Added.
  • fast/forms/input-step-expected.txt:
  • fast/forms/script-tests/input-minmax.js: Add tests for null/undefined/non-string.
  • fast/forms/script-tests/input-pattern.js: Added.
  • fast/forms/script-tests/input-step.js: Change the result for null.

2009-12-01 Kent Tamura <tkent@chromium.org>

Reviewed by Darin Adler.

Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
pattern and step attributes of HTMLInputElement.
https://bugs.webkit.org/show_bug.cgi?id=31708

  • html/HTMLInputElement.idl:
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r51582 r51584  
     12009-12-01  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
     6        pattern and step attributes of HTMLInputElement.
     7        https://bugs.webkit.org/show_bug.cgi?id=31708
     8
     9        * fast/forms/input-minmax-expected.txt:
     10        * fast/forms/input-pattern-expected.txt: Added.
     11        * fast/forms/input-pattern.html: Added.
     12        * fast/forms/input-step-expected.txt:
     13        * fast/forms/script-tests/input-minmax.js: Add tests for null/undefined/non-string.
     14        * fast/forms/script-tests/input-pattern.js: Added.
     15        * fast/forms/script-tests/input-step.js: Change the result for null.
     16
    1172009-12-01  Chris Fleizach  <cfleizach@apple.com>
    218
  • trunk/LayoutTests/fast/forms/input-minmax-expected.txt

    r49199 r51584  
    1414PASS input.getAttribute("min") is ""
    1515PASS input.getAttribute("max") is ""
     16Setting null to min:
     17PASS input.min is ""
     18PASS input.getAttribute("min") is null
     19PASS input.min is "null"
     20Setting null to max:
     21PASS input.max is ""
     22PASS input.getAttribute("max") is null
     23PASS input.max is "null"
     24Setting undefined to min:
     25PASS input.min is "undefined"
     26PASS input.getAttribute("min") is "undefined"
     27PASS input.min is "undefined"
     28Setting undefined to max:
     29PASS input.max is "undefined"
     30PASS input.getAttribute("max") is "undefined"
     31PASS input.max is "undefined"
     32Setting non-string to min:
     33PASS input.min is "256"
     34PASS input.getAttribute("min") is "256"
     35PASS input.min is "256"
     36Setting non-string to max:
     37PASS input.max is "256"
     38PASS input.getAttribute("max") is "256"
     39PASS input.max is "256"
     40Check implicit min/max of type=range:
    1641PASS input.min is ""
    1742PASS input.max is ""
  • trunk/LayoutTests/fast/forms/input-step-expected.txt

    r51159 r51584  
    77PASS input.getAttribute("step") is "foo"
    88PASS input.step is "bar"
    9 PASS input.step is "null"
    10 PASS input.getAttribute("step") is "null"
     9PASS input.step is ""
     10PASS input.getAttribute("step") is null
    1111PASS input.step is "null"
    1212PASS input.step is "undefined"
  • trunk/LayoutTests/fast/forms/script-tests/input-minmax.js

    r49199 r51584  
    2525shouldBe('input.getAttribute("max")', '""');
    2626
     27// Null.
     28debug('Setting null to min:');
     29input.min = null;
     30shouldBe('input.min', '""');
     31shouldBe('input.getAttribute("min")', 'null');
     32input.setAttribute('min', null);
     33shouldBe('input.min', '"null"');
     34
     35debug('Setting null to max:');
     36input.max = null;
     37shouldBe('input.max', '""');
     38shouldBe('input.getAttribute("max")', 'null');
     39input.setAttribute('max', null);
     40shouldBe('input.max', '"null"');
     41
     42// Undefined.
     43debug('Setting undefined to min:');
     44input.min = undefined;
     45shouldBe('input.min', '"undefined"');
     46shouldBe('input.getAttribute("min")', '"undefined"');
     47input.setAttribute('min', undefined);
     48shouldBe('input.min', '"undefined"');
     49
     50debug('Setting undefined to max:');
     51input.max = undefined;
     52shouldBe('input.max', '"undefined"');
     53shouldBe('input.getAttribute("max")', '"undefined"');
     54input.setAttribute('max', undefined);
     55shouldBe('input.max', '"undefined"');
     56
     57// Non-string.
     58debug('Setting non-string to min:');
     59input.min = 256;
     60shouldBe('input.min', '"256"');
     61shouldBe('input.getAttribute("min")', '"256"');
     62input.setAttribute('min', 256);
     63shouldBe('input.min', '"256"');
     64
     65debug('Setting non-string to max:');
     66input.max = 256;
     67shouldBe('input.max', '"256"');
     68shouldBe('input.getAttribute("max")', '"256"');
     69input.setAttribute('max', 256);
     70shouldBe('input.max', '"256"');
     71
    2772// The range type has the default minimum and the default maximum.
    2873// But they aren't exposed by .min .max IDL attributes.
     74debug('Check implicit min/max of type=range:');
    2975input.type = 'range';
    3076input.setAttribute('min', '');
  • trunk/LayoutTests/fast/forms/script-tests/input-step.js

    r51159 r51584  
    1515// Null.
    1616input.step = null;
    17 shouldBe('input.step', '"null"');
    18 shouldBe('input.getAttribute("step")', '"null"');
     17shouldBe('input.step', '""');
     18shouldBe('input.getAttribute("step")', 'null');
    1919input.setAttribute('step', null);
    2020shouldBe('input.step', '"null"');
  • trunk/WebCore/ChangeLog

    r51582 r51584  
     12009-12-01  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
     6        pattern and step attributes of HTMLInputElement.
     7        https://bugs.webkit.org/show_bug.cgi?id=31708
     8
     9        * html/HTMLInputElement.idl:
     10
    1112009-12-01  Chris Fleizach  <cfleizach@apple.com>
    212
  • trunk/WebCore/html/HTMLInputElement.idl

    r51172 r51584  
    4444#endif
    4545#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
    46                  attribute [Reflect] DOMString max;
     46                 attribute [ConvertNullToNullString, Reflect] DOMString max;
    4747#endif
    4848                 attribute long            maxLength
    4949                     setter raises(DOMException);
    5050#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
    51                  attribute [Reflect] DOMString min;
     51                 attribute [ConvertNullToNullString, Reflect] DOMString min;
    5252#endif
    5353                 attribute boolean         multiple;
    5454                 attribute [ConvertNullToNullString] DOMString name;
    55                  attribute [Reflect] DOMString      pattern;
     55                 attribute [ConvertNullToNullString, Reflect] DOMString pattern;
    5656                 attribute DOMString       placeholder;
    5757                 attribute boolean         readOnly;
     
    6464#endif
    6565                 attribute [ConvertNullToNullString] DOMString src;
    66                  attribute [Reflect] DOMString step;
     66                 attribute [ConvertNullToNullString, Reflect] DOMString step;
    6767                 attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
    6868                 attribute [ConvertNullToNullString] DOMString useMap;
Note: See TracChangeset for help on using the changeset viewer.