Add invalidation methods to widget.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 08:24:33 +0000 (08:24 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 08:24:33 +0000 (08:24 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/Widget.h
WebCore/platform/mac/WidgetMac.mm
WebCore/platform/win/TemporaryLinkStubs.cpp

index 8c819653e52d16046163c9d17366883d8121d512..682ee25396f65ad03f6cc1cbf8eb56898e233f2f 100644 (file)
@@ -1,3 +1,18 @@
+2006-09-22   Dave Hyatt  <hyatt@apple.com>
+
+        Add support for invalidation of widgets.  This will be needed for the Win32 widget subsystem (and for
+        any widget subsystems that don't have any underlying native objects backing the widgets.
+
+        Reviewed by anders
+
+        * platform/Widget.h:
+        * platform/mac/WidgetMac.mm:
+        (WebCore::Widget::invalidate):
+        (WebCore::Widget::invalidateRect):
+        * platform/win/TemporaryLinkStubs.cpp:
+        (Widget::invalidate):
+        (Widget::invalidateRect):
+
 2006-09-22  Rob Buis  <buis@kd.org>
 
         Reviewed by eseidel.
index b9a0464756ff832e035b81aad5a122cce8a845b8..c107a094064793b8d808933263dfdff79900290c 100644 (file)
@@ -90,6 +90,8 @@ namespace WebCore {
         void move(const IntPoint&);
 
         virtual void paint(GraphicsContext*, const IntRect&);
+        virtual void invalidate();
+        virtual void invalidateRect(const IntRect&);
 
         virtual void setFrameGeometry(const IntRect&);
         virtual IntRect frameGeometry() const;
index 24cea8eec63d3d08bf6d8c5468716d97b9dbd4a9..9cfd62a3c260fe521905b6afbaf7b70243e4673d 100644 (file)
@@ -352,6 +352,20 @@ void Widget::paint(GraphicsContext* p, const IntRect& r)
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
+void Widget::invalidate()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    [getView() setNeedsDisplay: YES];
+    END_BLOCK_OBJC_EXCEPTIONS;
+}
+
+void Widget::invalidateRect(const IntRect& r)
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    [getView() setNeedsDisplayInRect: r];
+    END_BLOCK_OBJC_EXCEPTIONS;
+}
+
 void Widget::sendConsumedMouseUp()
 {
     if (client())
index acbf650dfbf63804ba0d1323e008a2408b193ff6..514028230d4379cfe7e0988b005a48d44e5ddd05 100644 (file)
@@ -264,7 +264,8 @@ HINSTANCE Page::s_instanceHandle = 0;
 void Widget::setEnabled(bool) { }
 void Widget::paint(GraphicsContext*,IntRect const&) { }
 void Widget::setIsSelected(bool) { }
-
+void Widget::invalidate() { }
+void Widget::invalidateRect(const IntRect& r) { }
 void ScrollView::addChild(Widget*,int,int) { }
 void ScrollView::removeChild(Widget*) { }
 void ScrollView::scrollPointRecursively(int x, int y) { }