Changeset 32341 in webkit


Ignore:
Timestamp:
Apr 21, 2008 1:23:20 PM (16 years ago)
Author:
weinig@apple.com
Message:

2008-04-21 Sam Weinig <sam@webkit.org>

Reviewed by Alexey Proskuryakov.

Fix up XMLHttpRequestProgressEvent.

  • bindings/js/JSEventCustom.cpp: (WebCore::toJS):
  • xml/XMLHttpRequestProgressEvent.cpp:
  • xml/XMLHttpRequestProgressEvent.h:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r32340 r32341  
     12008-04-21  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Fix up XMLHttpRequestProgressEvent.
     6
     7        * bindings/js/JSEventCustom.cpp:
     8        (WebCore::toJS):
     9        * xml/XMLHttpRequestProgressEvent.cpp:
     10        * xml/XMLHttpRequestProgressEvent.h:
     11
    1122008-04-21  Adam Roben  <aroben@apple.com>
    213
  • trunk/WebCore/bindings/js/JSEventCustom.cpp

    r32316 r32341  
    111111        ret = new JSMessageEvent(JSMessageEventPrototype::self(exec), static_cast<MessageEvent*>(event));
    112112#endif
    113     else if (event->isProgressEvent())
    114         ret = new JSProgressEvent(JSProgressEventPrototype::self(exec), static_cast<ProgressEvent*>(event));
     113    else if (event->isProgressEvent()) {
     114        if (event->isXMLHttpRequestProgressEvent())
     115            ret = new JSXMLHttpRequestProgressEvent(JSXMLHttpRequestProgressEventPrototype::self(exec), static_cast<XMLHttpRequestProgressEvent*>(event));
     116        else
     117            ret = new JSProgressEvent(JSProgressEventPrototype::self(exec), static_cast<ProgressEvent*>(event));
     118    }
    115119#if ENABLE(DOM_STORAGE)
    116120    else if (event->isStorageEvent())
    117121        ret = new JSStorageEvent(JSStorageEventPrototype::self(exec), static_cast<StorageEvent*>(event));
    118122#endif
    119     else if (event->isXMLHttpRequestProgressEvent())
    120         ret = new JSXMLHttpRequestProgressEvent(JSXMLHttpRequestProgressEventPrototype::self(exec), static_cast<XMLHttpRequestProgressEvent*>(event));
    121123    else
    122124        ret = new JSEvent(JSEventPrototype::self(exec), event);
  • trunk/WebCore/xml/XMLHttpRequestProgressEvent.cpp

    r32318 r32341  
    5050}
    5151
    52 } // Namespace WebCore
     52} // namespace WebCore
  • trunk/WebCore/xml/XMLHttpRequestProgressEvent.h

    r32318 r32341  
    3939        virtual bool isXMLHttpRequestProgressEvent() const { return true; }
    4040
    41         // Avoid matching ProgressEvent.
    42         virtual bool isProgressEvent() const { return false; }
    43 
    44         bool lengthComputable() const { return m_lengthComputable; }
    45         unsigned loaded() const { return m_loaded; }
    46         unsigned total() const { return m_total; }
    47 
    4841        // Those 2 methods are to be compatible with Firefox and are only a wrapper on top of the real implementation.
    49         // FIXME: We should print a warning as they are deprecated.
    5042        unsigned position();
    5143        unsigned totalSize();
     44    };
    5245
    53     }; // class XMLHttpRequestProgressEvent
    54 
    55 } // Namespace WebCore
     46} // namespace WebCore
    5647
    5748#endif // XMLHttpRequestProgressEvent_h
Note: See TracChangeset for help on using the changeset viewer.