Changeset 21489 in webkit


Ignore:
Timestamp:
May 15, 2007 10:53:39 AM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Darin.

Tests for Core DOM attributes.

  • fast/dom/coreDOM-element-attribute-js-null-expected.txt: Added.
  • fast/dom/coreDOM-element-attribute-js-null.xhtml: Added.

WebCore:

Reviewed by Darin.

Convert JS null to null string for remaining Core DOM attributes.

Test: fast/dom/coreDOM-element-attribute-js-null.xhtml

  • dom/Attr.cpp: (WebCore::Attr::setValue): Don't throw an expection for null values as this is not in the spec and Firefox does not do it either.
  • dom/Attr.idl:
  • dom/CharacterData.idl:
  • dom/ProcessingInstruction.idl:
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21484 r21489  
     12007-05-15  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - Test for http://bugs.webkit.org/show_bug.cgi?id=13722
     6          Finish testing and fixing the setting of DOM attributes to JS null
     7
     8          Tests for Core DOM attributes.
     9
     10        * fast/dom/coreDOM-element-attribute-js-null-expected.txt: Added.
     11        * fast/dom/coreDOM-element-attribute-js-null.xhtml: Added.
     12
    1132007-05-15  Justin Garcia  <justin.garcia@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r21483 r21489  
     12007-05-15  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
     6          Finish testing and fixing the setting of DOM attributes to JS null
     7
     8          Convert JS null to null string for remaining Core DOM attributes.
     9
     10        Test: fast/dom/coreDOM-element-attribute-js-null.xhtml
     11
     12        * dom/Attr.cpp:
     13        (WebCore::Attr::setValue): Don't throw an expection for null values as this
     14        is not in the spec and Firefox does not do it either.
     15        * dom/Attr.idl:
     16        * dom/CharacterData.idl:
     17        * dom/ProcessingInstruction.idl:
     18
    1192007-05-15  Mitz Pettel  <mitz@webkit.org>
    220
  • trunk/WebCore/dom/Attr.cpp

    r21278 r21489  
    113113    }
    114114
    115     // ### what to do on 0 ?
    116     if (v.isNull()) {
    117         ec = DOMSTRING_SIZE_ERR;
    118         return;
    119     }
    120 
    121115    int e = 0;
    122116    m_ignoreChildrenChanged++;
  • trunk/WebCore/dom/Attr.idl

    r21308 r21489  
    2727        readonly attribute [ConvertNullStringTo=Null] DOMString name;
    2828        readonly attribute boolean specified;
    29                  attribute [ConvertNullStringTo=Null] DOMString value
    30                      setter raises (DOMException);
     29                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString value
     30                     setter raises(DOMException);
    3131
    3232        // DOM Level 2
  • trunk/WebCore/dom/CharacterData.idl

    r21308 r21489  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2007 Apple Inc.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2222    interface [LegacyParent=KJS::DOMEventTargetNode, GenerateConstructor] CharacterData : EventTargetNode {
    2323
    24         attribute DOMString data
    25             setter raises (DOMException);
     24        attribute [ConvertNullToNullString] DOMString data
     25            setter raises(DOMException);
    2626
    2727        readonly attribute unsigned long length;
  • trunk/WebCore/dom/ProcessingInstruction.idl

    r21308 r21489  
    2626
    2727        readonly attribute [ConvertNullStringTo=Null] DOMString target;
    28                  attribute [ConvertNullStringTo=Null] DOMString data
    29                      setter raises (DOMException);
     28                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString data
     29                     setter raises(DOMException);
    3030
    3131        // interface LinkStyle from DOM Level 2 Style Sheets
Note: See TracChangeset for help on using the changeset viewer.