Commit e2ec6f25 authored by bdash's avatar bdash

2006-09-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>

        Reviewed by Adam.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10864
        Bug 10864: Linux\GDK build fixes

        * JavaScriptCoreSources.bkl:
        * jscore.bkl:

2006-09-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by Adam.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10864
        Bug 10864: Linux\GDK build fixes

        * Projects/gdk/webcore-gdk.bkl:
        * WebCoreSources.bkl:
        * platform/gdk/FontCacheGdk.cpp:
        * platform/gdk/FontDataGdk.cpp:
        (WebCore::FontData::platformInit):
        * platform/gdk/FontGdk.cpp:
        (WebCore::Font::drawGlyphs):
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdk::handleGdkEvent):
        * platform/gdk/FrameGdk.h:
        * platform/gdk/ImageGdk.cpp: Added.
        (WebCore::Image::initPlatformData):
        (WebCore::Image::invalidatePlatformData):
        (WebCore::Image::loadPlatformResource):
        (WebCore::Image::supportsType):
        * platform/gdk/RenderPopupMenuGdk.cpp:
        (WebCore::RenderPopupMenuGdk::hidePopup):
        * platform/gdk/RenderPopupMenuGdk.h:
        * platform/gdk/ScreenGdk.cpp:
        (WebCore::drawableForPage):
        (WebCore::screenRect):
        (WebCore::screenDepth):
        (WebCore::usableScreenRect):
        (WebCore::scaleFactor):
        * platform/gdk/SystemTimeLinux.cpp:
        (WebCore::currentTime):
        * platform/gdk/TemporaryLinkStubs.cpp:
        (FrameGdk::bindingRootObject):
        (FrameGdk::markMisspellings):
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (FrameGdk::shouldChangeSelection):
        (FrameGdk::respondToChangedSelection):
        (FrameGdk::respondToChangedContents):
        (Path::contains):
        (PlatformScrollBar::PlatformScrollBar):
        (PlatformScrollBar::~PlatformScrollBar):
        (PlatformScrollBar::width):
        (PlatformScrollBar::height):
        (PlatformScrollBar::setEnabled):
        (PlatformScrollBar::paint):
        (PlatformScrollBar::setScrollBarValue):
        (PlatformScrollBar::setKnobProportion):
        (PlatformScrollBar::setRect):
        (ScrollBar::ScrollBar):
        (FileChooser::FileChooser):
        (FileChooser::~FileChooser):
        (FileChooser::openFileChooser):
        (FileChooser::basenameForWidth):
        (FileChooser::uploadControlDetaching):
        (FileChooser::chooseFile):
        (Icon::Icon):
        (Icon::~Icon):
        (Icon::newIconForFile):
        (Icon::paint):
        (IconLoader::stopLoading):
        (IconLoader::startLoading):
        (IconLoader::createForFrame):
        (IconDatabase::isIconExpiredForIconURL):
        (IconDatabase::hasEntryForIconURL):
        (IconDatabase::sharedIconDatabase):
        * platform/gdk/WidgetGdk.cpp:
        * webcore-base.bkl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff5f543d
