git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14916 268f45cc-cd09-0410...
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jun 2006 22:58:36 +0000 (22:58 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Jun 2006 22:58:36 +0000 (22:58 +0000)
64 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/js/kjs_dom.cpp
WebCore/bindings/js/kjs_events.cpp
WebCore/bindings/js/kjs_html.cpp
WebCore/bindings/js/kjs_window.cpp
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMEvents.mm
WebCore/bindings/objc/DOMInternal.mm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bridge/mac/FrameMac.mm
WebCore/dom/BeforeTextInsertedEvent.h
WebCore/dom/BeforeUnloadEvent.cpp [new file with mode: 0644]
WebCore/dom/BeforeUnloadEvent.h [new file with mode: 0644]
WebCore/dom/CharacterData.cpp
WebCore/dom/Clipboard.h [new file with mode: 0644]
WebCore/dom/ClipboardEvent.cpp [new file with mode: 0644]
WebCore/dom/ClipboardEvent.h [new file with mode: 0644]
WebCore/dom/ContainerNode.cpp
WebCore/dom/Document.cpp
WebCore/dom/Event.cpp [new file with mode: 0644]
WebCore/dom/Event.h [new file with mode: 0644]
WebCore/dom/EventTargetNode.cpp
WebCore/dom/KeyboardEvent.cpp [new file with mode: 0644]
WebCore/dom/KeyboardEvent.h [new file with mode: 0644]
WebCore/dom/MouseEvent.cpp [new file with mode: 0644]
WebCore/dom/MouseEvent.h [new file with mode: 0644]
WebCore/dom/MouseRelatedEvent.cpp [new file with mode: 0644]
WebCore/dom/MouseRelatedEvent.h [new file with mode: 0644]
WebCore/dom/MutationEvent.cpp [new file with mode: 0644]
WebCore/dom/MutationEvent.h [new file with mode: 0644]
WebCore/dom/RegisteredEventListener.cpp [new file with mode: 0644]
WebCore/dom/RegisteredEventListener.h [new file with mode: 0644]
WebCore/dom/UIEvent.cpp [new file with mode: 0644]
WebCore/dom/UIEvent.h [new file with mode: 0644]
WebCore/dom/UIEventWithKeyState.h [new file with mode: 0644]
WebCore/dom/WheelEvent.cpp [new file with mode: 0644]
WebCore/dom/WheelEvent.h [new file with mode: 0644]
WebCore/dom/dom2_eventsimpl.cpp [deleted file]
WebCore/dom/dom2_eventsimpl.h [deleted file]
WebCore/editing/EditCommand.cpp
WebCore/editing/SelectionController.cpp
WebCore/html/HTMLAnchorElement.cpp
WebCore/html/HTMLButtonElement.cpp
WebCore/html/HTMLDocument.cpp
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLFrameSetElement.cpp
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLSelectElement.cpp
WebCore/html/HTMLTextAreaElement.cpp
WebCore/ksvg2/events/SVGZoomEvent.h
WebCore/ksvg2/svg/SVGAElement.cpp
WebCore/page/Frame.cpp
WebCore/page/FrameView.cpp
WebCore/platform/PlatformKeyboardEvent.h
WebCore/platform/PlatformMouseEvent.h
WebCore/platform/PlatformWheelEvent.h
WebCore/platform/mac/ClipboardMac.h
WebCore/rendering/RenderFrameSet.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderTextField.cpp
WebCore/xml/xmlhttprequest.cpp

index 98fb88b2e23299a843338bfc40ef0bf2939e42fc..19240d44be0326a67df1feaac2bba25eaa4124d5 100644 (file)
@@ -1,3 +1,155 @@
+2006-06-19  Sam Weinig  <sam.weinig@gmail.com>
+
+        Reviewed by Darin.
+
+        - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9500
+          Split dom2_eventsimpl.* into separate files (one class per file).
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/kjs_binding.cpp:
+        * bindings/js/kjs_dom.cpp:
+        * bindings/js/kjs_events.cpp:
+        * bindings/js/kjs_html.cpp:
+        * bindings/js/kjs_window.cpp:
+        * bindings/objc/DOM.mm:
+        * bindings/objc/DOMEvents.mm:
+        * bindings/objc/DOMInternal.mm:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bridge/mac/FrameMac.mm:
+        * dom/BeforeTextInsertedEvent.h:
+        * dom/BeforeUnloadEvent.cpp: Added.
+        * dom/BeforeUnloadEvent.h: Added.
+        (WebCore::BeforeUnloadEvent::result):
+        * dom/CharacterData.cpp:
+        * dom/Clipboard.h: Added.
+        (WebCore::Clipboard::~Clipboard):
+        * dom/ClipboardEvent.cpp: Added.
+        (WebCore::ClipboardEvent::ClipboardEvent):
+        * dom/ClipboardEvent.h: Added.
+        (WebCore::ClipboardEvent::clipboard):
+        * dom/ContainerNode.cpp:
+        * dom/Document.cpp:
+        * dom/Event.cpp: Added.
+        (WebCore::Event::Event):
+        (WebCore::Event::initEvent):
+        * dom/Event.h: Added.
+        (WebCore::):
+        (WebCore::Event::):
+        (WebCore::Event::type):
+        (WebCore::Event::target):
+        (WebCore::Event::currentTarget):
+        (WebCore::Event::setCurrentTarget):
+        (WebCore::Event::eventPhase):
+        (WebCore::Event::setEventPhase):
+        (WebCore::Event::bubbles):
+        (WebCore::Event::cancelable):
+        (WebCore::Event::timeStamp):
+        (WebCore::Event::stopPropagation):
+        (WebCore::Event::propagationStopped):
+        (WebCore::Event::defaultPrevented):
+        (WebCore::Event::setDefaultHandled):
+        (WebCore::Event::defaultHandled):
+        (WebCore::Event::preventDefault):
+        (WebCore::Event::setDefaultPrevented):
+        (WebCore::Event::setCancelBubble):
+        (WebCore::Event::getCancelBubble):
+        (WebCore::Event::dispatched):
+        * dom/EventTargetNode.cpp:
+        * dom/KeyboardEvent.cpp: Added.
+        (WebCore::KeyboardEvent::KeyboardEvent):
+        (WebCore::KeyboardEvent::initKeyboardEvent):
+        * dom/KeyboardEvent.h: Added.
+        (WebCore::KeyboardEvent::):
+        (WebCore::KeyboardEvent::keyIdentifier):
+        (WebCore::KeyboardEvent::keyLocation):
+        (WebCore::KeyboardEvent::altGraphKey):
+        (WebCore::KeyboardEvent::keyEvent):
+        * dom/MouseEvent.cpp: Added.
+        (WebCore::MouseEvent::MouseEvent):
+        (WebCore::MouseEvent::initMouseEvent):
+        (WebCore::MouseEvent::isDragEvent):
+        (WebCore::MouseEvent::toElement):
+        (WebCore::MouseEvent::fromElement):
+        * dom/MouseEvent.h: Added.
+        (WebCore::MouseEvent::button):
+        (WebCore::MouseEvent::relatedTarget):
+        (WebCore::MouseEvent::clipboard):
+        * dom/MouseRelatedEvent.cpp: Added.
+        (WebCore::MouseRelatedEvent::MouseRelatedEvent):
+        * dom/MouseRelatedEvent.h: Added.
+        (WebCore::MouseRelatedEvent::screenX):
+        (WebCore::MouseRelatedEvent::screenY):
+        (WebCore::MouseRelatedEvent::clientX):
+        (WebCore::MouseRelatedEvent::clientY):
+        (WebCore::MouseRelatedEvent::layerX):
+        (WebCore::MouseRelatedEvent::layerY):
+        (WebCore::MouseRelatedEvent::offsetX):
+        (WebCore::MouseRelatedEvent::offsetY):
+        (WebCore::MouseRelatedEvent::isSimulated):
+        * dom/MutationEvent.cpp: Added.
+        (WebCore::MutationEvent::MutationEvent):
+        (WebCore::MutationEvent::initMutationEvent):
+        * dom/MutationEvent.h: Added.
+        (WebCore::MutationEvent::):
+        (WebCore::MutationEvent::relatedNode):
+        (WebCore::MutationEvent::prevValue):
+        (WebCore::MutationEvent::newValue):
+        (WebCore::MutationEvent::attrName):
+        (WebCore::MutationEvent::attrChange):
+        * dom/RegisteredEventListener.cpp: Added.
+        (WebCore::RegisteredEventListener::RegisteredEventListener):
+        (WebCore::operator==):
+        * dom/RegisteredEventListener.h: Added.
+        (WebCore::RegisteredEventListener::eventType):
+        (WebCore::RegisteredEventListener::listener):
+        (WebCore::RegisteredEventListener::useCapture):
+        (WebCore::RegisteredEventListener::removed):
+        (WebCore::RegisteredEventListener::setRemoved):
+        (WebCore::operator!=):
+        * dom/UIEvent.cpp: Added.
+        (WebCore::UIEvent::UIEvent):
+        (WebCore::UIEvent::initUIEvent):
+        * dom/UIEvent.h: Added.
+        (WebCore::UIEvent::view):
+        (WebCore::UIEvent::detail):
+        * dom/UIEventWithKeyState.h: Added.
+        (WebCore::UIEventWithKeyState::UIEventWithKeyState):
+        (WebCore::UIEventWithKeyState::ctrlKey):
+        (WebCore::UIEventWithKeyState::shiftKey):
+        (WebCore::UIEventWithKeyState::altKey):
+        (WebCore::UIEventWithKeyState::metaKey):
+        * dom/WheelEvent.cpp: Added.
+        (WebCore::WheelEvent::WheelEvent):
+        * dom/WheelEvent.h: Added.
+        (WebCore::WheelEvent::isHorizontal):
+        (WebCore::WheelEvent::wheelDelta):
+        * dom/dom2_eventsimpl.cpp: Removed.
+        * dom/dom2_eventsimpl.h: Removed.
+        * editing/EditCommand.cpp:
+        * editing/SelectionController.cpp:
+        * html/HTMLAnchorElement.cpp:
+        * html/HTMLButtonElement.cpp:
+        * html/HTMLDocument.cpp:
+        * html/HTMLElement.cpp:
+        * html/HTMLFrameSetElement.cpp:
+        * html/HTMLInputElement.cpp:
+        * html/HTMLSelectElement.cpp:
+        * html/HTMLTextAreaElement.cpp:
+        * ksvg2/events/SVGZoomEvent.h:
+        * ksvg2/svg/SVGAElement.cpp:
+        * page/Frame.cpp:
+        * page/FrameView.cpp:
+        * platform/PlatformKeyboardEvent.h:
+        * platform/PlatformMouseEvent.h:
+        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+        * platform/PlatformWheelEvent.h:
+        * platform/mac/ClipboardMac.h:
+        * rendering/RenderFrameSet.cpp:
+        * rendering/RenderLayer.cpp:
+        * rendering/RenderObject.cpp:
+        * rendering/RenderTextField.cpp:
+        * xml/xmlhttprequest.cpp:
+
 2006-06-19  Darin Adler  <darin@apple.com>
 
         Reviewed by Brady.
index b7ab5c69725a17bdd9f53c94a4146f41043c29ef..e3f56b3e3303d3ec3447b5731fb7ddbce518a614 100644 (file)
                7E6FEED90898582300C44C3F /* WebCoreScriptDebugger.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7E6FEED70898582300C44C3F /* WebCoreScriptDebugger.mm */; };
                8116895F09F2A4A000772CA0 /* SVGTRefElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8116895D09F2A4A000772CA0 /* SVGTRefElement.cpp */; };
                8116896009F2A4A000772CA0 /* SVGTRefElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8116895E09F2A4A000772CA0 /* SVGTRefElement.h */; };
+               85031B3C0A44EFC700F992E0 /* BeforeUnloadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B260A44EFC700F992E0 /* BeforeUnloadEvent.cpp */; };
+               85031B3D0A44EFC700F992E0 /* BeforeUnloadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */; };
+               85031B3E0A44EFC700F992E0 /* Clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B280A44EFC700F992E0 /* Clipboard.h */; };
+               85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */; };
+               85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */; };
+               85031B410A44EFC700F992E0 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2B0A44EFC700F992E0 /* Event.cpp */; };
+               85031B420A44EFC700F992E0 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2C0A44EFC700F992E0 /* Event.h */; };
+               85031B430A44EFC700F992E0 /* KeyboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2D0A44EFC700F992E0 /* KeyboardEvent.cpp */; };
+               85031B440A44EFC700F992E0 /* KeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */; };
+               85031B450A44EFC700F992E0 /* MouseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2F0A44EFC700F992E0 /* MouseEvent.cpp */; };
+               85031B460A44EFC700F992E0 /* MouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B300A44EFC700F992E0 /* MouseEvent.h */; };
+               85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */; };
+               85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */; };
+               85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B330A44EFC700F992E0 /* MutationEvent.cpp */; };
+               85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B340A44EFC700F992E0 /* MutationEvent.h */; };
+               85031B4B0A44EFC700F992E0 /* RegisteredEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B350A44EFC700F992E0 /* RegisteredEventListener.cpp */; };
+               85031B4C0A44EFC700F992E0 /* RegisteredEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B360A44EFC700F992E0 /* RegisteredEventListener.h */; };
+               85031B4D0A44EFC700F992E0 /* UIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B370A44EFC700F992E0 /* UIEvent.cpp */; };
+               85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B380A44EFC700F992E0 /* UIEvent.h */; };
+               85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */; };
+               85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */; };
+               85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B3B0A44EFC700F992E0 /* WheelEvent.h */; };
                854FE7300A2297BE0058D7AD /* NodeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE7260A2297BE0058D7AD /* NodeFilter.cpp */; };
                854FE7310A2297BE0058D7AD /* NodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 854FE7270A2297BE0058D7AD /* NodeFilter.h */; };
                854FE7320A2297BE0058D7AD /* NodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 854FE7280A2297BE0058D7AD /* NodeFilterCondition.cpp */; };
                93F198EF08245E59001E9ABC /* HTMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* HTMLParser.h */; };
                93F198F008245E59001E9ABC /* HTMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25302DE4396018635CA /* HTMLTokenizer.h */; };
                93F198F608245E59001E9ABC /* Decoder.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D27902DE43D7018635CA /* Decoder.h */; };
-               93F1991708245E59001E9ABC /* dom2_eventsimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30202DE4476018635CA /* dom2_eventsimpl.h */; };
                93F1991808245E59001E9ABC /* Range.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30402DE4476018635CA /* Range.h */; };
                93F1992108245E59001E9ABC /* xml_tokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D30A02DE4476018635CA /* xml_tokenizer.h */; };
                93F1992908245E59001E9ABC /* KWQCString.h in Headers */ = {isa = PBXBuildFile; fileRef = F587868302DE3B8601EA4122 /* KWQCString.h */; };
                93F19A9B08245E59001E9ABC /* HTMLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25002DE4396018635CA /* HTMLParser.cpp */; };
                93F19A9C08245E59001E9ABC /* HTMLTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25202DE4396018635CA /* HTMLTokenizer.cpp */; };
                93F19A9D08245E59001E9ABC /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D27802DE43D7018635CA /* Decoder.cpp */; };
