Changeset 32341 in webkit
- Timestamp:
- Apr 21, 2008 1:23:20 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r32340 r32341 1 2008-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 1 12 2008-04-21 Adam Roben <aroben@apple.com> 2 13 -
trunk/WebCore/bindings/js/JSEventCustom.cpp
r32316 r32341 111 111 ret = new JSMessageEvent(JSMessageEventPrototype::self(exec), static_cast<MessageEvent*>(event)); 112 112 #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 } 115 119 #if ENABLE(DOM_STORAGE) 116 120 else if (event->isStorageEvent()) 117 121 ret = new JSStorageEvent(JSStorageEventPrototype::self(exec), static_cast<StorageEvent*>(event)); 118 122 #endif 119 else if (event->isXMLHttpRequestProgressEvent())120 ret = new JSXMLHttpRequestProgressEvent(JSXMLHttpRequestProgressEventPrototype::self(exec), static_cast<XMLHttpRequestProgressEvent*>(event));121 123 else 122 124 ret = new JSEvent(JSEventPrototype::self(exec), event); -
trunk/WebCore/xml/XMLHttpRequestProgressEvent.cpp
r32318 r32341 50 50 } 51 51 52 } // Namespace WebCore52 } // namespace WebCore -
trunk/WebCore/xml/XMLHttpRequestProgressEvent.h
r32318 r32341 39 39 virtual bool isXMLHttpRequestProgressEvent() const { return true; } 40 40 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 48 41 // 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.50 42 unsigned position(); 51 43 unsigned totalSize(); 44 }; 52 45 53 }; // class XMLHttpRequestProgressEvent 54 55 } // Namespace WebCore 46 } // namespace WebCore 56 47 57 48 #endif // XMLHttpRequestProgressEvent_h
Note: See TracChangeset
for help on using the changeset viewer.