2006-09-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
Reviewed by Adam.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10864
Bug 10864: Linux\GDK build fixes
* JavaScriptCoreSources.bkl:
* jscore.bkl:
2006-09-15 Adam Roben <aroben@apple.com> 2006-09-15 Adam Roben <aroben@apple.com>
Windows build fix. Windows build fix.
......
...@@ -73,4 +73,20 @@ ...@@ -73,4 +73,20 @@
pcre/ucp_findchar.c pcre/ucp_findchar.c
</set> </set>
<set append="1" var="JSCORE_SOURCES_BINDINGS">
bindings/c/c_class.cpp
bindings/c/c_instance.cpp
bindings/c/c_runtime.cpp
bindings/c/c_utility.cpp
bindings/NP_jsobject.cpp
bindings/npruntime.cpp
bindings/runtime.cpp
bindings/runtime_array.cpp
bindings/runtime_method.cpp
bindings/runtime_object.cpp
bindings/runtime_root.cpp
</set>
</makefile> </makefile>
...@@ -48,6 +48,7 @@ JavaScriptCore Bakefile project file. ...@@ -48,6 +48,7 @@ JavaScriptCore Bakefile project file.
<include>$(SRCDIR)</include> <include>$(SRCDIR)</include>
<include>$(SRCDIR)/ForwardingHeaders</include> <include>$(SRCDIR)/ForwardingHeaders</include>
<include>$(SRCDIR)/wtf</include>
<include>$(SRCDIR)/kjs</include> <include>$(SRCDIR)/kjs</include>
<include>$(SRCDIR)/pcre</include> <include>$(SRCDIR)/pcre</include>
<include>$(SRCDIR)/bindings</include> <include>$(SRCDIR)/bindings</include>
...@@ -67,7 +68,7 @@ JavaScriptCore Bakefile project file. ...@@ -67,7 +68,7 @@ JavaScriptCore Bakefile project file.
<define>USE_CONSERVATIVE_GC=1</define> <define>USE_CONSERVATIVE_GC=1</define>
</if> </if>
<define>KHTML_XSLT=1</define> <define>XSLT_SUPPORT=1</define>
<if cond="FORMAT=='gnu'"> <if cond="FORMAT=='gnu'">
<!-- FIXME: we need proper configure checks --> <!-- FIXME: we need proper configure checks -->
...@@ -87,6 +88,7 @@ JavaScriptCore Bakefile project file. ...@@ -87,6 +88,7 @@ JavaScriptCore Bakefile project file.
<exe id="dftables"> <exe id="dftables">
<dirname>$(SRCDIR)</dirname> <dirname>$(SRCDIR)</dirname>
<include>$(SRCDIR)/wtf</include>
<sources>$(SRCDIR)/pcre/dftables.c</sources> <sources>$(SRCDIR)/pcre/dftables.c</sources>
</exe> </exe>
...@@ -99,14 +101,15 @@ JavaScriptCore Bakefile project file. ...@@ -99,14 +101,15 @@ JavaScriptCore Bakefile project file.
<objects-depend>dftables</objects-depend> <objects-depend>dftables</objects-depend>
<pre-build-target>DerivedSources</pre-build-target> <pre-build-target>DerivedSources</pre-build-target>
<sources> <sources>
$(JSCORE_SOURCES_WTF) $(JSCORE_SOURCES_WTF)
$(JSCORE_SOURCES_PCRE) $(JSCORE_SOURCES_PCRE)
$(JSCORE_SOURCES_KJS) $(JSCORE_SOURCES_KJS)
$(JSCORE_SOURCES_BINDINGS)
</sources> </sources>
<if cond="PLATFORM_WIN32=='1'"> <if cond="PLATFORM_WIN32=='1'">
$(JSCORE_SOURCES_WIN) $(JSCORE_SOURCES_WIN)
</if> </if>
<install-to>$(BUILDDIR)</install-to> <install-to>$(BUILDDIR)</install-to>
</lib> </lib>
</makefile> </makefile>
......
2006-09-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
Reviewed by Adam.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10864
Bug 10864: Linux\GDK build fixes
* Projects/gdk/webcore-gdk.bkl:
* WebCoreSources.bkl:
* platform/gdk/FontCacheGdk.cpp:
* platform/gdk/FontDataGdk.cpp:
(WebCore::FontData::platformInit):
* platform/gdk/FontGdk.cpp:
(WebCore::Font::drawGlyphs):
* platform/gdk/FrameGdk.cpp:
(WebCore::FrameGdk::handleGdkEvent):
* platform/gdk/FrameGdk.h:
* platform/gdk/ImageGdk.cpp: Added.
(WebCore::Image::initPlatformData):
(WebCore::Image::invalidatePlatformData):
(WebCore::Image::loadPlatformResource):
(WebCore::Image::supportsType):
* platform/gdk/RenderPopupMenuGdk.cpp:
(WebCore::RenderPopupMenuGdk::hidePopup):
* platform/gdk/RenderPopupMenuGdk.h:
* platform/gdk/ScreenGdk.cpp:
(WebCore::drawableForPage):
(WebCore::screenRect):
(WebCore::screenDepth):
(WebCore::usableScreenRect):
(WebCore::scaleFactor):
* platform/gdk/SystemTimeLinux.cpp:
(WebCore::currentTime):
* platform/gdk/TemporaryLinkStubs.cpp:
(FrameGdk::bindingRootObject):
(FrameGdk::markMisspellings):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::fileButtonChooseFileLabel):
(WebCore::fileButtonNoFileSelectedLabel):
(FrameGdk::shouldChangeSelection):
(FrameGdk::respondToChangedSelection):
(FrameGdk::respondToChangedContents):
(Path::contains):
(PlatformScrollBar::PlatformScrollBar):
(PlatformScrollBar::~PlatformScrollBar):
(PlatformScrollBar::width):
(PlatformScrollBar::height):
(PlatformScrollBar::setEnabled):
(PlatformScrollBar::paint):
(PlatformScrollBar::setScrollBarValue):
(PlatformScrollBar::setKnobProportion):
(PlatformScrollBar::setRect):
(ScrollBar::ScrollBar):
(FileChooser::FileChooser):
(FileChooser::~FileChooser):
(FileChooser::openFileChooser):
(FileChooser::basenameForWidth):
(FileChooser::uploadControlDetaching):
(FileChooser::chooseFile):
(Icon::Icon):
(Icon::~Icon):
(Icon::newIconForFile):
(Icon::paint):
(IconLoader::stopLoading):
(IconLoader::startLoading):
(IconLoader::createForFrame):
(IconDatabase::isIconExpiredForIconURL):
(IconDatabase::hasEntryForIconURL):
(IconDatabase::sharedIconDatabase):
* platform/gdk/WidgetGdk.cpp:
* webcore-base.bkl:
2006-09-15 Nikolas Zimmermann <zimmermann@kde.org> 2006-09-15 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Reviewed by Eric.
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
platform/gdk/FontPlatformDataGdk.cpp platform/gdk/FontPlatformDataGdk.cpp
platform/gdk/FrameGdk.cpp platform/gdk/FrameGdk.cpp
platform/gdk/GlyphMapGdk.cpp platform/gdk/GlyphMapGdk.cpp
platform/gdk/ImageGdk.cpp
platform/gdk/KeyEventGdk.cpp platform/gdk/KeyEventGdk.cpp
platform/gdk/MouseEventGdk.cpp platform/gdk/MouseEventGdk.cpp
platform/gdk/PageGdk.cpp platform/gdk/PageGdk.cpp
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
DerivedSources/WebCore/JSNotation.cpp DerivedSources/WebCore/JSNotation.cpp
DerivedSources/WebCore/JSProcessingInstruction.cpp DerivedSources/WebCore/JSProcessingInstruction.cpp
DerivedSources/WebCore/JSRange.cpp DerivedSources/WebCore/JSRange.cpp
DerivedSources/WebCore/JSRangeException.cpp
DerivedSources/WebCore/JSText.cpp DerivedSources/WebCore/JSText.cpp
DerivedSources/WebCore/JSTreeWalker.cpp DerivedSources/WebCore/JSTreeWalker.cpp
DerivedSources/WebCore/JSOverflowEvent.cpp DerivedSources/WebCore/JSOverflowEvent.cpp
...@@ -144,6 +145,7 @@ ...@@ -144,6 +145,7 @@
platform/ArrayImpl.cpp platform/ArrayImpl.cpp
platform/AtomicString.cpp platform/AtomicString.cpp
platform/Color.cpp platform/Color.cpp
platform/CString.cpp
platform/DeprecatedCString.cpp platform/DeprecatedCString.cpp
platform/DeprecatedPtrListImpl.cpp platform/DeprecatedPtrListImpl.cpp
platform/DeprecatedString.cpp platform/DeprecatedString.cpp
...@@ -377,6 +379,7 @@ ...@@ -377,6 +379,7 @@
<set append="1" var="WEBCORE_SOURCES_CSS"> <set append="1" var="WEBCORE_SOURCES_CSS">
css/CSSBorderImageValue.cpp css/CSSBorderImageValue.cpp
css/CSSCharsetRule.cpp
css/CSSComputedStyleDeclaration.cpp css/CSSComputedStyleDeclaration.cpp
css/CSSFontFaceRule.cpp css/CSSFontFaceRule.cpp
css/csshelper.cpp css/csshelper.cpp
...@@ -432,7 +435,7 @@ ...@@ -432,7 +435,7 @@
rendering/RenderButton.cpp rendering/RenderButton.cpp
rendering/RenderContainer.cpp rendering/RenderContainer.cpp
rendering/RenderFieldset.cpp rendering/RenderFieldset.cpp
rendering/RenderFileButton.cpp rendering/RenderFileUploadControl.cpp
rendering/RenderFlexibleBox.cpp rendering/RenderFlexibleBox.cpp
rendering/RenderFlow.cpp rendering/RenderFlow.cpp
rendering/RenderFormElement.cpp rendering/RenderFormElement.cpp
...@@ -533,7 +536,7 @@ ...@@ -533,7 +536,7 @@
dom/NodeFilterCondition.cpp dom/NodeFilterCondition.cpp
dom/NodeList.cpp dom/NodeList.cpp
dom/Notation.cpp dom/Notation.cpp
dom/OverflowEvent.cpp dom/OverflowEvent.cpp
dom/Position.cpp dom/Position.cpp
dom/ProcessingInstruction.cpp dom/ProcessingInstruction.cpp
dom/QualifiedName.cpp dom/QualifiedName.cpp
...@@ -551,6 +554,7 @@ ...@@ -551,6 +554,7 @@
<set append="1" var="WEBCORE_SOURCES_ICON"> <set append="1" var="WEBCORE_SOURCES_ICON">
icon/IconDatabase.cpp icon/IconDatabase.cpp
icon/IconLoader.cpp
icon/SQLDatabase.cpp icon/SQLDatabase.cpp
icon/SQLStatement.cpp icon/SQLStatement.cpp
icon/SiteIcon.cpp icon/SiteIcon.cpp
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "FontCache.h" #include "FontCache.h"
#include "Font.h" #include "Font.h"
#include "FontPlatformData.h" #include "FontData.h"
namespace WebCore { namespace WebCore {
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
namespace WebCore { namespace WebCore {
#define USE_OLD_CAIRO 1
void FontData::platformInit() void FontData::platformInit()
{ {
cairo_font_extents_t font_extents; cairo_font_extents_t font_extents;
...@@ -51,10 +53,15 @@ void FontData::platformInit() ...@@ -51,10 +53,15 @@ void FontData::platformInit()
m_ascent = static_cast<int>(font_extents.ascent); m_ascent = static_cast<int>(font_extents.ascent);
m_descent = static_cast<int>(font_extents.descent); m_descent = static_cast<int>(font_extents.descent);
m_lineSpacing = static_cast<int>(font_extents.height); m_lineSpacing = static_cast<int>(font_extents.height);
#ifdef USE_OLD_CAIRO
m_xHeight = 13;
m_spaceWidth = 10;
#else
cairo_scaled_font_text_extents(m_font.m_scaledFont, "x", &text_extents); cairo_scaled_font_text_extents(m_font.m_scaledFont, "x", &text_extents);
m_xHeight = text_extents.height; m_xHeight = text_extents.height;
cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents); cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents);
m_spaceWidth = static_cast<int>(text_extents.x_advance); m_spaceWidth = static_cast<int>(text_extents.x_advance);
#endif
assert(m_spaceWidth != 0); assert(m_spaceWidth != 0);
m_lineGap = m_lineSpacing - m_ascent - m_descent; m_lineGap = m_lineSpacing - m_ascent - m_descent;
} }
......
...@@ -48,7 +48,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, co ...@@ -48,7 +48,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, co
// Select the scaled font. // Select the scaled font.
font->setFont(context); font->setFont(context);
GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from); GlyphBufferGlyph* glyphs = (GlyphBufferGlyph*) glyphBuffer.glyphs(from);
float offset = point.x(); float offset = point.x();
......
...@@ -233,7 +233,7 @@ void FrameGdk::handleGdkEvent(GdkEvent* event) ...@@ -233,7 +233,7 @@ void FrameGdk::handleGdkEvent(GdkEvent* event)
PlatformKeyboardEvent kevent(event); PlatformKeyboardEvent kevent(event);
bool handled = false; bool handled = false;
if (!kevent.isKeyUp()) { if (!kevent.isKeyUp()) {
Node* start = selection().start().node(); Node* start = selectionController()->start().node();
if (start && start->isContentEditable()) { if (start && start->isContentEditable()) {
switch(kevent.WindowsKeyCode()) { switch(kevent.WindowsKeyCode()) {
case VK_BACK: case VK_BACK:
...@@ -243,16 +243,16 @@ void FrameGdk::handleGdkEvent(GdkEvent* event) ...@@ -243,16 +243,16 @@ void FrameGdk::handleGdkEvent(GdkEvent* event)
TypingCommand::forwardDeleteKeyPressed(document()); TypingCommand::forwardDeleteKeyPressed(document());
break; break;
case VK_LEFT: case VK_LEFT:
selection().modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity); selectionController()->modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity);
break; break;
case VK_RIGHT: case VK_RIGHT:
selection().modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity); selectionController()->modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity);
break; break;
case VK_UP: case VK_UP:
selection().modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity); selectionController()->modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity);
break; break;
case VK_DOWN: case VK_DOWN:
selection().modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity); selectionController()->modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
break; break;
default: default:
TypingCommand::insertText(document(), kevent.text(), false); TypingCommand::insertText(document(), kevent.text(), false);
......
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
virtual String mimeTypeForFileName(const String&) const; virtual String mimeTypeForFileName(const String&) const;
virtual void markMisspellingsInAdjacentWords(const VisiblePosition&); virtual void markMisspellingsInAdjacentWords(const VisiblePosition&);
virtual void markMisspellings(const SelectionController&); virtual void markMisspellings(const Selection&);
virtual bool lastEventIsMouseUp() const; virtual bool lastEventIsMouseUp() const;
...@@ -99,6 +99,7 @@ public: ...@@ -99,6 +99,7 @@ public:
virtual KJS::Bindings::Instance* getEmbedInstanceForWidget(Widget*); virtual KJS::Bindings::Instance* getEmbedInstanceForWidget(Widget*);
virtual KJS::Bindings::Instance* getObjectInstanceForWidget(Widget*); virtual KJS::Bindings::Instance* getObjectInstanceForWidget(Widget*);
virtual KJS::Bindings::Instance* getAppletInstanceForWidget(Widget*); virtual KJS::Bindings::Instance* getAppletInstanceForWidget(Widget*);
virtual KJS::Bindings::RootObject* bindingRootObject();
virtual void registerCommandForUndo(PassRefPtr<EditCommand>); virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
virtual void registerCommandForRedo(PassRefPtr<EditCommand>); virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
...@@ -110,9 +111,10 @@ public: ...@@ -110,9 +111,10 @@ public:
virtual void issuePasteCommand(); virtual void issuePasteCommand();
virtual void issuePasteAndMatchStyleCommand(); virtual void issuePasteAndMatchStyleCommand();
virtual void issueTransposeCommand(); virtual void issueTransposeCommand();
virtual void respondToChangedSelection(const SelectionController& oldSelection, bool closeTyping); virtual void respondToChangedSelection(const Selection& oldSelection, bool closeTyping);
virtual void respondToChangedContents(); virtual void respondToChangedContents(const Selection& endingSelection);
virtual bool shouldChangeSelection(const SelectionController& oldSelection, const SelectionController& newSelection, EAffinity affinity, bool stillSelecting) const; virtual bool shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity affinity, bool stillSelecting) const;
bool shouldChangeSelection(const Selection&) const;
virtual void partClearedInBegin(); virtual void partClearedInBegin();
virtual bool canGoBackOrForward(int distance) const; virtual bool canGoBackOrForward(int distance) const;
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "Image.h"
#if PLATFORM(CAIRO)
#include <cairo.h>
#else
#error "GDK port requires PLATFORM(CAIRO)"
#endif
// This function loads resources from WebKit
Vector<char> loadResourceIntoArray(const char*);
namespace WebCore {
void Image::initPlatformData()
{
}
void Image::invalidatePlatformData()
{
}
Image* Image::loadPlatformResource(const char *name)
{
Vector<char> arr = loadResourceIntoArray(name);
Image* img = new Image;
img->setNativeData(&arr, true);
return img;
}
bool Image::supportsType(const String& type)
{
// FIXME: Implement.
return false;
}
}
...@@ -47,6 +47,10 @@ void RenderPopupMenuGdk::showPopup(const IntRect&, FrameView*, int) ...@@ -47,6 +47,10 @@ void RenderPopupMenuGdk::showPopup(const IntRect&, FrameView*, int)
{ {
} }
void RenderPopupMenuGdk::hidePopup()
{
}
void RenderPopupMenuGdk::addSeparator() void RenderPopupMenuGdk::addSeparator()
{ {
} }
......
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
virtual void clear(); virtual void clear();
virtual void populate(); virtual void populate();
virtual void showPopup(const IntRect&, FrameView*, int index); virtual void showPopup(const IntRect&, FrameView*, int index);
virtual void hidePopup();
protected: protected:
virtual void addSeparator(); virtual void addSeparator();
......
...@@ -28,32 +28,52 @@ ...@@ -28,32 +28,52 @@
#include "config.h" #include "config.h"
#include "Screen.h" #include "Screen.h"
#include "FloatRect.h" #include "Page.h"
#include "Frame.h"
#include "Widget.h" #include "Widget.h"
#include "FloatRect.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>
namespace WebCore { namespace WebCore {
FloatRect screenRect(Widget* widget) static GdkDrawable* drawableForPage(const Page* page)
{
Frame* frame = (page ? page->mainFrame() : 0);
FrameView* frameView = (frame ? frame->view() : 0);
if (!frameView)
return 0;
return frameView->drawable();
}
FloatRect screenRect(const Page* page)
{ {
GdkDrawable* drawable = widget->drawable(); GdkDrawable* drawable = drawableForPage(page);
if (!drawable) if (!drawable)
return FloatRect(); return FloatRect();
GdkScreen* screen = gdk_drawable_get_screen(drawable); GdkScreen* screen = gdk_drawable_get_screen(drawable);
return FloatRect(0, 0, gdk_screen_get_width(screen), gdk_screen_get_height(screen)); return FloatRect(0, 0, gdk_screen_get_width(screen), gdk_screen_get_height(screen));
} }
int screenDepth(Widget* widget) int screenDepth(const Page* page)
{ {
GdkDrawable* drawable = widget->drawable(); GdkDrawable* drawable = drawableForPage(page);
if (!drawable) if (!drawable)
return 32; return 32;
return gdk_drawable_get_depth(drawable); return gdk_drawable_get_depth(drawable);
} }
FloatRect usableScreenRect(Widget* widget) FloatRect usableScreenRect(const Page* page)
{ {
return screenRect(widget); return screenRect(page);
}
float scaleFactor(const Page*)
{
return 1.0f;
} }
} }
...@@ -28,15 +28,17 @@ ...@@ -28,15 +28,17 @@
#include "config.h" #include "config.h"
#include "SystemTime.h" #include "SystemTime.h"
#include <time.h> #include <sys/time.h>
namespace WebCore { namespace WebCore {
double currentTime() double currentTime()
{ {
time_t ttime; struct timeval aTimeval;
time(&ttime); struct timezone aTimezone;
return (double)ttime;
gettimeofday( &aTimeval, &aTimezone );
return (double)aTimeval.tv_sec + (double)(aTimeval.tv_usec / 1000000.0 );
} }
} }
...@@ -31,10 +31,11 @@ ...@@ -31,10 +31,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "CString.h"
#include "Node.h" #include "Node.h"
#include "TextField.h" #include "TextField.h"