-               93F19AB808245E59001E9ABC /* dom2_eventsimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30102DE4476018635CA /* dom2_eventsimpl.cpp */; };
                93F19AB908245E59001E9ABC /* Range.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30302DE4476018635CA /* Range.cpp */; };
                93F19ABC08245E59001E9ABC /* xml_tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D30902DE4476018635CA /* xml_tokenizer.cpp */; };
                93F19ABE08245E59001E9ABC /* WebCoreCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5B2A4FD02E2220F018635CB /* WebCoreCache.mm */; };
                84C0FA2C052B966D000440A1 /* southWestResizeCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = southWestResizeCursor.tiff; sourceTree = "<group>"; };
                84C0FA2D052B966D000440A1 /* waitCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = waitCursor.tiff; sourceTree = "<group>"; };
                84C0FA2E052B966D000440A1 /* westResizeCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = westResizeCursor.tiff; sourceTree = "<group>"; };
+               85031B260A44EFC700F992E0 /* BeforeUnloadEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BeforeUnloadEvent.cpp; sourceTree = "<group>"; };
+               85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BeforeUnloadEvent.h; sourceTree = "<group>"; };
+               85031B280A44EFC700F992E0 /* Clipboard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Clipboard.h; sourceTree = "<group>"; };
+               85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ClipboardEvent.cpp; sourceTree = "<group>"; };
+               85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ClipboardEvent.h; sourceTree = "<group>"; };
+               85031B2B0A44EFC700F992E0 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = "<group>"; };
+               85031B2C0A44EFC700F992E0 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; };
+               85031B2D0A44EFC700F992E0 /* KeyboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KeyboardEvent.cpp; sourceTree = "<group>"; };
+               85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KeyboardEvent.h; sourceTree = "<group>"; };
+               85031B2F0A44EFC700F992E0 /* MouseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MouseEvent.cpp; sourceTree = "<group>"; };
+               85031B300A44EFC700F992E0 /* MouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MouseEvent.h; sourceTree = "<group>"; };
+               85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MouseRelatedEvent.cpp; sourceTree = "<group>"; };
+               85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MouseRelatedEvent.h; sourceTree = "<group>"; };
+               85031B330A44EFC700F992E0 /* MutationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MutationEvent.cpp; sourceTree = "<group>"; };
+               85031B340A44EFC700F992E0 /* MutationEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MutationEvent.h; sourceTree = "<group>"; };
+               85031B350A44EFC700F992E0 /* RegisteredEventListener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegisteredEventListener.cpp; sourceTree = "<group>"; };
+               85031B360A44EFC700F992E0 /* RegisteredEventListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RegisteredEventListener.h; sourceTree = "<group>"; };
+               85031B370A44EFC700F992E0 /* UIEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UIEvent.cpp; sourceTree = "<group>"; };
+               85031B380A44EFC700F992E0 /* UIEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UIEvent.h; sourceTree = "<group>"; };
+               85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UIEventWithKeyState.h; sourceTree = "<group>"; };
+               85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WheelEvent.cpp; sourceTree = "<group>"; };
+               85031B3B0A44EFC700F992E0 /* WheelEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WheelEvent.h; sourceTree = "<group>"; };
                854FE7260A2297BE0058D7AD /* NodeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeFilter.cpp; sourceTree = "<group>"; };
                854FE7270A2297BE0058D7AD /* NodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeFilter.h; sourceTree = "<group>"; };
                854FE7280A2297BE0058D7AD /* NodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeFilterCondition.cpp; sourceTree = "<group>"; };
                F523D25302DE4396018635CA /* HTMLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTokenizer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D27802DE43D7018635CA /* Decoder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Decoder.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D27902DE43D7018635CA /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Decoder.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D30102DE4476018635CA /* dom2_eventsimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dom2_eventsimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D30202DE4476018635CA /* dom2_eventsimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = dom2_eventsimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D30302DE4476018635CA /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Range.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D30402DE4476018635CA /* Range.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Range.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D30902DE4476018635CA /* xml_tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xml_tokenizer.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                                A8C4A7F909D563270003AC8D /* Attribute.h */,
                                AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */,
                                AB23A32609BBA7D00067CC53 /* BeforeTextInsertedEvent.h */,
+                               85031B260A44EFC700F992E0 /* BeforeUnloadEvent.cpp */,
+                               85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */,
                                6550B693099DF0270090D781 /* CDATASection.cpp */,
                                6550B694099DF0270090D781 /* CDATASection.h */,
                                6550B695099DF0270090D781 /* CharacterData.cpp */,
                                93EEC1E609C2877700C515D1 /* CharacterData.idl */,
                                A818721A0977D3C0005826D9 /* ChildNodeList.cpp */,
                                A81872150977D3C0005826D9 /* ChildNodeList.h */,
+                               85031B280A44EFC700F992E0 /* Clipboard.h */,
+                               85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */,
+                               85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */,
                                6550B697099DF0270090D781 /* Comment.cpp */,
                                6550B698099DF0270090D781 /* Comment.h */,
                                A81872140977D3C0005826D9 /* ContainerNode.cpp */,
                                A8185F3209765765005826D9 /* DocumentType.cpp */,
                                A8185F3109765765005826D9 /* DocumentType.h */,
                                93EEC1E809C2877700C515D1 /* DocumentType.idl */,
-                               F523D30102DE4476018635CA /* dom2_eventsimpl.cpp */,
-                               F523D30202DE4476018635CA /* dom2_eventsimpl.h */,
                                A8185F3609765765005826D9 /* DOMImplementation.cpp */,
                                A8185F3309765765005826D9 /* DOMImplementation.h */,
                                93EEC1E909C2877700C515D1 /* DOMImplementation.idl */,
                                93EEC1EB09C2877700C515D1 /* Entity.idl */,
                                A8EA7EB90A1945D000A8EF5F /* EntityReference.cpp */,
                                A8EA7EB80A1945D000A8EF5F /* EntityReference.h */,
+                               85031B2B0A44EFC700F992E0 /* Event.cpp */,
+                               85031B2C0A44EFC700F992E0 /* Event.h */,
                                14E836D209F8512000B85AE4 /* Event.idl */,
                                935FBC4409BA00B900E230B1 /* EventListener.h */,
                                939885C108B7E3D100E707C4 /* EventNames.cpp */,
                                14EC267E09CA07E000E1EEEC /* EventTargetNode.cpp */,
                                14EC267D09CA07E000E1EEEC /* EventTargetNode.h */,
                                935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
+                               85031B2D0A44EFC700F992E0 /* KeyboardEvent.cpp */,
+                               85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */,
                                14CF7C2009F7110600EB3665 /* KeyboardEvent.idl */,
                                A8C4A7F409D563270003AC8D /* MappedAttribute.cpp */,
                                A8C4A7F309D563270003AC8D /* MappedAttribute.h */,
                                A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */,
+                               85031B2F0A44EFC700F992E0 /* MouseEvent.cpp */,
+                               85031B300A44EFC700F992E0 /* MouseEvent.h */,
                                141B94E509EC4223000E9413 /* MouseEvent.idl */,
+                               85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */,
+                               85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */,
+                               85031B330A44EFC700F992E0 /* MutationEvent.cpp */,
+                               85031B340A44EFC700F992E0 /* MutationEvent.h */,
                                93EEC1F309C2877700C515D1 /* MutationEvent.idl */,
                                A8C4A7F209D563270003AC8D /* NamedAttrMap.cpp */,
                                A8C4A7F109D563270003AC8D /* NamedAttrMap.h */,
                                F523D30302DE4476018635CA /* Range.cpp */,
                                F523D30402DE4476018635CA /* Range.h */,
                                936DD03A09CEAC270056AE8C /* Range.idl */,
+                               85031B350A44EFC700F992E0 /* RegisteredEventListener.cpp */,
+                               85031B360A44EFC700F992E0 /* RegisteredEventListener.h */,
                                A8C4A7EC09D563270003AC8D /* StyledElement.cpp */,
                                A8C4A7EB09D563270003AC8D /* StyledElement.h */,
                                6550B69B099DF0270090D781 /* Text.cpp */,
                                854FE72D0A2297BE0058D7AD /* Traversal.h */,
                                854FE72E0A2297BE0058D7AD /* TreeWalker.cpp */,
                                854FE72F0A2297BE0058D7AD /* TreeWalker.h */,
+                               85031B370A44EFC700F992E0 /* UIEvent.cpp */,
+                               85031B380A44EFC700F992E0 /* UIEvent.h */,
+                               85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */,
                                141B94EE09EC425A000E9413 /* UIEvent.idl */,
+                               85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */,
+                               85031B3B0A44EFC700F992E0 /* WheelEvent.h */,
                                93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
                                F523D30902DE4476018635CA /* xml_tokenizer.cpp */,
                                F523D30A02DE4476018635CA /* xml_tokenizer.h */,
                                93F198EF08245E59001E9ABC /* HTMLParser.h in Headers */,
                                93F198F008245E59001E9ABC /* HTMLTokenizer.h in Headers */,
                                93F198F608245E59001E9ABC /* Decoder.h in Headers */,
-                               93F1991708245E59001E9ABC /* dom2_eventsimpl.h in Headers */,
                                93F1991808245E59001E9ABC /* Range.h in Headers */,
                                93F1992108245E59001E9ABC /* xml_tokenizer.h in Headers */,
                                93F1992908245E59001E9ABC /* KWQCString.h in Headers */,
                                51D3EA170A3D24D300BADA35 /* SQLDatabase.h in Headers */,
                                BC92F1DE0A40AEA300AC0746 /* DeprecatedSlider.h in Headers */,
                                D05CED2A0A40BB2C00C5AF38 /* FormatBlockCommand.h in Headers */,
+                               85031B3D0A44EFC700F992E0 /* BeforeUnloadEvent.h in Headers */,
+                               85031B3E0A44EFC700F992E0 /* Clipboard.h in Headers */,
+                               85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */,
+                               85031B420A44EFC700F992E0 /* Event.h in Headers */,
+                               85031B440A44EFC700F992E0 /* KeyboardEvent.h in Headers */,
+                               85031B460A44EFC700F992E0 /* MouseEvent.h in Headers */,
+                               85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */,
+                               85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
+                               85031B4C0A44EFC700F992E0 /* RegisteredEventListener.h in Headers */,
+                               85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */,
+                               85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */,
+                               85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                93F19A9B08245E59001E9ABC /* HTMLParser.cpp in Sources */,
                                93F19A9C08245E59001E9ABC /* HTMLTokenizer.cpp in Sources */,
                                93F19A9D08245E59001E9ABC /* Decoder.cpp in Sources */,
-                               93F19AB808245E59001E9ABC /* dom2_eventsimpl.cpp in Sources */,
                                93F19AB908245E59001E9ABC /* Range.cpp in Sources */,
                                93F19ABC08245E59001E9ABC /* xml_tokenizer.cpp in Sources */,
                                93F19ABE08245E59001E9ABC /* WebCoreCache.mm in Sources */,
                                51D3EA180A3D24D300BADA35 /* SQLStatement.cpp in Sources */,
                                BC92F1DD0A40AEA300AC0746 /* DeprecatedSlider.cpp in Sources */,
                                D05CED290A40BB2C00C5AF38 /* FormatBlockCommand.cpp in Sources */,
+                               85031B3C0A44EFC700F992E0 /* BeforeUnloadEvent.cpp in Sources */,
+                               85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */,
+                               85031B410A44EFC700F992E0 /* Event.cpp in Sources */,
+                               85031B430A44EFC700F992E0 /* KeyboardEvent.cpp in Sources */,
+                               85031B450A44EFC700F992E0 /* MouseEvent.cpp in Sources */,
+                               85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */,
+                               85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */,
+                               85031B4B0A44EFC700F992E0 /* RegisteredEventListener.cpp in Sources */,
+                               85031B4D0A44EFC700F992E0 /* UIEvent.cpp in Sources */,
+                               85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index db34331b85b952ae18708d5a1de04ae5734e06e4..0d3f41e9c0db51859a92efda8b1da66b4f45dcc1 100644 (file)
 #include "config.h"
 #include "kjs_binding.h"
 
+#include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
 #include "PlatformString.h"
 #include "Range.h"
-#include "dom2_eventsimpl.h"
 #include "XPathEvaluator.h"
 #include "kjs_dom.h"
 #include "kjs_window.h"
index e3583d9cfd8f7081bb65ea29772343c07cd4dc59..89f7141cd2af7291b7ec923e222fa0abb912b200 100644 (file)
@@ -29,6 +29,8 @@
 #include "DocumentType.h"
 #include "Element.h"
 #include "Entity.h"
+#include "Event.h"
+#include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
@@ -55,7 +57,6 @@
 #include "ProcessingInstruction.h"
 #include "Range.h"
 #include "RenderView.h"
-#include "dom2_eventsimpl.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
 #include "kjs_traversal.h"
index 71623a0719ecc16cd639057e28b01c55c147449e..b1711222b953099e8bfb8a821fea6a4b5c4093a9 100644 (file)
 #include "config.h"
 #include "kjs_events.h"
 
+#include "Clipboard.h"
+#include "ClipboardEvent.h"
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "HTMLImageElement.h"
+#include "HTMLNames.h"
 #include "JSEvent.h"
+#include "JSKeyboardEvent.h"
+#include "JSMouseEvent.h"
 #include "JSMutationEvent.h"
 #include "JSWheelEvent.h"
-#include "JSMouseEvent.h"
-#include "JSKeyboardEvent.h"
-#include "dom2_eventsimpl.h"
-#include "HTMLNames.h"
-#include "HTMLImageElement.h"
+#include "KeyboardEvent.h"
+#include "MouseEvent.h"
+#include "MutationEvent.h"
+#include "UIEvent.h"
+#include "WheelEvent.h"
 #include "kjs_proxy.h"
 #include "kjs_window.h"
 
index 4ce7a9b479d97050da435faff50635e7f1d35b95..bb1f21281b09b600f95747a780c8b393a9519aab 100644 (file)
 #include "Frame.h"
 #include "HTMLAppletElement.h"
 #include "HTMLAreaElement.h"
+#include "HTMLBRElement.h"
 #include "HTMLBaseFontElement.h"
 #include "HTMLBlockquoteElement.h"
 #include "HTMLBodyElement.h"
-#include "HTMLBRElement.h"
 #include "HTMLDocument.h"
 #include "HTMLEmbedElement.h"
 #include "HTMLFieldSetElement.h"
 #include "HTMLFontElement.h"
 #include "HTMLFormElement.h"
 #include "HTMLFrameSetElement.h"
-#include "HTMLHeadingElement.h"
 #include "HTMLHRElement.h"
+#include "HTMLHeadingElement.h"
 #include "HTMLHtmlElement.h"
 #include "HTMLIFrameElement.h"
 #include "HTMLImageElement.h"
 #include "HTMLIsIndexElement.h"
+#include "HTMLLIElement.h"
 #include "HTMLLabelElement.h"
 #include "HTMLLegendElement.h"
-#include "HTMLLIElement.h"
 #include "HTMLMapElement.h"
 #include "HTMLMenuElement.h"
 #include "HTMLModElement.h"
@@ -56,6 +56,7 @@
 #include "HTMLParagraphElement.h"
 #include "HTMLParamElement.h"
 #include "HTMLPreElement.h"
+#include "HTMLQuoteElement.h"
 #include "HTMLScriptElement.h"
 #include "HTMLSelectElement.h"
 #include "HTMLTableCaptionElement.h"
 #include "HTMLTableElement.h"
 #include "HTMLTableRowElement.h"
 #include "HTMLTableSectionElement.h"
-#include "HTMLQuoteElement.h"
 #include "JSHTMLImageElement.h"
 #include "NameNodeList.h"
 #include "RenderLayer.h"
 #include "Text.h"
-#include "dom2_eventsimpl.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
 #include "kjs_proxy.h"
index 0d19e99b351cfb9435d87318109875b7281c2f1e..da2dbc82d4be4464df682cd6f150b50582813140 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "DOMWindow.h"
 #include "Element.h"
+#include "EventListener.h"
 #include "EventNames.h"
 #include "FloatRect.h"
 #include "Frame.h"
@@ -49,7 +50,6 @@
 #include "RenderView.h"
 #include "Screen.h"
 #include "SelectionController.h"
