Reviewed by Oliver.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 03:53:08 +0000 (03:53 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 03:53:08 +0000 (03:53 +0000)
        Some small context menu-related fixes.

        * html/HTMLFrameSetElement.cpp:
        (WebCore::HTMLFrameSetElement::defaultEventHandler): Don't try to
        resize on a contextmenuEvent.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::defaultEventHandler): Only pass the event
        off to HTMLGenericFormElement if we haven't handled it.

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

WebCore/ChangeLog
WebCore/html/HTMLFrameSetElement.cpp
WebCore/html/HTMLInputElement.cpp

index 83928cef74d9db2d11d117000f2194bcb7a47ab6..3840f555df8ec12a23583e2a03d3e232165a8767 100644 (file)
@@ -1,3 +1,16 @@
+2006-12-07  Adam Roben  <aroben@apple.com>
+
+        Reviewed by Oliver.
+
+        Some small context menu-related fixes.
+
+        * html/HTMLFrameSetElement.cpp:
+        (WebCore::HTMLFrameSetElement::defaultEventHandler): Don't try to
+        resize on a contextmenuEvent.
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::defaultEventHandler): Only pass the event
+        off to HTMLGenericFormElement if we haven't handled it.
+
 2006-12-07  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Darin.
index 0de72fdf49b8f01aff9c4cd39f9a972c5f14d718..90aa7d30c41f596ede6f2ba4aeae81ae57953c94 100644 (file)
@@ -138,7 +138,7 @@ void HTMLFrameSetElement::attach()
 
 void HTMLFrameSetElement::defaultEventHandler(Event* evt)
 {
-    if (evt->isMouseEvent() && !noresize && renderer()) {
+    if (evt->isMouseEvent() && evt->type() != contextmenuEvent && !noresize && renderer()) {
         static_cast<RenderFrameSet*>(renderer())->userResize(static_cast<MouseEvent*>(evt));
         evt->setDefaultHandled();
     }
index e785e7d3b952df75b8994c332cf8b99026354a26..a1e89cb3ae49ddbc45b60a562eb478dc7e83593f 100644 (file)
@@ -1378,8 +1378,9 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
         if (evt->isMouseEvent() || evt->isDragEvent() || evt->isWheelEvent())
             slider->forwardEvent(evt);
     }
-            
-    HTMLGenericFormElement::defaultEventHandler(evt);
+
+    if (!evt->defaultHandled())
+        HTMLGenericFormElement::defaultEventHandler(evt);
 }
 
 bool HTMLInputElement::isURLAttribute(Attribute *attr) const