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
+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.
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();
#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();
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();
return IntRect(dw->availableGeometry(qw));
}
+float scaleFactor(const Page*)
+{
+ return 1.0f;
+}
+
}
// vim: ts=4 sw=4 et
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(); }
return data->m_widget->mapFromGlobal(p);
}
-float Widget::scaleFactor() const
-{
- return 1.0f;
-}
-
GraphicsContext* Widget::lockDrawingFocus()
{
notImplemented();