-#include "dom2_eventsimpl.h"
 #include "htmlediting.h"
 #include "kjs_css.h"
 #include "kjs_events.h"
index cda89a970d0b2bbe569a02c8ff0982c6acbc4979..8c9314468260914e6840646d1de7fed123b0fbbf 100644 (file)
@@ -38,6 +38,7 @@
 #import "DocumentType.h"
 #import "Entity.h"
 #import "EntityReference.h"
+#import "Event.h"
 #import "EventListener.h"
 #import "FoundationExtras.h"
 #import "FrameMac.h"
index e89e40f729f6576bfd6f015ed7c5d04209987988..693772147ca3e7955601977b533176caa8c09108 100644 (file)
 #import "DOMInternal.h"
 #import "DOMViewsInternal.h"
 #import "Document.h"
-#import "dom2_eventsimpl.h"
+#import "Event.h"
+#import "MouseEvent.h"
+#import "MutationEvent.h"
+#import "UIEvent.h"
 
 using namespace WebCore;
 
index e3bb51f121b1184d36bc4621fea7135e9a05646a..6b3473f255672d8f2c75f7b9883f398ebe5b52b8 100644 (file)
@@ -27,6 +27,7 @@
 #import "DOMInternal.h"
 
 #import "Document.h"
+#import "Event.h"
 #import "FrameMac.h"
 #import "Range.h"
 #import "kjs_dom.h"
index 3fc3d8a10e833542ebbb918fa1f0662b06b05e4b..3d176ff57723637acc63e572ed7334ab7c4efc9f 100644 (file)
@@ -149,14 +149,7 @@ sub AddIncludesForType
     
     # When we're finished with the one-file-per-class 
     # reorganization, we won't need these special cases.
