Widget focusability work.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 08:58:48 +0000 (08:58 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2006 08:58:48 +0000 (08:58 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16801 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/FrameView.cpp
WebCore/platform/ScrollView.h
WebCore/platform/Widget.h

index ab1c209a4f1be76a0b37cd1b1c02451544ff038d..a8bf4fb1f492645c0f68fe740b3f79b0d48c9209 100644 (file)
@@ -1,3 +1,14 @@
+2006-10-05  Dave Hyatt  <hyatt@apple.com>
+
+        Stub out some stuff for widget focusability.
+
+        Reviewed by maciej
+        * page/FrameView.cpp:
+        (WebCore::FrameView::dispatchMouseEvent):
+        * platform/ScrollView.h:
+        * platform/Widget.h:
+
 2006-10-05  Adam Roben  <aroben@apple.com>
 
         Reviewed by Maciej and Tim H.
index b5772020b57c66333405e7012e7411586a03aefd..081eff800553272fca0354faa31050ac5a3ddd6a 100644 (file)
@@ -1212,6 +1212,12 @@ bool FrameView::dispatchMouseEvent(const AtomicString& eventType, Node* targetNo
             if (!m_frame->document()->setFocusNode(0))
                 swallowEvent = true;
         }
+
+#if PLATFORM(WIN)
+        // It's ok to shift focus to this view now that we know that no focus change got blocked.
+        if (!swallowEvent && !hasFocus())
+            setFocus();
+#endif
     }
 
     return swallowEvent;
index b1ab5b96b474b1d39cfb269229485c1378bfaf39..9f18dc01bcc9b1c2753014a000282b36ac337b36 100644 (file)
@@ -27,6 +27,7 @@
 #define ScrollView_H
 
 #include "ScrollBarMode.h"
+#include "ScrollBar.h"
 #include "Widget.h"
 #include <wtf/Platform.h>
 
@@ -90,6 +91,8 @@ namespace WebCore {
         // (like Windows), we need this method in order to do the scroll ourselves.
         void wheelEvent(PlatformWheelEvent&);
 
+        void scroll(ScrollDirection, ScrollGranularity);
+
 #if PLATFORM(MAC)
         NSView* getDocumentView() const;
 #endif
index 0393a755f9a47d7afffd006984344a3793e65f32..12ee60775e5a6c8e744270cfe67ea08a479b3b53 100644 (file)
@@ -144,6 +144,12 @@ namespace WebCore {
         Widget* capturingChild();
         void setCapturingChild(Widget*);
         
+        void setFocused(bool);
+        Widget* focusedTarget();
+        Widget* focusedChild();
+        void setFocusedChild(Widget*);
+        void clearFocusFromDescendants();
+
         IntRect convertToContainingWindow(const IntRect&) const;
         IntPoint convertToContainingWindow(const IntPoint&) const;
         IntPoint convertFromContainingWindow(const IntPoint&) const;