Reviewed/landed by Adam.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 18:23:47 +0000 (18:23 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 18:23:47 +0000 (18:23 +0000)
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10561
        Qt platform build fixes.

        * platform/qt/FrameQt.h:
        * platform/qt/ScreenQt.cpp:
        (WebCore::qwidgetForPage):
        (WebCore::screenRect):
        (WebCore::screenDepth):
        (WebCore::usableScreenRect):
        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        * platform/qt/WidgetQt.cpp:

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

WebCore/ChangeLog
WebCore/platform/qt/FrameQt.h
WebCore/platform/qt/ScreenQt.cpp
WebCore/platform/qt/TemporaryLinkStubs.cpp
WebCore/platform/qt/WidgetQt.cpp

index c5c0fe3fc95c50c0b56020858435deae13670d8c..03cf7b1a06e3c269d06eb3905c04dc68a5a39c2b 100644 (file)
@@ -1,3 +1,21 @@
+2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed/landed by Adam.
+
+        Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10561
+        Qt platform build fixes.
+
+        * platform/qt/FrameQt.h:
+        * platform/qt/ScreenQt.cpp:
+        (WebCore::qwidgetForPage):
+        (WebCore::screenRect):
+        (WebCore::screenDepth):
+        (WebCore::usableScreenRect):
+        * platform/qt/TemporaryLinkStubs.cpp:
+        (WebCore::screenDepthPerComponent):
+        (WebCore::screenIsMonochrome):
+        * platform/qt/WidgetQt.cpp:
+
 2006-08-25  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed/landed by Adam.
index aae58727621cfbd6ac980729e25be361c5481eb6..11e28074224954e923937bb42c2cf12098667633 100644 (file)
@@ -109,8 +109,8 @@ public:
     virtual KJS::Bindings::Instance* getObjectInstanceForWidget(Widget*);
     virtual KJS::Bindings::Instance* getAppletInstanceForWidget(Widget*);
 
-    virtual void registerCommandForUndo(const EditCommandPtr&);
-    virtual void registerCommandForRedo(const EditCommandPtr&);
+    virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
+    virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
     virtual void clearUndoRedoOperations();
     virtual void issueUndoCommand();
     virtual void issueRedoCommand();
index bec308d2b8644c88a890e921bedd3822fd939228..4ea4cf143038012aee996df202cdfed953cdb021 100644 (file)
@@ -29,6 +29,8 @@
 #include "config.h"
 #include "Screen.h"
 
+#include "Page.h"
+#include "Frame.h"
 #include "Widget.h"
 #include "IntRect.h"
 #include "FloatRect.h"
 
 namespace WebCore {
 
-FloatRect screenRect(Widget* widget)
+static QWidget* qwidgetForPage(const Page* page)
 {
-    QWidget* qw = widget->qwidget();
+    Frame* frame = (page ? page->mainFrame() : 0);
+    FrameView* frameView = (frame ? frame->view() : 0);
+
+    if (!frameView)
+        return 0;
+
+    return frameView->qwidget();
+}
+    
+FloatRect screenRect(const Page* page)
+{
+    QWidget* qw = qwidgetForPage(page);
     if (!qw)
         return FloatRect();
 
@@ -52,18 +65,18 @@ FloatRect screenRect(Widget* widget)
     return IntRect(dw->screenGeometry(qw));
 }
 
-int screenDepth(Widget* widget)
+int screenDepth(const Page* page)
 {
-    QWidget* qw = widget->qwidget();
+    QWidget* qw = qwidgetForPage(page);
     if (!qw)
         return 32;
 
     return qw->depth();
 }
 
-FloatRect usableScreenRect(Widget* widget)
+FloatRect usableScreenRect(const Page* page)
 {
-    QWidget* qw = widget->qwidget();
+    QWidget* qw = qwidgetForPage(page);
     if (!qw)
         return FloatRect();
 
@@ -75,6 +88,11 @@ FloatRect usableScreenRect(Widget* widget)
     return IntRect(dw->availableGeometry(qw));
 }
 
+float scaleFactor(const Page*)
+{
+    return 1.0f;
+}
+
 }
 
 // vim: ts=4 sw=4 et
index 2c876d9f17de7e7ea3c032191f9f9b6d39710fc0..102083165316b17217c109f06823864ed0c96b74 100644 (file)
@@ -157,8 +157,8 @@ void WebCore::findWordBoundary(UChar const* str, int len, int position, int* sta
 
 void Frame::setNeedsReapplyStyles() { notImplemented(); }
 
-int WebCore::screenDepthPerComponent(Widget*) { notImplemented(); return 0; }
-bool WebCore::screenIsMonochrome(Widget*) { notImplemented(); return false; }
+int WebCore::screenDepthPerComponent(const Page*) { notImplemented(); return 0; }
+bool WebCore::screenIsMonochrome(const Page*) { notImplemented(); return false; }
 
 String WebCore::searchableIndexIntroduction() { notImplemented(); return String(); }
 
index 25e16ea9ba43f91bf32f7bf108d1afd16c2b620c..28411a999f2794ed68d83c927fa0185c8aca8566 100644 (file)
@@ -169,11 +169,6 @@ IntPoint Widget::mapFromGlobal(const IntPoint& p) const
     return data->m_widget->mapFromGlobal(p);
 }
 
-float Widget::scaleFactor() const
-{
-    return 1.0f;
-}
-
 GraphicsContext* Widget::lockDrawingFocus()
 {
     notImplemented();