Reviewed by Hyatt.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2007 02:05:50 +0000 (02:05 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Feb 2007 02:05:50 +0000 (02:05 +0000)
        - removed some bogus names (Hyatt smacked me since this doesn't fix a P1)

        * dom/EventNames.h: Removed half-implemented khtmlDragdrop and khtmlMove
        (you could add listeners, but nobody ever sent the events). Renamed the
        other two khtml-prefixed internal event names to use the webkit prefix.

        * bindings/js/kjs_dom.cpp:
        (KJS::DOMEventTargetNode::getValueProperty): Removed ondragdrop and onmove.
        (KJS::DOMEventTargetNode::putValueProperty): Ditto.
        * bindings/js/kjs_dom.h:
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty): Ditto.
        (KJS::Window::put): Ditto.
        * bindings/js/kjs_window.h:

        * dom/BeforeTextInsertedEvent.cpp:
        (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): Renamed to webkit.
        * editing/Editor.cpp:
        (WebCore::dispatchEditableContentChangedEvents): Ditto.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
        * html/HTMLTextFieldInnerElement.cpp:
        (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bindings/js/kjs_dom.cpp
WebCore/bindings/js/kjs_dom.h
WebCore/bindings/js/kjs_window.cpp
WebCore/bindings/js/kjs_window.h
WebCore/dom/BeforeTextInsertedEvent.cpp
WebCore/dom/EventNames.h
WebCore/editing/Editor.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/html/HTMLTextFieldInnerElement.cpp

index 3451d8a..f1112df 100644 (file)
@@ -1,5 +1,33 @@
 2007-02-13  Darin Adler  <darin@apple.com>
 
+        Reviewed by Hyatt.
+
+        - removed some bogus names (Hyatt smacked me since this doesn't fix a P1)
+
+        * dom/EventNames.h: Removed half-implemented khtmlDragdrop and khtmlMove
+        (you could add listeners, but nobody ever sent the events). Renamed the
+        other two khtml-prefixed internal event names to use the webkit prefix.
+
+        * bindings/js/kjs_dom.cpp:
+        (KJS::DOMEventTargetNode::getValueProperty): Removed ondragdrop and onmove.
+        (KJS::DOMEventTargetNode::putValueProperty): Ditto.
+        * bindings/js/kjs_dom.h:
+        * bindings/js/kjs_window.cpp:
+        (KJS::Window::getValueProperty): Ditto.
+        (KJS::Window::put): Ditto.
+        * bindings/js/kjs_window.h:
+
+        * dom/BeforeTextInsertedEvent.cpp:
+        (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): Renamed to webkit.
+        * editing/Editor.cpp:
+        (WebCore::dispatchEditableContentChangedEvents): Ditto.
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
+        * html/HTMLTextFieldInnerElement.cpp:
+        (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Ditto.
+
+2007-02-13  Darin Adler  <darin@apple.com>
+
         Rubber stamped by Maciej.
 
         * dom/EventNames.h: Resort names. Removed unused names.
index 68917dd..94f97bf 100644 (file)
@@ -1,8 +1,7 @@
 /*
- *  This file is part of the KDE libraries
  *  Copyright (C) 2000 Harri Porten (porten@kde.org)
  *  Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
- *  Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *  Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -362,7 +361,6 @@ oncopy        DOMEventTargetNode::OnCopy                 DontDelete
 onbeforepaste DOMEventTargetNode::OnBeforePaste          DontDelete
 onpaste       DOMEventTargetNode::OnPaste                DontDelete
 ondrag        DOMEventTargetNode::OnDrag                 DontDelete
-ondragdrop    DOMEventTargetNode::OnDragDrop             DontDelete
 ondragend     DOMEventTargetNode::OnDragEnd              DontDelete
 ondragenter   DOMEventTargetNode::OnDragEnter            DontDelete
 ondragleave   DOMEventTargetNode::OnDragLeave            DontDelete
@@ -382,7 +380,6 @@ onmouseout    DOMEventTargetNode::OnMouseOut             DontDelete
 onmouseover   DOMEventTargetNode::OnMouseOver            DontDelete
 onmouseup     DOMEventTargetNode::OnMouseUp              DontDelete
 onmousewheel  DOMEventTargetNode::OnMouseWheel           DontDelete
-onmove        DOMEventTargetNode::OnMove                 DontDelete
 onreset       DOMEventTargetNode::OnReset                DontDelete
 onresize      DOMEventTargetNode::OnResize               DontDelete
 onscroll      DOMEventTargetNode::OnScroll               DontDelete
@@ -420,8 +417,6 @@ JSValue* DOMEventTargetNode::getValueProperty(ExecState* exec, int token) const
             return getListener(contextmenuEvent);
         case OnDblClick:
             return getListener(dblclickEvent);
-        case OnDragDrop:
-            return getListener(khtmlDragdropEvent);
         case OnError:
             return getListener(errorEvent);
         case OnFocus:
@@ -474,8 +469,6 @@ JSValue* DOMEventTargetNode::getValueProperty(ExecState* exec, int token) const
             return getListener(dragEvent);
         case OnDragEnd:
             return getListener(dragendEvent);
-        case OnMove:
-            return getListener(khtmlMoveEvent);
         case OnReset:
             return getListener(resetEvent);
         case OnResize:
@@ -523,9 +516,6 @@ void DOMEventTargetNode::putValueProperty(ExecState* exec, int token, JSValue* v
         case OnDblClick:
             setListener(exec, dblclickEvent, value);
             break;
-        case OnDragDrop:
-            setListener(exec, khtmlDragdropEvent, value);
-            break;
         case OnError:
             setListener(exec, errorEvent, value);
             break;
@@ -604,9 +594,6 @@ void DOMEventTargetNode::putValueProperty(ExecState* exec, int token, JSValue* v
         case OnDragEnd:
             setListener(exec, dragendEvent, value);
             break;
-        case OnMove:
-            setListener(exec, khtmlMoveEvent, value);
-            break;
         case OnReset:
             setListener(exec, resetEvent, value);
             break;
index 7d9bee7..c57c96e 100644 (file)
@@ -1,7 +1,6 @@
 /*
- *  This file is part of the KDE libraries
  *  Copyright (C) 2000 Harri Porten (porten@kde.org)
- *  Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *  Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -60,11 +59,11 @@ namespace KJS {
 
       enum {  
           AddEventListener, RemoveEventListener, DispatchEvent,
-          OnAbort, OnBlur, OnChange, OnClick, OnContextMenu, OnDblClick, OnDragDrop, OnError,
+          OnAbort, OnBlur, OnChange, OnClick, OnContextMenu, OnDblClick, OnError,
           OnDragEnter, OnDragOver, OnDragLeave, OnDrop, OnDragStart, OnDrag, OnDragEnd,
           OnBeforeCut, OnCut, OnBeforeCopy, OnCopy, OnBeforePaste, OnPaste, OnSelectStart,
           OnFocus, OnInput, OnKeyDown, OnKeyPress, OnKeyUp, OnLoad, OnMouseDown,
-          OnMouseMove, OnMouseOut, OnMouseOver, OnMouseUp, OnMouseWheel, OnMove, OnReset,
+          OnMouseMove, OnMouseOut, OnMouseOver, OnMouseUp, OnMouseWheel, OnReset,
           OnResize, OnScroll, OnSearch, OnSelect, OnSubmit, OnUnload
       };
   };
index 0e66a13..26b6342 100644 (file)
@@ -1,9 +1,8 @@
 // -*- c-basic-offset: 4 -*-
 /*
- *  This file is part of the KDE libraries
  *  Copyright (C) 2000 Harri Porten (porten@kde.org)
  *  Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
- *  Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *  Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reseved.
  *  Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
  *
  *  This library is free software; you can redistribute it and/or
@@ -298,7 +297,6 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
   onchange      Window::Onchange        DontDelete
   onclick       Window::Onclick         DontDelete
   ondblclick    Window::Ondblclick      DontDelete
-  ondragdrop    Window::Ondragdrop      DontDelete
   onerror       Window::Onerror         DontDelete
   onfocus       Window::Onfocus         DontDelete
   onkeydown     Window::Onkeydown       DontDelete
@@ -311,7 +309,6 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
   onmouseover   Window::Onmouseover     DontDelete
   onmouseup     Window::Onmouseup       DontDelete
   onmousewheel  Window::OnWindowMouseWheel      DontDelete
-  onmove        Window::Onmove          DontDelete
   onreset       Window::Onreset         DontDelete
   onresize      Window::Onresize        DontDelete
   onscroll      Window::Onscroll        DontDelete
@@ -834,8 +831,6 @@ JSValue *Window::getValueProperty(ExecState *exec, int token) const
      return getListener(exec, clickEvent);
    case Ondblclick:
      return getListener(exec, dblclickEvent);
-   case Ondragdrop:
-     return getListener(exec, khtmlDragdropEvent);
    case Onerror:
      return getListener(exec, errorEvent);
    case Onfocus:
@@ -860,8 +855,6 @@ JSValue *Window::getValueProperty(ExecState *exec, int token) const
      return getListener(exec, mouseupEvent);
    case OnWindowMouseWheel:
      return getListener(exec, mousewheelEvent);
-   case Onmove:
-     return getListener(exec, khtmlMoveEvent);
    case Onreset:
      return getListener(exec, resetEvent);
    case Onresize:
@@ -1056,10 +1049,6 @@ void Window::put(ExecState* exec, const Identifier &propertyName, JSValue *value
       if (isSafeScript(exec))
         setListener(exec, dblclickEvent,value);
       return;
-    case Ondragdrop:
-      if (isSafeScript(exec))
-        setListener(exec,khtmlDragdropEvent,value);
-      return;
     case Onerror:
       if (isSafeScript(exec))
         setListener(exec, errorEvent, value);
@@ -1108,10 +1097,6 @@ void Window::put(ExecState* exec, const Identifier &propertyName, JSValue *value
       if (isSafeScript(exec))
         setListener(exec, mousewheelEvent,value);
       return;
-    case Onmove:
-      if (isSafeScript(exec))
-        setListener(exec,khtmlMoveEvent,value);
-      return;
     case Onreset:
       if (isSafeScript(exec))
         setListener(exec,resetEvent,value);
index ec58814..460d2d1 100644 (file)
@@ -1,7 +1,6 @@
 /*
- *  This file is part of the KDE libraries
  *  Copyright (C) 2000 Harri Porten (porten@kde.org)
- *  Copyright (C) 2003 Apple Computer, Inc.
+ *  Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reseved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -165,9 +164,9 @@ namespace KJS {
            Focus, GetSelection, Blur, Close, SetInterval, ClearInterval, CaptureEvents, 
            ReleaseEvents, AddEventListener, RemoveEventListener,
            XMLHttpRequest, XSLTProcessor_,
-           Onabort, Onblur, Onchange, Onclick, Ondblclick, Ondragdrop, Onerror, 
+           Onabort, Onblur, Onchange, Onclick, Ondblclick, Onerror, 
            Onfocus, Onkeydown, Onkeypress, Onkeyup, Onload, Onmousedown, Onmousemove,
-           Onmouseout, Onmouseover, Onmouseup, OnWindowMouseWheel, Onmove, Onreset, Onresize, Onscroll, Onsearch,
+           Onmouseout, Onmouseover, Onmouseup, OnWindowMouseWheel, Onreset, Onresize, Onscroll, Onsearch,
            Onselect, Onsubmit, Onunload, Onbeforeunload,
            Statusbar, Toolbar, FrameElement, ShowModalDialog };
 
index 7780d1e..be27adc 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 using namespace EventNames;
 
 BeforeTextInsertedEvent::BeforeTextInsertedEvent(const String& text)
-    : Event(khtmlBeforeTextInsertedEvent, false, true), m_text(text)
+    : Event(webkitBeforeTextInsertedEvent, false, true), m_text(text)
 {
 }
 
index 8376787..f1e0340 100644 (file)
@@ -1,7 +1,5 @@
 /*
- * This file is part of the DOM implementation for KDE.
- *
- * Copyright (C) 2005 Apple Computer, Inc.
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
  * Copyright (C) 2006 Jon Shier (jshier@iastate.edu)
  *
  * This library is free software; you can redistribute it and/or
@@ -87,10 +85,8 @@ namespace WebCore { namespace EventNames {
     macro(DOMNodeRemovedFromDocument) \
     macro(DOMSubtreeModified) \
     \
-    macro(khtmlBeforeTextInserted) \
-    macro(khtmlDragdrop) \
-    macro(khtmlEditableContentChanged) \
-    macro(khtmlMove) \
+    macro(webkitBeforeTextInserted) \
+    macro(webkitEditableContentChanged) \
     \
 // end of DOM_EVENT_NAMES_FOR_EACH
 
index cee7760..31d7976 100644 (file)
@@ -669,9 +669,9 @@ static void dispatchEditableContentChangedEvents(const EditCommand& command)
     Element* endRoot = command.endingRootEditableElement();
     ExceptionCode ec;
     if (startRoot)
-        startRoot->dispatchEvent(new Event(khtmlEditableContentChangedEvent, false, false), ec, true);
+        startRoot->dispatchEvent(new Event(webkitEditableContentChangedEvent, false, false), ec, true);
     if (endRoot && endRoot != startRoot)
-        endRoot->dispatchEvent(new Event(khtmlEditableContentChangedEvent, false, false), ec, true);
+        endRoot->dispatchEvent(new Event(webkitEditableContentChangedEvent, false, false), ec, true);
 }
 
 void Editor::appliedEditing(PassRefPtr<EditCommand> cmd)
index 0ed00e2..9a05f87 100644 (file)
@@ -86,7 +86,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
     
     Node* shadowAncestorNode = editableRoot->shadowAncestorNode();
     
-    if (!editableRoot->getHTMLEventListener(khtmlBeforeTextInsertedEvent) &&
+    if (!editableRoot->getHTMLEventListener(webkitBeforeTextInsertedEvent) &&
         // FIXME: Remove these checks once textareas and textfields actually register an event handler.
         !(shadowAncestorNode && shadowAncestorNode->renderer() && shadowAncestorNode->renderer()->isTextField()) &&
         !(shadowAncestorNode && shadowAncestorNode->renderer() && shadowAncestorNode->renderer()->isTextArea()) &&
index 4ccc70c..4bf2e38 100644 (file)
@@ -60,7 +60,7 @@ void HTMLTextFieldInnerTextElement::defaultEventHandler(Event* evt)
                 static_cast<HTMLInputElement*>(shadowAncestor)->defaultEventHandler(evt);
             else
                 static_cast<HTMLTextAreaElement*>(shadowAncestor)->defaultEventHandler(evt);
-        if (evt->type() == khtmlEditableContentChangedEvent)
+        if (evt->type() == webkitEditableContentChangedEvent)
             static_cast<RenderTextControl*>(shadowAncestor->renderer())->subtreeHasChanged();
     }
     if (!evt->defaultHandled())