-    if ($type eq "MutationEvent" or
-        $type eq "KeyboardEvent" or
-        $type eq "MouseEvent" or
-        $type eq "Event" or
-        $type eq "UIEvent" or
-        $type eq "WheelEvent") {
-        $implIncludes{"dom2_eventsimpl.h"} = 1;
-    } elsif ($codeGenerator->IsPrimitiveType($type)
+    if ($codeGenerator->IsPrimitiveType($type)
         or $type eq "DOMString" or $type eq "DOMObject" or $type eq "RGBColor" or $type eq "Rect") {
     } else {
         # default, include the same named file
@@ -1106,7 +1099,7 @@ sub NativeToJSValue
         return "toJS(exec, $value)";
     } elsif ($type eq "Event") {
         $implIncludes{"kjs_events.h"} = 1;
-        $implIncludes{"dom2_eventsimpl.h"} = 1;
+        $implIncludes{"Event.h"} = 1;
         return "toJS(exec, $value)";
     } elsif ($type eq "NodeList" or $type eq "NamedNodeMap") {
         $implIncludes{"kjs_dom.h"} = 1;
index 444b1aa84fe846b2ee52ad2d011a46b33b030e21..1613c166c29046b60063d6b5e99037606f850b94 100644 (file)
 #import "FrameMac.h"
 
 #import "AccessibilityObjectCache.h"
+#import "BeforeUnloadEvent.h"
 #import "BlockExceptions.h"
 #import "BrowserExtensionMac.h"
 #import "CSSComputedStyleDeclaration.h"
 #import "Cache.h"
+#import "ClipboardEvent.h"
 #import "Cursor.h"
 #import "DOMInternal.h"
 #import "DOMWindow.h"
 #import "Decoder.h"
+#import "Event.h"
 #import "EventNames.h"
 #import "FloatRect.h"
 #import "FoundationExtras.h"
 #import "PlatformWheelEvent.h"
 #import "Plugin.h"
 #import "RegularExpression.h"
-#import "RenderView.h"
 #import "RenderImage.h"
 #import "RenderListItem.h"
 #import "RenderPart.h"
 #import "RenderTableCell.h"
 #import "RenderTheme.h"
+#import "RenderView.h"
 #import "TextIterator.h"
 #import "TransferJob.h"
 #import "WebCoreFrameBridge.h"
@@ -73,7 +76,6 @@
 #import <JavaScriptCore/WebScriptObjectPrivate.h>
 #import <JavaScriptCore/npruntime_impl.h>
 
-
 #undef _KWQ_TIMING
 
 @interface NSObject (WebPlugIn)
index a02f29e191de1d87d4151dfda2a9508d116b211a..7b294bbf8dc78287905d548acda63bd5b751f042 100644 (file)
 #ifndef BEFORETEXTINSERTEDEVENTIMPL_H
 #define BEFORETEXTINSERTEDEVENTIMPL_H
 
-#include "dom2_eventsimpl.h"
+#include "Event.h"
 
 namespace WebCore {
 
-class BeforeTextInsertedEvent : public Event
-{
+class BeforeTextInsertedEvent : public Event {
 public:
     BeforeTextInsertedEvent(const String&);
 
diff --git a/WebCore/dom/BeforeUnloadEvent.cpp b/WebCore/dom/BeforeUnloadEvent.cpp
new file mode 100644 (file)
index 0000000..4eab00a
--- /dev/null
@@ -0,0 +1,49 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "BeforeUnloadEvent.h"
+
+#include "EventNames.h"
+
+namespace WebCore {
+
+using namespace EventNames;
+
+BeforeUnloadEvent::BeforeUnloadEvent()
+    : Event(beforeunloadEvent, false, true)
+{
+}
+
+bool BeforeUnloadEvent::storesResultAsString() const
+{
+    return true;
+}
+
+void BeforeUnloadEvent::storeResult(const String& s)
+{
+    m_result = s.impl();
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/BeforeUnloadEvent.h b/WebCore/dom/BeforeUnloadEvent.h
new file mode 100644 (file)
index 0000000..a09aacd
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef BeforeUnloadEvent_h
+#define BeforeUnloadEvent_h
+
+#include "Event.h"
+
+namespace WebCore {
+
+    class BeforeUnloadEvent : public Event {
+    public:
+        BeforeUnloadEvent();
+
+        virtual bool storesResultAsString() const;
+        virtual void storeResult(const String&);
+
+        String result() const { return m_result.get(); }
+
+    private:
+        RefPtr<StringImpl> m_result;
+    };
+
+} // namespace WebCore
+
+#endif // BeforeUnloadEvent_h
index fb76246c98dabe2f096ff200b1bd88b785607402..d49b3e014525021dd83f3cae13e0097fdce35720 100644 (file)
@@ -27,9 +27,9 @@
 #include "Document.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
-#include "RenderText.h"
-#include "dom2_eventsimpl.h"
 #include "KWQTextStream.h"
+#include "MutationEvent.h"
+#include "RenderText.h"
 
 namespace WebCore {
 
diff --git a/WebCore/dom/Clipboard.h b/WebCore/dom/Clipboard.h
new file mode 100644 (file)
index 0000000..de5f21f
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef Clipboard_h
+#define Clipboard_h
+
+#include "AtomicString.h"
+#include "Node.h"
+#include "Shared.h"
+
+class DeprecatedStringList;
+
+namespace WebCore {
+
+    class CachedImage;
+    class IntPoint;
+
+    // State available during IE's events for drag and drop and copy/paste
+    class Clipboard : public Shared<Clipboard> {
+    public:
+        virtual ~Clipboard() { }
+
+        // Is this operation a drag-drop or a copy-paste?
+        virtual bool isForDragging() const = 0;
+
+        virtual String dropEffect() const = 0;
+        virtual void setDropEffect(const String&) = 0;
+        virtual String effectAllowed() const = 0;
+        virtual void setEffectAllowed(const String&) = 0;
+    
+        virtual void clearData(const String& type) = 0;
+        virtual void clearAllData() = 0;
+        virtual String getData(const String& type, bool& success) const = 0;
+        virtual bool setData(const String& type, const String& data) = 0;
+    
+        // extensions beyond IE's API
+        virtual DeprecatedStringList types() const = 0;
+    
+        virtual IntPoint dragLocation() const = 0;
+        virtual CachedImage* dragImage() const = 0;
+        virtual void setDragImage(CachedImage*, const IntPoint&) = 0;
+        virtual Node* dragImageElement() = 0;
+        virtual void setDragImageElement(Node*, const IntPoint&) = 0;
+    };
+
+} // namespace WebCore
+
+#endif // Clipboard_h
diff --git a/WebCore/dom/ClipboardEvent.cpp b/WebCore/dom/ClipboardEvent.cpp
new file mode 100644 (file)
index 0000000..1f4632f
--- /dev/null
@@ -0,0 +1,44 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "ClipboardEvent.h"
+
+namespace WebCore {
+
+ClipboardEvent::ClipboardEvent()
+{
+}
+
+ClipboardEvent::ClipboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, Clipboard* clipboard)
+    : Event(eventType, canBubble, cancelable), m_clipboard(clipboard)
+{
+}
+
+bool ClipboardEvent::isClipboardEvent() const
+{
+    return true;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/ClipboardEvent.h b/WebCore/dom/ClipboardEvent.h
new file mode 100644 (file)
index 0000000..1999cac
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef ClipboardEvent_h
+#define ClipboardEvent_h
+
+#include "Clipboard.h"
+#include "Event.h"
+
+namespace WebCore {
+
+    class ClipboardEvent : public Event {
+    public:
+        ClipboardEvent();
+        ClipboardEvent(const AtomicString& type, bool canBubbleArg, bool cancelableArg, Clipboard* clipboardArg);
+
+        Clipboard* clipboard() const { return m_clipboard.get(); }
+        virtual bool isClipboardEvent() const;
+    private:
+        RefPtr<Clipboard> m_clipboard;
+    };
+
+} // namespace WebCore
+
+#endif // ClipboardEvent_h
index 6bc0857165cc099f4d55253b0c297518dc774f32..1d7ade2d45fe8db2ed7f6508df1703d516caf8d7 100644 (file)
 #include "ExceptionCode.h"
 #include "FrameView.h"
 #include "InlineTextBox.h"
-#include "SystemTime.h"
-#include "dom2_eventsimpl.h"
+#include "MutationEvent.h"
 #include "RenderTheme.h"
 #include "RootInlineBox.h"
+#include "SystemTime.h"
 
 namespace WebCore {
 
index 1802d935e31d7b7e96d3c28fcd2b47816129b4dd..fe3daa6a751c10c9a03ac247cabcf7cd8bbaedc5 100644 (file)
@@ -37,6 +37,7 @@
 #include "DocumentType.h"
 #include "EditingText.h"
 #include "EntityReference.h"
+#include "Event.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
 #include "HTMLStyleElement.h"
 #include "JSEditor.h"
+#include "KeyboardEvent.h"
 #include "Logging.h"
+#include "MouseEvent.h"
 #include "MouseEventWithHitTestResults.h"
+#include "MutationEvent.h"
 #include "NameNodeList.h"
 #include "NodeFilter.h"
 #include "NodeIterator.h"
 #include "PlatformKeyboardEvent.h"
 #include "ProcessingInstruction.h"
+#include "RegisteredEventListener.h"
 #include "RegularExpression.h"
 #include "RenderArena.h"
 #include "RenderView.h"
@@ -71,9 +76,9 @@
 #include "SystemTime.h"
 #include "TextIterator.h"
 #include "TreeWalker.h"
+#include "UIEvent.h"
 #include "csshelper.h"
 #include "cssstyleselector.h"
-#include "dom2_eventsimpl.h"
 #include "kjs_binding.h"
 #include "kjs_proxy.h"
 #include "xml_tokenizer.h"
diff --git a/WebCore/dom/Event.cpp b/WebCore/dom/Event.cpp
new file mode 100644 (file)
index 0000000..246f726
--- /dev/null
@@ -0,0 +1,134 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "Event.h"
+
+#include "AtomicString.h"
+#include "Node.h"
+#include "SystemTime.h"
+
+namespace WebCore {
+
+Event::Event()
+    : m_canBubble(false)
+    , m_cancelable(false)
+    , m_propagationStopped(false)
+    , m_defaultPrevented(false)
+    , m_defaultHandled(false)
+    , m_cancelBubble(false)
+    , m_currentTarget(0)
+    , m_eventPhase(0)
+    , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
+{
+}
+
+Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg)
+    : m_type(eventType)
+    , m_canBubble(canBubbleArg)
+    , m_cancelable(cancelableArg)
+    , m_propagationStopped(false)
+    , m_defaultPrevented(false)
+    , m_defaultHandled(false)
+    , m_cancelBubble(false)
+    , m_currentTarget(0)
+    , m_eventPhase(0)
+    , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
+{
+}
+
+Event::~Event()
+{
+}
+
+void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool cancelableArg)
+{
+    if (dispatched())
+        return;
+
+    m_type = eventTypeArg;
+    m_canBubble = canBubbleArg;
+    m_cancelable = cancelableArg;
+}
+
+bool Event::isUIEvent() const
+{
+    return false;
+}
+
+bool Event::isMouseEvent() const
+{
+    return false;
+}
+
+bool Event::isMutationEvent() const
+{
+    return false;
+}
+
+bool Event::isKeyboardEvent() const
+{
+    return false;
+}
+
+bool Event::isDragEvent() const
+{
+    return false;
+}
+
+bool Event::isClipboardEvent() const
+{
+    return false;
+}
+
+bool Event::isWheelEvent() const
+{
+    return false;
+}
+
+bool Event::isBeforeTextInsertedEvent() const
+{
+    return false;
+}
+
+bool Event::storesResultAsString() const
+{
+    return false;
+}
+
+void Event::storeResult(const String&)
+{
+}
+
+void Event::setTarget(Node* target)
+{
+    m_target = target;
+    if (target)
+        receivedTarget();
+}
+
+void Event::receivedTarget()
+{
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/Event.h b/WebCore/dom/Event.h
new file mode 100644 (file)
index 0000000..af8db96
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef Event_h
+#define Event_h
+
+#include "AtomicString.h"
+#include "Node.h"
+#include "Shared.h"
+
+namespace WebCore {
+
+    // FIXME: this should probably defined elsewhere.
+    typedef unsigned long long DOMTimeStamp;
+
+    // FIXME: these too should probably defined elsewhere.
+    const int EventExceptionOffset = 100;
+    const int EventExceptionMax = 199;
+    enum EventExceptionCode { UNSPECIFIED_EVENT_TYPE_ERR = EventExceptionOffset };
+
+    class Event : public Shared<Event> {
+    public:
+        enum PhaseType { 
+            CAPTURING_PHASE     = 1, 
+            AT_TARGET           = 2,
+            BUBBLING_PHASE      = 3 
+        };
+
+        // Reverse-engineered from Netscape
+        enum EventType {
+            MOUSEDOWN           = 1,
+            MOUSEUP             = 2,
+            MOUSEOVER           = 4,
+            MOUSEOUT            = 8,
+            MOUSEMOVE           = 16,
+            MOUSEDRAG           = 32,
+            CLICK               = 64,
+            DBLCLICK            = 128,
+            KEYDOWN             = 256,
+            KEYUP               = 512,
+            KEYPRESS            = 1024,
+            DRAGDROP            = 2048,
+            FOCUS               = 4096,
+            BLUR                = 8192,
+            SELECT              = 16384,
+            CHANGE              = 32768
+        };
+    
+        Event();
+        Event(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg);
+        virtual ~Event();
+
+        void initEvent(const AtomicString &eventTypeArg, bool canBubbleArg, bool cancelableArg);
+
+        const AtomicString& type() const { return m_type; }
+        
+        Node* target() const { return m_target.get(); }
+        void setTarget(Node*);
+        
+        Node* currentTarget() const { return m_currentTarget; }
+        void setCurrentTarget(Node* currentTarget) { m_currentTarget = currentTarget; }
+        
+        unsigned short eventPhase() const { return m_eventPhase; }
+        void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; }
+        
+        bool bubbles() const { return m_canBubble; }
+        bool cancelable() const { return m_cancelable; }
+        DOMTimeStamp timeStamp() { return m_createTime; }
+        void stopPropagation() { m_propagationStopped = true; }
+
+        virtual bool isUIEvent() const;
+        virtual bool isMouseEvent() const;
+        virtual bool isMutationEvent() const;
+        virtual bool isKeyboardEvent() const;
+        virtual bool isDragEvent() const; // a subset of mouse events
+        virtual bool isClipboardEvent() const;
+        virtual bool isWheelEvent() const;
+        virtual bool isBeforeTextInsertedEvent() const;
+
+        bool propagationStopped() const { return m_propagationStopped; }
+        bool defaultPrevented() const { return m_defaultPrevented; }
+
+        void setDefaultHandled() { m_defaultHandled = true; }
+        bool defaultHandled() const { return m_defaultHandled; }
+
+        void preventDefault() { if (m_cancelable) m_defaultPrevented = true; }
+        void setDefaultPrevented(bool defaultPrevented) { m_defaultPrevented = defaultPrevented; }
+
+        void setCancelBubble(bool cancel) { m_cancelBubble = cancel; }
+        bool getCancelBubble() const { return m_cancelBubble; }
+
+        virtual bool storesResultAsString() const;
+        virtual void storeResult(const String&);
+
+    protected:
+        virtual void receivedTarget();
+        bool dispatched() const { return m_target; }
+
+    private:
+        AtomicString m_type;
+        bool m_canBubble;
+        bool m_cancelable;
+
+        bool m_propagationStopped;
+        bool m_defaultPrevented;
+        bool m_defaultHandled;
+        bool m_cancelBubble;
+
+        Node* m_currentTarget; // ref > 0 maintained externally
+        unsigned short m_eventPhase;
+        RefPtr<Node> m_target;
+        DOMTimeStamp m_createTime;
+    };
+
+} // namespace WebCore
+
+#endif // Event_h
index 5c52c5bb2094573a0df567996cc6ad5dc967b2f4..da2571b17ef80f82685c5ae9b3aae71ad50c6b3f 100644 (file)
 
 #include "Document.h"
 #include "Element.h"
+#include "Event.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "HTMLNames.h"
+#include "KWQTextStream.h"
+#include "KeyboardEvent.h"
+#include "MouseEvent.h"
+#include "MutationEvent.h"
 #include "PlatformMouseEvent.h"
 #include "PlatformWheelEvent.h"
-#include "dom2_eventsimpl.h"
+#include "RegisteredEventListener.h"
+#include "UIEvent.h"
+#include "WheelEvent.h"
 #include "kjs_proxy.h"
-#include "HTMLNames.h"
-#include "KWQTextStream.h"
 
 namespace WebCore {
 
diff --git a/WebCore/dom/KeyboardEvent.cpp b/WebCore/dom/KeyboardEvent.cpp
new file mode 100644 (file)
index 0000000..5b6be8b
--- /dev/null
@@ -0,0 +1,116 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "KeyboardEvent.h"
+
+#include "EventNames.h"
+#include "PlatformKeyboardEvent.h"
+
+namespace WebCore {
+
+using namespace EventNames;
+
+KeyboardEvent::KeyboardEvent()
+    : m_keyEvent(0)
+    , m_keyLocation(DOM_KEY_LOCATION_STANDARD)
+    , m_altGraphKey(false)
+{
+}
+
+KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view)
+    : UIEventWithKeyState(key.isKeyUp() ? keyupEvent : key.isAutoRepeat() ? keypressEvent : keydownEvent,
+                          true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey())
+    , m_keyEvent(new PlatformKeyboardEvent(key))
+    , m_keyIdentifier(String(key.keyIdentifier()).impl())
+    , m_keyLocation(key.isKeypad() ? DOM_KEY_LOCATION_NUMPAD : DOM_KEY_LOCATION_STANDARD)
+    , m_altGraphKey(false)
+{
+}
+
+KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView *view,
+                             const String &keyIdentifier,  unsigned keyLocation,
+                             bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
+    : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, ctrlKey, altKey, shiftKey, metaKey)
+    , m_keyEvent(0)
+    , m_keyIdentifier(keyIdentifier.impl())
+    , m_keyLocation(keyLocation)
+    , m_altGraphKey(altGraphKey)
+{
+}
+
+KeyboardEvent::~KeyboardEvent()
+{
+    delete m_keyEvent;
+}
+
+void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                                      const String &keyIdentifier, unsigned keyLocation,
+                                      bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
+{
+    if (dispatched())
+        return;
+
+    initUIEvent(type, canBubble, cancelable, view, 0);
+
+    m_keyIdentifier = keyIdentifier.impl();
+    m_keyLocation = keyLocation;
+    m_ctrlKey = ctrlKey;
+    m_shiftKey = shiftKey;
+    m_altKey = altKey;
+    m_metaKey = metaKey;
+    m_altGraphKey = altGraphKey;
+}
+
+int KeyboardEvent::keyCode() const
+{
+    if (!m_keyEvent)
+        return 0;
+    if (type() == keydownEvent || type() == keyupEvent)
+        return m_keyEvent->WindowsKeyCode();
+    return charCode();
+}
+
+int KeyboardEvent::charCode() const
+{
+    if (!m_keyEvent)
+        return 0;
+    String text = m_keyEvent->text();
+    if (text.length() != 1)
+        return 0;
+    return text[0];
+}
+
+bool KeyboardEvent::isKeyboardEvent() const
+{
+    return true;
+}
+
+int KeyboardEvent::which() const
+{
+    // Netscape's "which" returns a virtual key code for keydown and keyup, and a character code for keypress.
+    // That's exactly what IE's "keyCode" returns. So they are the same for keyboard events.
+    return keyCode();
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/KeyboardEvent.h b/WebCore/dom/KeyboardEvent.h
new file mode 100644 (file)
index 0000000..cfcb6d4
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef KeyboardEvent_h
+#define KeyboardEvent_h
+
+#include "UIEventWithKeyState.h"
+
+namespace WebCore {
+
+    class PlatformKeyboardEvent;
+
+    // Introduced in DOM Level 3
+    class KeyboardEvent : public UIEventWithKeyState {
+    public:
+        enum KeyLocationCode {
+            DOM_KEY_LOCATION_STANDARD      = 0x00,
+            DOM_KEY_LOCATION_LEFT          = 0x01,
+            DOM_KEY_LOCATION_RIGHT         = 0x02,
+            DOM_KEY_LOCATION_NUMPAD        = 0x03,
+        };
+        
+        KeyboardEvent();
+        KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
+        KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                      const String& keyIdentifier, unsigned keyLocation,
+                      bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey);
+        virtual ~KeyboardEvent();
+    
+        void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                               const String& keyIdentifier, unsigned keyLocation,
+                               bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey);
+    
+        String keyIdentifier() const { return m_keyIdentifier.get(); }
+        unsigned keyLocation() const { return m_keyLocation; }
+    
+        bool altGraphKey() const { return m_altGraphKey; }
+    
+        const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent; }
+
+        int keyCode() const; // key code for keydown and keyup, character for other events
+        int charCode() const;
+    
+        virtual bool isKeyboardEvent() const;
+        virtual int which() const;
+
+    private:
+        PlatformKeyboardEvent* m_keyEvent;
+        RefPtr<StringImpl> m_keyIdentifier;
+        unsigned m_keyLocation;
+        bool m_altGraphKey : 1;
+    };
+
+} // namespace WebCore
+
+#endif // KeyboardEvent_h
diff --git a/WebCore/dom/MouseEvent.cpp b/WebCore/dom/MouseEvent.cpp
new file mode 100644 (file)
index 0000000..b6d2b2d
--- /dev/null
@@ -0,0 +1,110 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "MouseEvent.h"
+
+#include "EventNames.h"
+
+namespace WebCore {
+
+using namespace EventNames;
+
+MouseEvent::MouseEvent()
+    : m_button(0)
+{
+}
+
+MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView* view,
+                       int detail, int screenX, int screenY, int clientX, int clientY,
+                       bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
+                       EventTargetNode* relatedTarget, Clipboard* clipboard, bool isSimulated)
+    : MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, screenX, screenY,
+                        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, isSimulated)
+    , m_button(button)
+    , m_relatedTarget(relatedTarget)
+    , m_clipboard(clipboard)
+{
+}
+
+MouseEvent::~MouseEvent()
+{
+}
+
+void MouseEvent::initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                                int detail, int screenX, int screenY, int clientX, int clientY,
+                                bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
+                                unsigned short button, EventTargetNode* relatedTarget)
+{
+    if (dispatched())
+        return;
+
+    initUIEvent(type, canBubble, cancelable, view, detail);
+
+    m_screenX = screenX;
+    m_screenY = screenY;
+    m_clientX = clientX;
+    m_clientY = clientY;
+    m_ctrlKey = ctrlKey;
+    m_altKey = altKey;
+    m_shiftKey = shiftKey;
+    m_metaKey = metaKey;
+    m_button = button;
+    m_relatedTarget = relatedTarget;
+
+    initCoordinates();
+}
+
+bool MouseEvent::isMouseEvent() const
+{
+    return true;
+}
+
+bool MouseEvent::isDragEvent() const
+{
+    const AtomicString& t = type();
+    return t == dragenterEvent || t == dragoverEvent || t == dragleaveEvent || t == dropEvent
+               || t == dragstartEvent|| t == dragEvent || t == dragendEvent;
+}
+
+int MouseEvent::which() const
+{
+    // For KHTML, the return values for left, middle and right mouse buttons are 0, 1, 2, respectively.
+    // For the Netscape "which" property, the return values for left, middle and right mouse buttons are 1, 2, 3, respectively. 
+    // So we must add 1.
+    return m_button + 1;
+}
+
+Node* MouseEvent::toElement() const
+{
+    // MSIE extension - "the object toward which the user is moving the mouse pointer"
+    return (type() == mouseoutEvent) ? relatedTarget() : target();
+}
+
+Node* MouseEvent::fromElement() const
+{
+    // MSIE extension - "object from which activation or the mouse pointer is exiting during the event" (huh?)
+    return (type() == mouseoutEvent) ? target() : relatedTarget();
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/MouseEvent.h b/WebCore/dom/MouseEvent.h
new file mode 100644 (file)
index 0000000..b210ba1
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef MouseEvent_h
+#define MouseEvent_h
+
+#include "Clipboard.h"
+#include "EventTargetNode.h"
+#include "MouseRelatedEvent.h"
+
+namespace WebCore {
+
+    // Introduced in DOM Level 2
+    class MouseEvent : public MouseRelatedEvent {
+    public:
+        MouseEvent();
+        MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                   int detail, int screenX, int screenY, int clientX, int clientY,
+                   bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
+                   EventTargetNode* relatedTarget, Clipboard* clipboard = 0, bool isSimulated = false);
+        virtual ~MouseEvent();
+
+        void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                            int detail, int screenX, int screenY, int clientX, int clientY,
+                            bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
+                            unsigned short button, EventTargetNode* relatedTarget);
+
+        // WinIE uses 1,4,2 for left/middle/right but not for click (just for mousedown/up, maybe others),
+        // but we will match the standard DOM.
+        unsigned short button() const { return m_button; }
+        EventTargetNode* relatedTarget() const { return m_relatedTarget.get(); }
+        Clipboard* clipboard() const { return m_clipboard.get(); }
+        
+        Node* toElement() const;
+        Node* fromElement() const;
+
+        virtual bool isMouseEvent() const;
+        virtual bool isDragEvent() const;
+        virtual int which() const;
+
+    private:
+        unsigned short m_button;
+        RefPtr<EventTargetNode> m_relatedTarget;
+        RefPtr<Clipboard> m_clipboard;
+    };
+
+} // namespace WebCore
+
+#endif // MouseEvent_h
diff --git a/WebCore/dom/MouseRelatedEvent.cpp b/WebCore/dom/MouseRelatedEvent.cpp
new file mode 100644 (file)
index 0000000..0d16ab7
--- /dev/null
@@ -0,0 +1,149 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "MouseRelatedEvent.h"
+
+#include "AtomicString.h"
+#include "Document.h"
+#include "Node.h"
+#include "RenderLayer.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+
+MouseRelatedEvent::MouseRelatedEvent()
+    : m_screenX(0)
+    , m_screenY(0)
+    , m_clientX(0)
+    , m_clientY(0)
+    , m_pageX(0)
+    , m_pageY(0)
+    , m_layerX(0)
+    , m_layerY(0)
+    , m_offsetX(0)
+    , m_offsetY(0)
+    , m_isSimulated(false)
+{
+}
+
+MouseRelatedEvent::MouseRelatedEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView* view,
+                                     int detail, int screenX, int screenY, int clientX, int clientY,
+                                     bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated)
+    : UIEventWithKeyState(eventType, canBubble, cancelable, view, detail, ctrlKey, altKey, shiftKey, metaKey)
+    , m_screenX(screenX)
+    , m_screenY(screenY)
+    , m_clientX(clientX)
+    , m_clientY(clientY)
+    , m_isSimulated(isSimulated)
+{
+    initCoordinates();
+}
+
+void MouseRelatedEvent::initCoordinates()
+{
+    // Set up initial values for coordinates.
+    // Correct values can't be computed until we have at target, so receivedTarget
+    // does the "real" computation.
+    m_pageX = m_clientX;
+    m_pageY = m_clientY;
+    m_layerX = m_pageX;
+    m_layerY = m_pageY;
+    m_offsetX = m_pageX;
+    m_offsetY = m_pageY;
+}
+
+void MouseRelatedEvent::receivedTarget()
+{
+    // Compute coordinates that are based on the target.
+    m_offsetX = m_pageX;
+    m_offsetY = m_pageY;
+    m_layerX = m_pageX;    
+    m_layerY = m_pageY;    
+
+    Node* targ = target();
+    ASSERT(targ);
+
+    // Must have an updated render tree for this math to work correctly.
+    targ->document()->updateRendering();
+
+    // FIXME: clientX/Y should not be the same as pageX/Y!
+    // Currently the passed-in clientX and clientY are incorrectly actually
+    // pageX and pageY values, so we don't have any work to do here, but if
+    // we started passing in correct clientX and clientY, we'd want to compute
+    // pageX and pageY here.
+
+    // Adjust offsetX/Y to be relative to the target's position.
+    if (!isSimulated()) {
+        if (RenderObject* r = targ->renderer()) {
+            int rx, ry;
+            if (r->absolutePosition(rx, ry)) {
+                m_offsetX -= rx;
+                m_offsetY -= ry;
+            }
+        }
+    }
+
+    // Adjust layerX/Y to be relative to the layer.
+    // FIXME: We're pretty sure this is the wrong defintion of "layer."
+    // Our RenderLayer is a more modern concept, and layerX/Y is some
+    // other notion about groups of elements; we should test and fix this.
+    Node* n = targ;
+    while (n && !n->renderer())
+        n = n->parent();
+    if (n) {
+        RenderLayer* layer = n->renderer()->enclosingLayer();
+        layer->updateLayerPosition();
+        for (; layer; layer = layer->parent()) {
+            m_layerX -= layer->xPos();
+            m_layerY -= layer->yPos();
+        }
+    }
+}
+
+int MouseRelatedEvent::pageX() const
+{
+    return m_pageX;
+}
+
+int MouseRelatedEvent::pageY() const
+{
+    return m_pageY;
+}
+
+int MouseRelatedEvent::x() const
+{
+    // FIXME: This is not correct.
+    // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events.html>.
+    return m_clientX;
+}
+
+int MouseRelatedEvent::y() const
+{
+    // FIXME: This is not correct.
+    // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events.html>.
+    return m_clientY;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/MouseRelatedEvent.h b/WebCore/dom/MouseRelatedEvent.h
new file mode 100644 (file)
index 0000000..a709eb5
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef MouseRelatedEvent_h
+#define MouseRelatedEvent_h
+
+#include "AtomicString.h"
+#include "DOMWindow.h"
+#include "UIEventWithKeyState.h"
+
+namespace WebCore {
+
+    typedef DOMWindow AbstractView;
+
+    // Internal only: Helper class for what's common between mouse and wheel events.
+    class MouseRelatedEvent : public UIEventWithKeyState {
+    public:
+        MouseRelatedEvent();
+        MouseRelatedEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                          int detail, int screenX, int screenY, int clientX, int clientY,
+                          bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false);
+
+        int screenX() const { return m_screenX; }
+        int screenY() const { return m_screenY; }
+        int clientX() const { return m_clientX; }
+        int clientY() const { return m_clientY; }
+        int layerX() const { return m_layerX; }
+        int layerY() const { return m_layerY; }
+        int offsetX() const { return m_offsetX; }
+        int offsetY() const { return m_offsetY; }
+        bool isSimulated() const { return m_isSimulated; }
+        virtual int pageX() const;
+        virtual int pageY() const;
+        int x() const;
+        int y() const;
+    
+    protected:
+        void initCoordinates();
+        virtual void receivedTarget();
+        
+        // Expose these so MouseEvent::initMouseEvent can set them.
+        int m_screenX;
+        int m_screenY;
+        int m_clientX;
+        int m_clientY;
+
+    private:
+        int m_pageX;
+        int m_pageY;
+        int m_layerX;
+        int m_layerY;
+        int m_offsetX;
+        int m_offsetY;
+        bool m_isSimulated;
+    };
+
+} // namespace WebCore
+
+#endif // MouseRelatedEvent_h
diff --git a/WebCore/dom/MutationEvent.cpp b/WebCore/dom/MutationEvent.cpp
new file mode 100644 (file)
index 0000000..f5c5a79
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "MutationEvent.h"
+
+namespace WebCore {
+
+MutationEvent::MutationEvent()
+    : m_attrChange(0)
+{
+}
+
+MutationEvent::MutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
+                             const String& prevValue, const String& newValue,
+                             const String& attrName, unsigned short attrChange)
+    : Event(type, canBubble, cancelable)
+    , m_relatedNode(relatedNode)
+    , m_prevValue(prevValue.impl())
+    , m_newValue(newValue.impl())
+    , m_attrName(attrName.impl())
+    , m_attrChange(attrChange)
+{
+}
+
+void MutationEvent::initMutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
+                                      const String& prevValue, const String& newValue,
+                                      const String& attrName, unsigned short attrChange)
+{
+    if (dispatched())
+        return;
+
+    initEvent(type, canBubble, cancelable);
+
+    m_relatedNode = relatedNode;
+    m_prevValue = prevValue.impl();
+    m_newValue = newValue.impl();
+    m_attrName = attrName.impl();
+    m_attrChange = attrChange;
+}
+
+bool MutationEvent::isMutationEvent() const
+{
+    return true;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/MutationEvent.h b/WebCore/dom/MutationEvent.h
new file mode 100644 (file)
index 0000000..e1fb74a
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef MutationEvent_h
+#define MutationEvent_h
+
+#include "Event.h"
+#include "Node.h"
+
+namespace WebCore {
+
+    class MutationEvent : public Event {
+    public:
+        enum attrChangeType {
+            MODIFICATION    = 1,
+            ADDITION        = 2,
+            REMOVAL         = 3
+        };
+
+        MutationEvent();
+        MutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
+                      const String& prevValue, const String& newValue,
+                      const String& attrName, unsigned short attrChange);
+
+        void initMutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
+                               const String& prevValue, const String& newValue,
+                               const String& attrName, unsigned short attrChange);
+
+        Node* relatedNode() const { return m_relatedNode.get(); }
+        String prevValue() const { return m_prevValue.get(); }
+        String newValue() const { return m_newValue.get(); }
+        String attrName() const { return m_attrName.get(); }
+        unsigned short attrChange() const { return m_attrChange; }
+
+        virtual bool isMutationEvent() const;
+
+    private:
+        RefPtr<Node> m_relatedNode;
+        RefPtr<StringImpl> m_prevValue;
+        RefPtr<StringImpl> m_newValue;
+        RefPtr<StringImpl> m_attrName;
+        unsigned short m_attrChange;
+    };
+
+} // namespace WebCore
+
+#endif // MutationEvent_h
diff --git a/WebCore/dom/RegisteredEventListener.cpp b/WebCore/dom/RegisteredEventListener.cpp
new file mode 100644 (file)
index 0000000..3104179
--- /dev/null
@@ -0,0 +1,45 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "RegisteredEventListener.h"
+
+#include "EventListener.h"
+
+namespace WebCore {
+
+RegisteredEventListener::RegisteredEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
+    : m_eventType(eventType)
+    , m_listener(listener)
+    , m_useCapture(useCapture)
+    , m_removed(false)
+{
+}
+
+bool operator==(const RegisteredEventListener& a, const RegisteredEventListener& b)
+{
+    return a.eventType() == b.eventType() && a.listener() == b.listener() && a.useCapture() == b.useCapture();
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/RegisteredEventListener.h b/WebCore/dom/RegisteredEventListener.h
new file mode 100644 (file)
index 0000000..1c31cf3
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef RegisteredEventListener_h
+#define RegisteredEventListener_h
+
+#include "AtomicString.h"
+#include "Shared.h"
+
+namespace WebCore {
+
+    class EventListener;
+
+    class RegisteredEventListener : public Shared<RegisteredEventListener> {
+    public:
+        RegisteredEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
+
+        const AtomicString& eventType() const { return m_eventType; }
+        EventListener* listener() const { return m_listener.get(); }
+        bool useCapture() const { return m_useCapture; }
+        
+        bool removed() const { return m_removed; }
+        void setRemoved(bool removed) { m_removed = removed; }
+    
+    private:
+        AtomicString m_eventType;
+        RefPtr<EventListener> m_listener;
+        bool m_useCapture;
+        bool m_removed;
+    };
+
+
+    bool operator==(const RegisteredEventListener&, const RegisteredEventListener&);
+    inline bool operator!=(const RegisteredEventListener& a, const RegisteredEventListener& b) { return !(a == b); }
+
+} // namespace WebCore
+
+#endif // RegisteredEventListener_h
diff --git a/WebCore/dom/UIEvent.cpp b/WebCore/dom/UIEvent.cpp
new file mode 100644 (file)
index 0000000..e0ee543
--- /dev/null
@@ -0,0 +1,94 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include "config.h"
+#include "UIEvent.h"
+
+#include "AtomicString.h"
+
+namespace WebCore {
+
+UIEvent::UIEvent()
+    : m_detail(0)
+{
+}
+
+UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelableArg, AbstractView* viewArg, int detailArg)
+    : Event(eventType, canBubbleArg, cancelableArg)
+    , m_view(viewArg)
+    , m_detail(detailArg)
+{
+}
+
+void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, AbstractView* viewArg, int detailArg)
+{
+    if (dispatched())
+        return;
+
+    initEvent(typeArg, canBubbleArg, cancelableArg);
+
+    m_view = viewArg;
+    m_detail = detailArg;
+}
+
+bool UIEvent::isUIEvent() const
+{
+    return true;
+}
+
+int UIEvent::keyCode() const
+{
+    return 0;
+}
+
+int UIEvent::charCode() const
+{
+    return 0;
+}
+
+int UIEvent::layerX() const
+{
+    return 0;
+}
+
+int UIEvent::layerY() const
+{
+    return 0;
+}
+
+int UIEvent::pageX() const
+{
+    return 0;
+}
+
+int UIEvent::pageY() const
+{
+    return 0;
+}
+
+int UIEvent::which() const
+{
+    return 0;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/UIEvent.h b/WebCore/dom/UIEvent.h
new file mode 100644 (file)
index 0000000..d85a62f
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef UIEvent_h
+#define UIEvent_h
+
+#include "AtomicString.h"
+#include "DOMWindow.h"
+#include "Event.h"
+
+namespace WebCore {
+
+    typedef DOMWindow AbstractView;
+
+    class UIEvent : public Event {
+    public:
+        UIEvent();
+        UIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail);
+
+        void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail);
+
+        AbstractView* view() const { return m_view.get(); }
+        int detail() const { return m_detail; }
+        
+        virtual bool isUIEvent() const;
+
+        virtual int keyCode() const;
+        virtual int charCode() const;
+
+        virtual int layerX() const;
+        virtual int layerY() const;
+
+        virtual int pageX() const;
+        virtual int pageY() const;
+
+        virtual int which() const;
+
+    private:
+        RefPtr<AbstractView> m_view;
+        int m_detail;
+    };
+
+} // namespace WebCore
+
+#endif // UIEvent_h
diff --git a/WebCore/dom/UIEventWithKeyState.h b/WebCore/dom/UIEventWithKeyState.h
new file mode 100644 (file)
index 0000000..86415a6
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef UIEventWithKeyState_h
+#define UIEventWithKeyState_h
+
+#include "AtomicString.h"
+#include "DOMWindow.h"
+#include "UIEvent.h"
+
+namespace WebCore {
+    
+    typedef DOMWindow AbstractView;
+
+    class UIEventWithKeyState : public UIEvent {
+    public:
+        UIEventWithKeyState()
+            : m_ctrlKey(false)
+            , m_altKey(false)
+            , m_shiftKey(false)
+            , m_metaKey(false)
+        {
+        }
+        
+        UIEventWithKeyState(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
+                            int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
+            : UIEvent(type, canBubble, cancelable, view, detail)
+            , m_ctrlKey(ctrlKey)
+            , m_altKey(altKey)
+            , m_shiftKey(shiftKey)
+            , m_metaKey(metaKey)
+        {
+        }
+
+        bool ctrlKey() const { return m_ctrlKey; }
+        bool shiftKey() const { return m_shiftKey; }
+        bool altKey() const { return m_altKey; }
+        bool metaKey() const { return m_metaKey; }
+
+    protected:
+        // Expose these so init functions can set them.
+        bool m_ctrlKey : 1;
+        bool m_altKey : 1;
+        bool m_shiftKey : 1;
+        bool m_metaKey : 1;
+    };
+
+} // namespace WebCore
+
+#endif // UIEventWithKeyState_h
diff --git a/WebCore/dom/WheelEvent.cpp b/WebCore/dom/WheelEvent.cpp
new file mode 100644 (file)
index 0000000..dc3fe06
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include "WheelEvent.h"
+
+#include "EventNames.h"
+
+namespace WebCore {
+
+using namespace EventNames;
+
+WheelEvent::WheelEvent()
+    : m_horizontal(false)
+    , m_wheelDelta(0)
+{
+}
+
+WheelEvent::WheelEvent(bool horizontal, int wheelDelta, AbstractView* view,
+                       int screenX, int screenY, int clientX, int clientY,
+                       bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
+    : MouseRelatedEvent(horizontal ? khtmlHorizontalmousewheelEvent : mousewheelEvent,
+                        true, true, view, 0, screenX, screenY, clientX, clientY, 
+                        ctrlKey, altKey, shiftKey, metaKey)
+    , m_horizontal(horizontal)
+    , m_wheelDelta(wheelDelta)
+{
+}
+
+bool WheelEvent::isWheelEvent() const
+{
+    return true;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/WheelEvent.h b/WebCore/dom/WheelEvent.h
new file mode 100644 (file)
index 0000000..7f51c21
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2001 Peter Kelly (pmk@post.com)
+ * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef WheelEvent_h
+#define WheelEvent_h
+
+#include "MouseRelatedEvent.h"
+
+namespace WebCore {
+
+    // extension: mouse wheel event
+    class WheelEvent : public MouseRelatedEvent {
+    public:
+        WheelEvent();
+        WheelEvent(bool horizontal, int wheelDelta, AbstractView*,
+                   int screenX, int screenY, int clientX, int clientY,
+                   bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
+        
+        bool isHorizontal() const { return m_horizontal; }
+        int wheelDelta() const { return m_wheelDelta; }
+
+    private:
+        virtual bool isWheelEvent() const;
+
+        bool m_horizontal;
+        int m_wheelDelta;
+    };
+
+} // namespace WebCore
+
+#endif // WheelEvent_h
diff --git a/WebCore/dom/dom2_eventsimpl.cpp b/WebCore/dom/dom2_eventsimpl.cpp
deleted file mode 100644 (file)
index eeebd25..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-/**
- * This file is part of the DOM implementation for KDE.
- *
- * (C) 2001 Peter Kelly (pmk@post.com)
- * (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
- * Copyright (C) 2003, 2005, 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-#include "dom2_eventsimpl.h"
-
-#include "Document.h"
-#include "EventListener.h"
-#include "EventNames.h"
-#include "FrameView.h"
-#include "SystemTime.h"
-#include "PlatformKeyboardEvent.h"
-#include "SystemTime.h"
-#include "RenderLayer.h"
-
-namespace WebCore {
-
-using namespace EventNames;
-
-Event::Event()
-    : m_canBubble(false)
-    , m_cancelable(false)
-    , m_propagationStopped(false)
-    , m_defaultPrevented(false)
-    , m_defaultHandled(false)
-    , m_cancelBubble(false)
-    , m_currentTarget(0)
-    , m_eventPhase(0)
-    , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
-{
-}
-
-Event::Event(const AtomicString &eventType, bool canBubbleArg, bool cancelableArg)
-    : m_type(eventType)
-    , m_canBubble(canBubbleArg)
-    , m_cancelable(cancelableArg)
-    , m_propagationStopped(false)
-    , m_defaultPrevented(false)
-    , m_defaultHandled(false)
-    , m_cancelBubble(false)
-    , m_currentTarget(0)
-    , m_eventPhase(0)
-    , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0))
-{
-}
-
-Event::~Event()
-{
-}
-
-void Event::initEvent(const AtomicString &eventTypeArg, bool canBubbleArg, bool cancelableArg)
-{
-    if (dispatched())
-        return;
-
-    m_type = eventTypeArg;
-    m_canBubble = canBubbleArg;
-    m_cancelable = cancelableArg;
-}
-
-bool Event::isUIEvent() const
-{
-    return false;
-}
-
-bool Event::isMouseEvent() const
-{
-    return false;
-}
-
-bool Event::isMutationEvent() const
-{
-    return false;
-}
-
-bool Event::isKeyboardEvent() const
-{
-    return false;
-}
-
-bool Event::isDragEvent() const
-{
-    return false;
-}
-
-bool Event::isClipboardEvent() const
-{
-    return false;
-}
-
-bool Event::isWheelEvent() const
-{
-    return false;
-}
-
-bool Event::isBeforeTextInsertedEvent() const
-{
-    return false;
-}
-
-bool Event::storesResultAsString() const
-{
-    return false;
-}
-
-void Event::storeResult(const String&)
-{
-}
-
-void Event::setTarget(Node* target)
-{
-    m_target = target;
-    if (target)
-        receivedTarget();
-}
-
-void Event::receivedTarget()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-UIEvent::UIEvent()
-    : m_detail(0)
-{
-}
-
-UIEvent::UIEvent(const AtomicString &eventType, bool canBubbleArg, bool cancelableArg, AbstractView *viewArg, int detailArg)
-    : Event(eventType, canBubbleArg, cancelableArg)
-    , m_view(viewArg)
-    , m_detail(detailArg)
-{
-}
-
-void UIEvent::initUIEvent(const AtomicString &typeArg,
-                              bool canBubbleArg,
-                              bool cancelableArg,
-                              AbstractView *viewArg,
-                              int detailArg)
-{
-    if (dispatched())
-        return;
-
-    initEvent(typeArg, canBubbleArg, cancelableArg);
-
-    m_view = viewArg;
-    m_detail = detailArg;
-}
-
-bool UIEvent::isUIEvent() const
-{
-    return true;
-}
-
-int UIEvent::keyCode() const
-{
-    return 0;
-}
-
-int UIEvent::charCode() const
-{
-    return 0;
-}
-
-int UIEvent::layerX() const
-{
-    return 0;
-}
-
-int UIEvent::layerY() const
-{
-    return 0;
-}
-
-int UIEvent::pageX() const
-{
-    return 0;
-}
-
-int UIEvent::pageY() const
-{
-    return 0;
-}
-
-int UIEvent::which() const
-{
-    return 0;
-}
-
-// -----------------------------------------------------------------------------
-
-MouseRelatedEvent::MouseRelatedEvent()
-    : m_screenX(0), m_screenY(0), m_clientX(0), m_clientY(0)
-    , m_pageX(0), m_pageY(0), m_layerX(0), m_layerY(0), m_offsetX(0), m_offsetY(0), m_isSimulated(false)
-{
-}
-
-MouseRelatedEvent::MouseRelatedEvent(const AtomicString &eventType,
-                               bool canBubbleArg,
-                               bool cancelableArg,
-                               AbstractView *viewArg,
-                               int detailArg,
-                               int screenXArg,
-                               int screenYArg,
-                               int clientXArg,
-                               int clientYArg,
-                               bool ctrlKeyArg,
-                               bool altKeyArg,
-                               bool shiftKeyArg,
-                               bool metaKeyArg,
-                               bool isSimulated)
-    : UIEventWithKeyState(eventType, canBubbleArg, cancelableArg, viewArg, detailArg,
-        ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg)
-    , m_screenX(screenXArg), m_screenY(screenYArg)
-    , m_clientX(clientXArg), m_clientY(clientYArg)
-    , m_isSimulated(isSimulated)
-{
-    initCoordinates();
-}
-
-void MouseRelatedEvent::initCoordinates()
-{
-    // Set up initial values for coordinates.
-    // Correct values can't be computed until we have at target, so receivedTarget
-    // does the "real" computation.
-    m_pageX = m_clientX;
-    m_pageY = m_clientY;
-    m_layerX = m_pageX;
-    m_layerY = m_pageY;
-    m_offsetX = m_pageX;
-    m_offsetY = m_pageY;
-}
-
-void MouseRelatedEvent::receivedTarget()
-{
-    // Compute coordinates that are based on the target.
-    m_offsetX = m_pageX;
-    m_offsetY = m_pageY;
-    m_layerX = m_pageX;    
-    m_layerY = m_pageY;    
-
-    Node* targ = target();
-    ASSERT(targ);
-
-    // Must have an updated render tree for this math to work correctly.
-    targ->document()->updateRendering();
-
-    // FIXME: clientX/Y should not be the same as pageX/Y!
-    // Currently the passed-in clientX and clientY are incorrectly actually
-    // pageX and pageY values, so we don't have any work to do here, but if
-    // we started passing in correct clientX and clientY, we'd want to compute
-    // pageX and pageY here.
-
-    // Adjust offsetX/Y to be relative to the target's position.
-    if (!isSimulated()) {
-        if (RenderObject* r = targ->renderer()) {
-            int rx, ry;
-            if (r->absolutePosition(rx, ry)) {
-                m_offsetX -= rx;
-                m_offsetY -= ry;
-            }
-        }
-    }
-
-    // Adjust layerX/Y to be relative to the layer.
-    // FIXME: We're pretty sure this is the wrong defintion of "layer."
-    // Our RenderLayer is a more modern concept, and layerX/Y is some
-    // other notion about groups of elements; we should test and fix this.
-    Node* n = targ;
-    while (n && !n->renderer())
-        n = n->parent();
-    if (n) {
-        RenderLayer* layer = n->renderer()->enclosingLayer();
-        layer->updateLayerPosition();
-        for (; layer; layer = layer->parent()) {
-            m_layerX -= layer->xPos();
-            m_layerY -= layer->yPos();
-        }
-    }
-}
-
-int MouseRelatedEvent::pageX() const
-{
-    return m_pageX;
-}
-
-int MouseRelatedEvent::pageY() const
-{
-    return m_pageY;
-}
-
-int MouseRelatedEvent::x() const
-{
-    // FIXME: This is not correct.
-    // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events.html>.
-    return m_clientX;
-}
-
-int MouseRelatedEvent::y() const
-{
-    // FIXME: This is not correct.
-    // See Microsoft documentation and <http://www.quirksmode.org/dom/w3c_events.html>.
-    return m_clientY;
-}
-
-// -----------------------------------------------------------------------------
-
-MouseEvent::MouseEvent()
-    : m_button(0)
-{
-}
-
-MouseEvent::MouseEvent(const AtomicString& eventType,
-                               bool canBubbleArg,
-                               bool cancelableArg,
-                               AbstractView *viewArg,
-                               int detailArg,
-                               int screenXArg,
-                               int screenYArg,
-                               int clientXArg,
-                               int clientYArg,
-                               bool ctrlKeyArg,
-                               bool altKeyArg,
-                               bool shiftKeyArg,
-                               bool metaKeyArg,
-                               unsigned short buttonArg,
-                               EventTargetNode* relatedTargetArg,
-                               Clipboard* clipboardArg,
-                               bool isSimulated)
-    : MouseRelatedEvent(eventType, canBubbleArg, cancelableArg, viewArg, detailArg,
-        screenXArg, screenYArg, clientXArg, clientYArg,
-        ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, isSimulated)
-    , m_button(buttonArg)
-    , m_relatedTarget(relatedTargetArg)
-    , m_clipboard(clipboardArg)
-{
-}
-
-MouseEvent::~MouseEvent()
-{
-}
-
-void MouseEvent::initMouseEvent(const AtomicString& typeArg,
-                                    bool canBubbleArg,
-                                    bool cancelableArg,
-                                    AbstractView* viewArg,
-                                    int detailArg,
-                                    int screenXArg,
-                                    int screenYArg,
-                                    int clientXArg,
-                                    int clientYArg,
-                                    bool ctrlKeyArg,
-                                    bool altKeyArg,
-                                    bool shiftKeyArg,
-                                    bool metaKeyArg,
-                                    unsigned short buttonArg,
-                                    EventTargetNode* relatedTargetArg)
-{
-    if (dispatched())
-        return;
-
-    initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
-
-    m_screenX = screenXArg;
-    m_screenY = screenYArg;
-    m_clientX = clientXArg;
-    m_clientY = clientYArg;
-    m_ctrlKey = ctrlKeyArg;
-    m_altKey = altKeyArg;
-    m_shiftKey = shiftKeyArg;
-    m_metaKey = metaKeyArg;
-    m_button = buttonArg;
-    m_relatedTarget = relatedTargetArg;
-
-    initCoordinates();
-}
-
-bool MouseEvent::isMouseEvent() const
-{
-    return true;
-}
-
-bool MouseEvent::isDragEvent() const
-{
-    const AtomicString &t = type();
-    return t == dragenterEvent || t == dragoverEvent || t == dragleaveEvent
-        || t == dropEvent
-        || t == dragstartEvent || t == dragEvent || t == dragendEvent;
-}
-
-int MouseEvent::which() const
-{
-    // For KHTML, the return values for left, middle and right mouse buttons are 0, 1, 2, respectively.
-    // For the Netscape "which" property, the return values for left, middle and right mouse buttons are 1, 2, 3, respectively. 
-    // So we must add 1.
-    return m_button + 1;
-}
-
-Node* MouseEvent::toElement() const
-{
-    // MSIE extension - "the object toward which the user is moving the mouse pointer"
-    return type() == mouseoutEvent ? relatedTarget() : target();
-}
-
-Node* MouseEvent::fromElement() const
-{
-    // MSIE extension - "object from which activation or the mouse pointer is exiting during the event" (huh?)
-    return type() == mouseoutEvent ? target() : relatedTarget();
-}
-
-//---------------------------------------------------------------------------------------------
-
-KeyboardEvent::KeyboardEvent()
-  : m_keyEvent(0)
-  , m_keyLocation(DOM_KEY_LOCATION_STANDARD)
-  , m_altGraphKey(false)
-{
-}
-
-KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView *view)
-  : UIEventWithKeyState(key.isKeyUp() ? keyupEvent : key.isAutoRepeat() ? keypressEvent : keydownEvent,
-    true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey())
-  , m_keyEvent(new PlatformKeyboardEvent(key))
-  , m_keyIdentifier(String(key.keyIdentifier()).impl())
-  , m_keyLocation(key.isKeypad() ? DOM_KEY_LOCATION_NUMPAD : DOM_KEY_LOCATION_STANDARD)
-  , m_altGraphKey(false)
-{
-}
-
-KeyboardEvent::KeyboardEvent(const AtomicString &eventType,
-                                        bool canBubbleArg,
-                                        bool cancelableArg,
-                                        AbstractView *viewArg, 
-                                        const String &keyIdentifierArg, 
-                                        unsigned keyLocationArg, 
-                                        bool ctrlKeyArg, 
-                                        bool altKeyArg, 
-                                        bool shiftKeyArg, 
-                                        bool metaKeyArg, 
-                                        bool altGraphKeyArg)
-  : UIEventWithKeyState(eventType, canBubbleArg, cancelableArg, viewArg, 0, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg)
-  , m_keyEvent(0)
-  , m_keyIdentifier(keyIdentifierArg.impl())
-  , m_keyLocation(keyLocationArg)
-  , m_altGraphKey(altGraphKeyArg)
-{
-}
-
-KeyboardEvent::~KeyboardEvent()
-{
-    delete m_keyEvent;
-}
-
-void KeyboardEvent::initKeyboardEvent(const AtomicString &typeArg,
-                        bool canBubbleArg,
-                        bool cancelableArg,
-                        AbstractView *viewArg, 
-                        const String &keyIdentifierArg, 
-                        unsigned keyLocationArg, 
-                        bool ctrlKeyArg, 
-                        bool altKeyArg, 
-                        bool shiftKeyArg, 
-                        bool metaKeyArg, 
-                        bool altGraphKeyArg)
-{
-    if (dispatched())
-        return;
-
-    initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0);
-
-    m_keyIdentifier = keyIdentifierArg.impl();
-    m_keyLocation = keyLocationArg;
-    m_ctrlKey = ctrlKeyArg;
-    m_shiftKey = shiftKeyArg;
-    m_altKey = altKeyArg;
-    m_metaKey = metaKeyArg;
-    m_altGraphKey = altGraphKeyArg;
-}
-
-int KeyboardEvent::keyCode() const
-{
-    if (!m_keyEvent)
-        return 0;
-    if (type() == keydownEvent || type() == keyupEvent)
-        return m_keyEvent->WindowsKeyCode();
-    return charCode();
-}
-
-int KeyboardEvent::charCode() const
-{
-    if (!m_keyEvent)
-        return 0;
-    String text = m_keyEvent->text();
-    if (text.length() != 1)
-        return 0;
-    return text[0];
-}
-
-bool KeyboardEvent::isKeyboardEvent() const
-{
-    return true;
-}
-
-int KeyboardEvent::which() const
-{
-    // Netscape's "which" returns a virtual key code for keydown and keyup, and a character code for keypress.
-    // That's exactly what IE's "keyCode" returns. So they are the same for keyboard events.
-    return keyCode();
-}
-
-// -----------------------------------------------------------------------------
-
-MutationEvent::MutationEvent()
-    : m_attrChange(0)
-{
-}
-
-MutationEvent::MutationEvent(const AtomicString &eventType,
-                                     bool canBubbleArg,
-                                     bool cancelableArg,
-                                     Node *relatedNodeArg,
-                                     const String &prevValueArg,
-                                     const String &newValueArg,
-                                     const String &attrNameArg,
-                                     unsigned short attrChangeArg)
-    : Event(eventType, canBubbleArg, cancelableArg)
-    , m_relatedNode(relatedNodeArg)
-    , m_prevValue(prevValueArg.impl())
-    , m_newValue(newValueArg.impl())
-    , m_attrName(attrNameArg.impl())
-    , m_attrChange(attrChangeArg)
-{
-}
-
-void MutationEvent::initMutationEvent(const AtomicString &typeArg,
-                                          bool canBubbleArg,
-                                          bool cancelableArg,
-                                          Node *relatedNodeArg,
-                                          const String &prevValueArg,
-                                          const String &newValueArg,
-                                          const String &attrNameArg,
-                                          unsigned short attrChangeArg)
-{
-    if (dispatched())
-        return;
-
-    initEvent(typeArg, canBubbleArg, cancelableArg);
-
-    m_relatedNode = relatedNodeArg;
-    m_prevValue = prevValueArg.impl();
-    m_newValue = newValueArg.impl();
-    m_attrName = attrNameArg.impl();
-    m_attrChange = attrChangeArg;
-}
-
-bool MutationEvent::isMutationEvent() const
-{
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-
-ClipboardEvent::ClipboardEvent()
-{
-}
-
-ClipboardEvent::ClipboardEvent(const AtomicString &eventType, bool canBubbleArg, bool cancelableArg, Clipboard *clipboardArg)
-    : Event(eventType, canBubbleArg, cancelableArg), m_clipboard(clipboardArg)
-{
-}
-
-bool ClipboardEvent::isClipboardEvent() const
-{
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-
-WheelEvent::WheelEvent() : m_horizontal(false), m_wheelDelta(0)
-{
-}
-
-WheelEvent::WheelEvent(bool h, int d, AbstractView *v,
-    int sx, int sy, int cx, int cy, bool ctrl, bool alt, bool shift, bool meta)
-    : MouseRelatedEvent(h ? khtmlHorizontalmousewheelEvent : mousewheelEvent,
-        true, true, v, 0, sx, sy, cx, cy, ctrl, alt, shift, meta)
-    , m_horizontal(h), m_wheelDelta(d)
-{
-}
-
-bool WheelEvent::isWheelEvent() const
-{
-    return true;
-}
-
-// -----------------------------------------------------------------------------
-
-RegisteredEventListener::RegisteredEventListener(const AtomicString &eventType, PassRefPtr<EventListener> listener, bool useCapture)
-    : m_eventType(eventType)
-    , m_listener(listener)
-    , m_useCapture(useCapture)
-    , m_removed(false)
-{
-}
-
-bool operator==(const RegisteredEventListener &a, const RegisteredEventListener &b)
-{
-    return a.eventType() == b.eventType() && a.listener() == b.listener() && a.useCapture() == b.useCapture();
-}
-
-// -----------------------------------------------------------------------------
-
-Clipboard::~Clipboard()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-BeforeUnloadEvent::BeforeUnloadEvent()
-    : Event(beforeunloadEvent, false, true)
-{
-}
-
-bool BeforeUnloadEvent::storesResultAsString() const
-{
-    return true;
-}
-
-void BeforeUnloadEvent::storeResult(const String& s)
-{
-    m_result = s.impl();
-}
-
-}
diff --git a/WebCore/dom/dom2_eventsimpl.h b/WebCore/dom/dom2_eventsimpl.h
deleted file mode 100644 (file)
index 09ca9b6..0000000
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * This file is part of the DOM implementation for KDE.
- *
- * Copyright (C) 2001 Peter Kelly (pmk@post.com)
- * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef DOM_EVENTSIMPL_H
-#define DOM_EVENTSIMPL_H
-
-#include "AtomicString.h"
-#include "DOMWindow.h"
-#include "Node.h"
-
-class DeprecatedStringList;
-
-namespace WebCore {
-
-class CachedImage;
-class Clipboard;
-class EventListener;
-class EventTargetNode;
-class Image;
-class IntPoint;
-class PlatformKeyboardEvent;
-
-typedef unsigned long long DOMTimeStamp;
-typedef DOMWindow AbstractView;
-
-const int EventExceptionOffset = 100;
-const int EventExceptionMax = 199;
-enum EventExceptionCode { UNSPECIFIED_EVENT_TYPE_ERR = EventExceptionOffset };
-
-class Event : public Shared<Event>
-{
-public:
-    enum PhaseType { 
-        CAPTURING_PHASE = 1, 
-        AT_TARGET = 2, 
-        BUBBLING_PHASE = 3 
-    };
-
-    // Reverse-engineered from Netscape
-    enum EventType {
-        MOUSEDOWN           = 1,
-        MOUSEUP             = 2,
-        MOUSEOVER           = 4,
-        MOUSEOUT            = 8,
-        MOUSEMOVE           = 16,
-        MOUSEDRAG           = 32,
-        CLICK               = 64,
-        DBLCLICK            = 128,
-        KEYDOWN             = 256,
-        KEYUP               = 512,
-        KEYPRESS            = 1024,
-        DRAGDROP            = 2048,
-        FOCUS               = 4096,
-        BLUR                = 8192,
-        SELECT              = 16384,
-        CHANGE              = 32768
-    };
-    
-    Event();
-    Event(const AtomicString& type, bool canBubbleArg, bool cancelableArg);
-    virtual ~Event();
-
-    const AtomicString &type() const { return m_type; }
-    Node* target() const { return m_target.get(); }
-    void setTarget(Node*);
-    Node* currentTarget() const { return m_currentTarget; }
-    void setCurrentTarget(Node* currentTarget) { m_currentTarget = currentTarget; }
-    unsigned short eventPhase() const { return m_eventPhase; }
-    void setEventPhase(unsigned short eventPhase) { m_eventPhase = eventPhase; }
-    bool bubbles() const { return m_canBubble; }
-    bool cancelable() const { return m_cancelable; }
-    DOMTimeStamp timeStamp() { return m_createTime; }
-    void stopPropagation() { m_propagationStopped = true; }
-    void preventDefault() { if (m_cancelable) m_defaultPrevented = true; }
-    void initEvent(const AtomicString &eventTypeArg, bool canBubbleArg, bool cancelableArg);
-
-    virtual bool isUIEvent() const;
-    virtual bool isMouseEvent() const;
-    virtual bool isMutationEvent() const;
-    virtual bool isKeyboardEvent() const;
-    virtual bool isDragEvent() const; // a subset of mouse events
-    virtual bool isClipboardEvent() const;
-    virtual bool isWheelEvent() const;
-    virtual bool isBeforeTextInsertedEvent() const;
-
-    bool propagationStopped() const { return m_propagationStopped; }
-    bool defaultPrevented() const { return m_defaultPrevented; }
-
-    void setDefaultHandled() { m_defaultHandled = true; }
-    bool defaultHandled() const { return m_defaultHandled; }
-
-    void setCancelBubble(bool cancel) { m_cancelBubble = cancel; }
-    void setDefaultPrevented(bool defaultPrevented) { m_defaultPrevented = defaultPrevented; }
-    bool getCancelBubble() const { return m_cancelBubble; }
-
-    virtual bool storesResultAsString() const;
-    virtual void storeResult(const String&);
-
-protected:
-    virtual void receivedTarget();
-    bool dispatched() const { return m_target; }
-
-private:
-    AtomicString m_type;
-    bool m_canBubble;
-    bool m_cancelable;
-
-    bool m_propagationStopped;
-    bool m_defaultPrevented;
-    bool m_defaultHandled;
-    bool m_cancelBubble;
-
-    Node* m_currentTarget; // ref > 0 maintained externally
-    unsigned short m_eventPhase;
-    RefPtr<Node> m_target;
-    DOMTimeStamp m_createTime;
-};
-
-class UIEvent : public Event
-{
-public:
-    UIEvent();
-    UIEvent(const AtomicString &type,
-                bool canBubbleArg,
-                bool cancelableArg,
-                AbstractView *viewArg,
-                int detailArg);
-    AbstractView *view() const { return m_view.get(); }
-    int detail() const { return m_detail; }
-    void initUIEvent(const AtomicString &typeArg,
-                     bool canBubbleArg,
-                     bool cancelableArg,
-                     AbstractView *viewArg,
-                     int detailArg);
-    virtual bool isUIEvent() const;
-
-    virtual int keyCode() const;
-    virtual int charCode() const;
-
-    virtual int layerX() const;
-    virtual int layerY() const;
-
-    virtual int pageX() const;
-    virtual int pageY() const;
-
-    virtual int which() const;
-
-private:
-    RefPtr<AbstractView> m_view;
-    int m_detail;
-};
-
-class UIEventWithKeyState : public UIEvent {
-public:
-    UIEventWithKeyState() : m_ctrlKey(false), m_altKey(false), m_shiftKey(false), m_metaKey(false) { }
-    UIEventWithKeyState(const AtomicString &type, bool canBubbleArg, bool cancelableArg, AbstractView *viewArg,
-        int detailArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg)
-        : UIEvent(type, canBubbleArg, cancelableArg, viewArg, detailArg)
-        , m_ctrlKey(ctrlKeyArg), m_altKey(altKeyArg), m_shiftKey(shiftKeyArg), m_metaKey(metaKeyArg) { }
-
-    bool ctrlKey() const { return m_ctrlKey; }
-    bool shiftKey() const { return m_shiftKey; }
-    bool altKey() const { return m_altKey; }
-    bool metaKey() const { return m_metaKey; }
-
-protected: // expose these so init functions can set them
-    bool m_ctrlKey : 1;
-    bool m_altKey : 1;
-    bool m_shiftKey : 1;
-    bool m_metaKey : 1;
-};
-
-// Internal only: Helper class for what's common between mouse and wheel events.
-class MouseRelatedEvent : public UIEventWithKeyState {
-public:
-    MouseRelatedEvent();
-    MouseRelatedEvent(const AtomicString &type,
-                          bool canBubbleArg,
-                          bool cancelableArg,
-                          AbstractView *viewArg,
-                          int detailArg,
-                          int screenXArg,
-                          int screenYArg,
-                          int clientXArg,
-                          int clientYArg,
-                          bool ctrlKeyArg,
-                          bool altKeyArg,
-                          bool shiftKeyArg,
-                          bool metaKeyArg,
-                          bool isSimulated = false);
-    int screenX() const { return m_screenX; }
-    int screenY() const { return m_screenY; }
-    int clientX() const { return m_clientX; }
-    int clientY() const { return m_clientY; }
-    int layerX() const { return m_layerX; }
-    int layerY() const { return m_layerY; }
-    int offsetX() const { return m_offsetX; }
-    int offsetY() const { return m_offsetY; }
-    bool isSimulated() const { return m_isSimulated; }
-    virtual int pageX() const;
-    virtual int pageY() const;
-    int x() const;
-    int y() const;
-protected: // expose these so MouseEvent::initMouseEvent can set them
-    int m_screenX;
-    int m_screenY;
-    int m_clientX;
-    int m_clientY;
-    void initCoordinates();
-    virtual void receivedTarget();
-private:
-    int m_pageX;
-    int m_pageY;
-    int m_layerX;
-    int m_layerY;
-    int m_offsetX;
-    int m_offsetY;
-    bool m_isSimulated;
-};
-
-// Introduced in DOM Level 2
-class MouseEvent : public MouseRelatedEvent {
-public:
-    MouseEvent();
-    MouseEvent(const AtomicString& type,
-                   bool canBubbleArg,
-                   bool cancelableArg,
-                   AbstractView* viewArg,
-                   int detailArg,
-                   int screenXArg,
-                   int screenYArg,
-                   int clientXArg,
-                   int clientYArg,
-                   bool ctrlKeyArg,
-                   bool altKeyArg,
-                   bool shiftKeyArg,
-                   bool metaKeyArg,
-                   unsigned short buttonArg,
-                   EventTargetNode* relatedTargetArg,
-                   Clipboard* clipboardArg = 0,
-                   bool isSimulated = false);
-    virtual ~MouseEvent();
-    // WinIE uses 1,4,2 for left/middle/right but not for click (just for mousedown/up, maybe others), but we will match the standard DOM.
-    unsigned short button() const { return m_button; }
-    EventTargetNode* relatedTarget() const { return m_relatedTarget.get(); }
-    Clipboard* clipboard() const { return m_clipboard.get(); }
-    Node* toElement() const;
-    Node* fromElement() const;
-    void initMouseEvent(const AtomicString& typeArg,
-                        bool canBubbleArg,
-                        bool cancelableArg,
-                        AbstractView* viewArg,
-                        int detailArg,
-                        int screenXArg,
-                        int screenYArg,
-                        int clientXArg,
-                        int clientYArg,
-                        bool ctrlKeyArg,
-                        bool altKeyArg,
-                        bool shiftKeyArg,
-                        bool metaKeyArg,
-                        unsigned short buttonArg,
-                        EventTargetNode* relatedTargetArg);
-    virtual bool isMouseEvent() const;
-    virtual bool isDragEvent() const;
-    virtual int which() const;
-private:
-    unsigned short m_button;
-    RefPtr<EventTargetNode> m_relatedTarget;
-    RefPtr<Clipboard> m_clipboard;
-};
-
-
-// Introduced in DOM Level 3
-class KeyboardEvent : public UIEventWithKeyState {
-public:
-    enum KeyLocationCode {
-        DOM_KEY_LOCATION_STANDARD      = 0x00,
-        DOM_KEY_LOCATION_LEFT          = 0x01,
-        DOM_KEY_LOCATION_RIGHT         = 0x02,
-        DOM_KEY_LOCATION_NUMPAD        = 0x03,
-    };
-    KeyboardEvent();
-    KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
-    KeyboardEvent(const AtomicString &type,
-                bool canBubbleArg,
-                bool cancelableArg,
-                AbstractView *viewArg,
-                const String &keyIdentifierArg,
-                unsigned keyLocationArg,
-                bool ctrlKeyArg,
-                bool altKeyArg,
-                bool shiftKeyArg,
-                bool metaKeyArg,
-                bool altGraphKeyArg);
-    virtual ~KeyboardEvent();
-    
-    void initKeyboardEvent(const AtomicString &typeArg,
-                bool canBubbleArg,
-                bool cancelableArg,
-                AbstractView *viewArg,
-                const String &keyIdentifierArg,
-                unsigned keyLocationArg,
-                bool ctrlKeyArg,
-                bool altKeyArg,
-                bool shiftKeyArg,
-                bool metaKeyArg,
-                bool altGraphKeyArg);
-    
-    String keyIdentifier() const { return m_keyIdentifier.get(); }
-    unsigned keyLocation() const { return m_keyLocation; }
-    
-    bool altGraphKey() const { return m_altGraphKey; }
-    
-    const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent; }
-
-    int keyCode() const; // key code for keydown and keyup, character for other events
-    int charCode() const;
-    
-    virtual bool isKeyboardEvent() const;
-    virtual int which() const;
-
-private:
-    PlatformKeyboardEvent* m_keyEvent;
-    RefPtr<StringImpl> m_keyIdentifier;
-    unsigned m_keyLocation;
-    bool m_altGraphKey : 1;
-};
-
-class MutationEvent : public Event {
-public:
-    enum attrChangeType { MODIFICATION = 1, ADDITION = 2, REMOVAL = 3 };
-    MutationEvent();
-    MutationEvent(const AtomicString &type,
-                      bool canBubbleArg,
-                      bool cancelableArg,
-                      Node *relatedNodeArg,
-                      const String &prevValueArg,
-                      const String &newValueArg,
-                      const String &attrNameArg,
-                      unsigned short attrChangeArg);
-    Node *relatedNode() const { return m_relatedNode.get(); }
-    String prevValue() const { return m_prevValue.get(); }
-    String newValue() const { return m_newValue.get(); }
-    String attrName() const { return m_attrName.get(); }
-    unsigned short attrChange() const { return m_attrChange; }
-    void initMutationEvent(const AtomicString &typeArg,
-                           bool canBubbleArg,
-                           bool cancelableArg,
-                           Node *relatedNodeArg,
-                           const String &prevValueArg,
-                           const String &newValueArg,
-                           const String &attrNameArg,
-                           unsigned short attrChangeArg);
-    virtual bool isMutationEvent() const;
-private:
-    RefPtr<Node> m_relatedNode;
-    RefPtr<StringImpl> m_prevValue;
-    RefPtr<StringImpl> m_newValue;
-    RefPtr<StringImpl> m_attrName;
-    unsigned short m_attrChange;
-};
-
-class ClipboardEvent : public Event {
-public:
-    ClipboardEvent();
-    ClipboardEvent(const AtomicString &type, bool canBubbleArg, bool cancelableArg, Clipboard *clipboardArg);
-
-    Clipboard *clipboard() const { return m_clipboard.get(); }
-    virtual bool isClipboardEvent() const;
-private:
-    RefPtr<Clipboard> m_clipboard;
-};
-
-// extension: mouse wheel event
-class WheelEvent : public MouseRelatedEvent
-{
-public:
-    WheelEvent();
-    WheelEvent(bool horizontal, int wheelDelta, AbstractView *,
-                   int screenXArg, int screenYArg,
-                   int clientXArg, int clientYArg,
-                   bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg);
-    bool isHorizontal() const { return m_horizontal; }
-    int wheelDelta() const { return m_wheelDelta; }
-
-private:
-    virtual bool isWheelEvent() const;
-
-    bool m_horizontal;
-    int m_wheelDelta;
-};
-
-class RegisteredEventListener : public Shared<RegisteredEventListener> {
-public:
-    RegisteredEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
-
-    const AtomicString &eventType() const { return m_eventType; }
-    EventListener *listener() const { return m_listener.get(); }
-    bool useCapture() const { return m_useCapture; }
-    bool removed() const { return m_removed; }
-    void setRemoved(bool removed) { m_removed = removed; }
-    
-private:
-    AtomicString m_eventType;
-    RefPtr<EventListener> m_listener;
-    bool m_useCapture;
-    bool m_removed;
-};
-
-bool operator==(const RegisteredEventListener&, const RegisteredEventListener&);
-inline bool operator!=(const RegisteredEventListener& a, const RegisteredEventListener& b) { return !(a == b); }
-
-// State available during IE's events for drag and drop and copy/paste
-class Clipboard : public Shared<Clipboard> {
-public:
-    virtual ~Clipboard();
-
-    // Is this operation a drag-drop or a copy-paste?
-    virtual bool isForDragging() const = 0;
-
-    virtual String dropEffect() const = 0;
-    virtual void setDropEffect(const String &s) = 0;
-    virtual String effectAllowed() const = 0;
-    virtual void setEffectAllowed(const String &s) = 0;
-    
-    virtual void clearData(const String &type) = 0;
-    virtual void clearAllData() = 0;
-    virtual String getData(const String &type, bool &success) const = 0;
-    virtual bool setData(const String &type, const String &data) = 0;
-    
-    // extensions beyond IE's API
-    virtual DeprecatedStringList types() const = 0;
-    
-    virtual WebCore::IntPoint dragLocation() const = 0;
-    virtual CachedImage* dragImage() const = 0;
-    virtual void setDragImage(CachedImage*, const WebCore::IntPoint &) = 0;
-    virtual Node *dragImageElement() = 0;
-    virtual void setDragImageElement(Node *, const WebCore::IntPoint &) = 0;
-};
-
-class BeforeUnloadEvent : public Event
-{
-public:
-    BeforeUnloadEvent();
-
-    virtual bool storesResultAsString() const;
-    virtual void storeResult(const String&);
-
-    String result() const { return m_result.get(); }
-
-private:
-    RefPtr<StringImpl> m_result;
-};
-
-} // namespace
-
-#endif
index a33456886725cc5b052cb9d0b6c795e19cd77024..9c929a5567fc049cb5e1d3a758de526b1c6182a6 100644 (file)
@@ -32,7 +32,6 @@
 #include "VisiblePosition.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "CSSMutableStyleDeclaration.h"
-#include "dom2_eventsimpl.h"
 #include "EventNames.h"
 #include "htmlediting.h"
 
index bc5c3e364a93af732d014c39dd3e356aece7386a..c82b282e2b58e834d1474c8223c209914c73b9e4 100644 (file)
@@ -33,7 +33,6 @@
 #include "GraphicsContext.h"
 #include "RenderView.h"
 #include "TextIterator.h"
-#include "dom2_eventsimpl.h"
 #include "htmlediting.h"
 #include "visible_units.h"
 
index 7635de171e688ec674b835eabb69a536390cecbd..d64a8e57a1a2e7f73d805da913608510a01b4b08 100644 (file)
 #include "config.h"
 #include "HTMLAnchorElement.h"
 
-#include "csshelper.h"
 #include "Document.h"
-#include "dom2_eventsimpl.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
 #include "HTMLImageElement.h"
 #include "HTMLNames.h"
+#include "KeyboardEvent.h"
+#include "MouseEvent.h"
+#include "MutationEvent.h"
 #include "RenderFlow.h"
 #include "RenderImage.h"
+#include "UIEvent.h"
+#include "csshelper.h"
 
 namespace WebCore {
 
index d1c548350d7614bf275b0da2aa8e4ddaab806208..a3cf8b742c3067cbf8b665a832a6fe5668d89d84 100644 (file)
 
 #include "config.h"
 #include "HTMLButtonElement.h"
-#include "HTMLFormElement.h"
-#include "dom2_eventsimpl.h"
-#include "FormDataList.h"
-
-#include "RenderButton.h"
 
+#include "Event.h"
 #include "EventNames.h"
+#include "FormDataList.h"
+#include "HTMLFormElement.h"
 #include "HTMLNames.h"
+#include "RenderButton.h"
 
 namespace WebCore {
 
index b24707f94b2afd658621fa6ab8c38d9ee008f244..5026a92c0d1915ea3a74cb7cfabefb7bb6b5c46f 100644 (file)
 #include "config.h"
 #include "HTMLDocument.h"
 
+#include "CSSPropertyNames.h"
 #include "CookieJar.h"
 #include "DocumentType.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
-#include "cssstyleselector.h"
-#include "CSSPropertyNames.h"
-#include "HTMLTokenizer.h"
 #include "HTMLElement.h"
 #include "HTMLElementFactory.h"
 #include "HTMLNames.h"
-#include "dom2_eventsimpl.h"
+#include "HTMLTokenizer.h"
+#include "cssstyleselector.h"
 
 #include "DocTypeStrings.cpp"
 
index f4082ad1e12f77a9d5805b2841f092da6f5b76cf..10d6d9f6cd10fedeab3d5d0f7552a6d9e31facdf 100644 (file)
 #include "config.h"
 #include "HTMLElement.h"
 
+#include "CSSPropertyNames.h"
+#include "CSSValueKeywords.h"
 #include "DocumentFragment.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
-#include "CSSPropertyNames.h"
-#include "CSSValueKeywords.h"
-#include "dom2_eventsimpl.h"
 #include "HTMLDocument.h"
 #include "HTMLElementFactory.h"
 #include "HTMLNames.h"
 #include "HTMLTokenizer.h"
-#include "markup.h"
 #include "TextIterator.h"
+#include "markup.h"
 
 namespace WebCore {
 
index 66d533e9dfe07d69793290bad136cf096f360a5f..f6d5365882c42f1d98d4ef6fc754388dc03b5a6d 100644 (file)
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
 #include "config.h"
 #include "HTMLFrameSetElement.h"
 
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "HTMLNames.h"
 #include "Length.h"
-#include "dom2_eventsimpl.h"
+#include "MouseEvent.h"
 #include "RenderFrameSet.h"
 
 namespace WebCore {
index 2948de975eca01e62ea021b5e735a88cc64241c9..1009fa3831534f825ccf962ea7abbb3aa152ec57 100644 (file)
 
 #include "BeforeTextInsertedEvent.h"
 #include "CSSPropertyNames.h"
+#include "DeprecatedSlider.h"
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "FormDataList.h"
 #include "Frame.h"
 #include "HTMLFormElement.h"
 #include "HTMLImageLoader.h"
 #include "HTMLNames.h"
+#include "KeyboardEvent.h"
 #include "LocalizedStrings.h"
+#include "MouseEvent.h"
+#include "RenderButton.h"
 #include "RenderFileButton.h"
 #include "RenderImageButton.h"
 #include "RenderLineEdit.h"
 #include "RenderText.h"
 #include "RenderTextField.h"
 #include "RenderTheme.h"
-#include "DeprecatedSlider.h"
 #include "SelectionController.h"
-#include "RenderButton.h"
 #include <unicode/ubrk.h>
 
 using namespace std;
index b1ace38785a456aaaba8546793af73ace948eaf2..4a4f89186356c149d61f0eda6509b038cb25faeb 100644 (file)
 #include "config.h"
 #include "HTMLSelectElement.h"
 
+#include "CSSPropertyNames.h"
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "FormDataList.h"
 #include "HTMLFormElement.h"
 #include "HTMLNames.h"
 #include "HTMLOptionElement.h"
 #include "HTMLOptionsCollection.h"
+#include "KeyboardEvent.h"
 #include "RenderSelect.h"
-#include "CSSPropertyNames.h"
 #include "cssstyleselector.h"
-#include "dom2_eventsimpl.h"
 #include <wtf/Vector.h>
 
 namespace WebCore {
index b7e790224d6d36fb48d7d48ad34989e82d0ecaa9..a2a30619deed6f4964dabd4d07909db00f0a6559 100644 (file)
  */
 
 #include "config.h"
-#include "dom2_eventsimpl.h"
 #include "HTMLTextAreaElement.h"
+
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "FormDataList.h"
 #include "Frame.h"
 #include "HTMLNames.h"
 #include "RenderTextArea.h"
 #include "RenderTextField.h"
-#include "render_style.h"
 #include "Text.h"
+#include "render_style.h"
 
 namespace WebCore {
 
index e81beed75976a134d8f7715108bc0da9df32bc26..b220da95eb5b52197c15eaa6ac7e4d5872882bea 100644 (file)
@@ -24,8 +24,8 @@
 #define SVGZoomEvent_H
 #if SVG_SUPPORT
 
-#include "dom2_eventsimpl.h"
 #include "FloatRect.h"
+#include "UIEvent.h"
 
 namespace WebCore {
 
index 90a26f1f7c300458c61b5c366ad61f17def4adf6..0d6d418dd8ec6e8175a076cc0db604f0a9cd1e7b 100644 (file)
 
 #include "Attr.h"
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "MouseEvent.h"
+#include "MouseEvent.h"
 #include "SVGAnimatedString.h"
 #include "SVGHelper.h"
 #include "SVGNames.h"
 #include "csshelper.h"
-#include "dom2_eventsimpl.h"
 #include <kcanvas/KCanvasContainer.h>
 #include <kcanvas/KCanvasCreator.h>
 #include <kcanvas/device/KRenderingDevice.h>
index aeae08f2f98f02782df0fdae5a0c5436ea3bcacf..24fbe1e084b4bced6f403152dc01ffc95a212b66 100644 (file)
@@ -41,6 +41,7 @@
 #include "DocLoader.h"
 #include "DocumentType.h"
 #include "EditingText.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "FloatRect.h"
 #include "Frame.h"
 #include "HTMLFrameElement.h"
 #include "HTMLGenericFormElement.h"
 #include "HTMLNames.h"
-#include "MediaFeatureNames.h"
 #include "HTMLObjectElement.h"
 #include "ImageDocument.h"
+#include "MediaFeatureNames.h"
 #include "MouseEventWithHitTestResults.h"
 #include "NodeList.h"
 #include "Page.h"
+#include "PlugInInfoStore.h"
 #include "Plugin.h"
 #include "PluginDocument.h"
-#include "PlugInInfoStore.h"
 #include "RenderPart.h"
 #include "RenderTheme.h"
 #include "RenderView.h"
@@ -68,7 +69,6 @@
 #include "TransferJob.h"
 #include "TypingCommand.h"
 #include "cssstyleselector.h"
-#include "dom2_eventsimpl.h"
 #include "htmlediting.h"
 #include "kjs_window.h"
 #include "markup.h"
index b2af5dac006ef09018a82c6958ffd531fa1d6ee0..71dfb91685b72e47006f012d0559bd9c6ddcb24e 100644 (file)
 #include "config.h"
 #include "FrameView.h"
 
+#include "AccessibilityObjectCache.h"
 #include "CachedImage.h"
 #include "Cursor.h"
 #include "EventNames.h"
 #include "Frame.h"
+#include "HTMLDocument.h"
 #include "HTMLFrameSetElement.h"
 #include "HTMLInputElement.h"
+#include "HTMLNames.h"
 #include "Image.h"
-#include "AccessibilityObjectCache.h"
-#include "PlatformKeyboardEvent.h"
+#include "MouseEvent.h"
 #include "MouseEventWithHitTestResults.h"
+#include "PlatformKeyboardEvent.h"
+#include "PlatformWheelEvent.h"
+#include "RenderArena.h"
 #include "RenderPart.h"
 #include "RenderText.h"
+#include "RenderView.h"
 #include "SelectionController.h"
-#include "PlatformWheelEvent.h"
 #include "cssstyleselector.h"
-#include "dom2_eventsimpl.h"
-#include "HTMLDocument.h"
-#include "HTMLNames.h"
-#include "RenderArena.h"
-#include "RenderView.h"
 
 namespace WebCore {
 
index 31df8b509c9fffb8c520a699c66bb6a508ef2be0..9470e3e98110a16dd2c9b830783d45003f4cf132 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef KeyEvent_H
-#define KeyEvent_H
+#ifndef PlatformKeyboardEvent_h
+#define PlatformKeyboardEvent_h
 
 #include "PlatformString.h"
 
@@ -87,6 +87,6 @@ namespace WebCore {
         bool m_metaKey;
     };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // PlatformKeyboardEvent_h
index 15d264b07e905cf11a749f60908086f121c779de..a51e22ad5c89f949a4136340cb42c4efcb4859ed 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef MouseEvent_h
-#define MouseEvent_h
+#ifndef PlatformMouseEvent_h
+#define PlatformMouseEvent_h
 
 #include "IntPoint.h"
 
@@ -55,11 +55,15 @@ namespace WebCore {
     public:
         PlatformMouseEvent(); // "current event"
         PlatformMouseEvent(const IntPoint& pos, const IntPoint& globalPos, MouseButton button,
-                int clickCount, bool shift, bool ctrl, bool alt, bool meta)
+                           int clickCount, bool shift, bool ctrl, bool alt, bool meta)
             : m_position(pos), m_globalPosition(globalPos), m_button(button)
             , m_clickCount(clickCount)
-            , m_shiftKey(shift), m_ctrlKey(ctrl), m_altKey(alt), m_metaKey(meta)
-            { }
+            , m_shiftKey(shift)
+            , m_ctrlKey(ctrl)
+            , m_altKey(alt)
+            , m_metaKey(meta)
+        {
+        }
 
         const IntPoint& pos() const { return m_position; }
         int x() const { return m_position.x(); }
@@ -94,6 +98,6 @@ namespace WebCore {
         bool m_metaKey;
     };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // PlatformMouseEvent_h
index 027229e20fc93c9c501c5431d28e38a9a79bf667..3f2a9bdea0196b6bf02908e4b8b53bc74313d6ef 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef WheelEvent_h
-#define WheelEvent_h
+#ifndef PlatformWheelEvent_h
+#define PlatformWheelEvent_h
 
 #include "IntPoint.h"
 
@@ -82,6 +82,6 @@ namespace WebCore {
         bool m_metaKey;
     };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // PlatformWheelEvent_h
index 62fae0f0368b81ca06038dbc31c4ee281e0540ae..c9ebca13e74de7a792d7e8a608a2b131c061e553 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "Image.h"
 #include "IntPoint.h"
-#include "dom2_eventsimpl.h"
+#include "Clipboard.h"
 #include "CachedObjectClient.h"
 
 #ifdef __OBJC__
index 6ea144acb068b16225e57f4a0872d8992e93af25..3412541075f3ffeca2174415548f8a95a2963667 100644 (file)
 #include "EventNames.h"
 #include "FrameView.h"
 #include "GraphicsContext.h"
-#include "HTMLNames.h"
 #include "HTMLFrameSetElement.h"
-#include "dom2_eventsimpl.h"
-#include "RenderView.h"
-#include "RenderFrame.h"
+#include "HTMLNames.h"
 #include "KWQTextStream.h"
+#include "MouseEvent.h"
+#include "RenderFrame.h"
+#include "RenderView.h"
 
 namespace WebCore {
 
index 8aeb96bbedc90f63cf38280089aad9b2fadff76f..ed748e3251f894a1f6631ef744fc0ffcd42b9526 100644 (file)
 #include "config.h"
 #include "RenderLayer.h"
 
-#include "Document.h"
 #include "CSSPropertyNames.h"
+#include "Document.h"
 #include "EventNames.h"
 #include "FloatRect.h"
 #include "Frame.h"
 #include "FrameTree.h"
 #include "GraphicsContext.h"
-#include "dom2_eventsimpl.h"
 #include "HTMLMarqueeElement.h"
 #include "HTMLNames.h"
 #include "PlatformMouseEvent.h"
 #include "RenderArena.h"
-#include "RenderView.h"
 #include "RenderInline.h"
 #include "RenderTheme.h"
+#include "RenderView.h"
 #include "SelectionController.h"
 
 #if SVG_SUPPORT
index 6ba2a06329f401855e5dce3eae26bd452bbfc09d..9152bdd2c8fdccd283858724d835c280a2b92f25 100644 (file)
@@ -40,7 +40,6 @@
 #include "KWQWMatrix.h"
 #include "Position.h"
 #include "RenderArena.h"
-#include "RenderView.h"
 #include "RenderFlexibleBox.h"
 #include "RenderInline.h"
 #include "RenderListItem.h"
 #include "RenderTableRow.h"
 #include "RenderText.h"
 #include "RenderTheme.h"
+#include "RenderView.h"
 #include "cssstyleselector.h"
-#include "dom2_eventsimpl.h"
 #include <algorithm>
 
-
 using namespace std;
 
 namespace WebCore {
index 25fa44cf7bbf932b4a58d0b94a88edfa44e775c5..6c55db83a7a0abc00ccbc237463ab2bd9f96501a 100644 (file)
 #include "RenderTextField.h"
 
 #include "Document.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "Frame.h"
-#include "htmlediting.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "HTMLTextAreaElement.h"
 #include "HTMLTextFieldInnerElement.h"
+#include "RenderTheme.h"
 #include "SelectionController.h"
 #include "TextIterator.h"
-#include "dom2_eventsimpl.h"
-#include <math.h>
-#include "RenderTheme.h"
+#include "htmlediting.h"
 #include "visible_units.h"
+#include <math.h>
 
 namespace WebCore {
 
index 17ade62f8b30944c01637ec7dddc457d1b4c4084..3a4dc34fea9fbe443a271d428c600609507afd0e 100644 (file)
@@ -24,6 +24,7 @@
 #include "Cache.h"
 #include "DOMImplementation.h"
 #include "Decoder.h"
+#include "Event.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "FormData.h"
@@ -33,7 +34,6 @@
 #include "RegularExpression.h"
 #include "TextEncoding.h"
 #include "TransferJob.h"
-#include "dom2_eventsimpl.h"
 #include "kjs_binding.h"
 #include <kjs/protect.h>
 #include <wtf/Vector.h>