summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/wx
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/platform/wx
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/platform/wx')
-rw-r--r--WebCore/platform/wx/ContextMenuItemWx.cpp108
-rw-r--r--WebCore/platform/wx/ContextMenuWx.cpp112
-rw-r--r--WebCore/platform/wx/LocalizedStringsWx.cpp75
-rw-r--r--WebCore/platform/wx/MimeTypeRegistryWx.cpp1
-rw-r--r--WebCore/platform/wx/MouseEventWx.cpp4
-rw-r--r--WebCore/platform/wx/PasteboardWx.cpp22
-rw-r--r--WebCore/platform/wx/RenderThemeWx.cpp23
-rw-r--r--WebCore/platform/wx/ScrollViewWx.cpp10
-rw-r--r--WebCore/platform/wx/SharedTimerWx.cpp2
-rw-r--r--WebCore/platform/wx/SystemTimeWx.cpp39
-rw-r--r--WebCore/platform/wx/wxcode/gtk/non-kerned-drawing.cpp1
11 files changed, 314 insertions, 83 deletions
diff --git a/WebCore/platform/wx/ContextMenuItemWx.cpp b/WebCore/platform/wx/ContextMenuItemWx.cpp
new file mode 100644
index 0000000..51ebe13
--- /dev/null
+++ b/WebCore/platform/wx/ContextMenuItemWx.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008 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 "ContextMenuItem.h"
+#include "ContextMenu.h"
+#include "PlatformMenuDescription.h"
+
+using namespace WebCore;
+
+ContextMenuItem::ContextMenuItem(ContextMenu* subMenu)
+{
+ m_platformDescription.type = SubmenuType;
+ m_platformDescription.action = ContextMenuItemTagNoAction;
+ if (subMenu)
+ setSubMenu(subMenu);
+ else
+ m_platformDescription.subMenu = 0;
+}
+
+ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction action,
+ const String& title, ContextMenu* subMenu)
+{
+ m_platformDescription.type = type;
+ m_platformDescription.action = action;
+ m_platformDescription.title = title;
+ if (subMenu)
+ setSubMenu(subMenu);
+ else
+ m_platformDescription.subMenu = 0;
+}
+
+ContextMenuItem::~ContextMenuItem()
+{
+}
+
+PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription()
+{
+ return m_platformDescription;
+}
+
+ContextMenuItemType ContextMenuItem::type() const
+{
+ return m_platformDescription.type;
+}
+
+void ContextMenuItem::setType(ContextMenuItemType type)
+{
+ m_platformDescription.type = type;
+}
+
+ContextMenuAction ContextMenuItem::action() const
+{
+ return m_platformDescription.action;
+}
+
+void ContextMenuItem::setAction(ContextMenuAction action)
+{
+ m_platformDescription.action = action;
+}
+
+String ContextMenuItem::title() const
+{
+ return m_platformDescription.title;
+}
+
+void ContextMenuItem::setTitle(const String& title)
+{
+ m_platformDescription.title = title;
+}
+
+void ContextMenuItem::setSubMenu(ContextMenu* subMenu)
+{
+ m_platformDescription.subMenu = subMenu->releasePlatformDescription();
+}
+
+void ContextMenuItem::setChecked(bool shouldCheck)
+{
+ m_platformDescription.checked = shouldCheck;
+}
+
+void ContextMenuItem::setEnabled(bool shouldEnable)
+{
+ m_platformDescription.enabled = shouldEnable;
+}
diff --git a/WebCore/platform/wx/ContextMenuWx.cpp b/WebCore/platform/wx/ContextMenuWx.cpp
new file mode 100644
index 0000000..6f1bc9c
--- /dev/null
+++ b/WebCore/platform/wx/ContextMenuWx.cpp
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2008 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 "ContextMenu.h"
+#include "ContextMenuItem.h"
+#include "PlatformMenuDescription.h"
+#include "wx/menu.h"
+
+using namespace WebCore;
+
+typedef WTF::HashMap<int, ContextMenuAction> ItemActionMap;
+static ItemActionMap s_itemActions;
+
+ContextMenuItem* ContextMenu::itemWithId(int id)
+{
+ return new ContextMenuItem(ActionType, s_itemActions.get(id), "");
+}
+
+ContextMenu::ContextMenu(const HitTestResult& result) : m_hitTestResult(result)
+{
+ m_platformDescription = new wxMenu(0);
+}
+
+ContextMenu::~ContextMenu()
+{
+ if (m_platformDescription)
+ delete m_platformDescription;
+}
+
+void ContextMenu::appendItem(ContextMenuItem& item)
+{
+ if (!m_platformDescription)
+ return;
+
+ checkOrEnableIfNeeded(item);
+
+ PlatformMenuItemDescription itemDescription = item.releasePlatformDescription();
+ wxItemKind menuKindWx = ( itemDescription.type == CheckableActionType ) ? wxITEM_CHECK : wxITEM_NORMAL;
+ wxString titleWx(itemDescription.title);
+ int idWx = wxID_ANY;
+ wxMenuItem * itemWx;
+
+ ItemActionMap::const_iterator end = s_itemActions.end();
+ for (ItemActionMap::const_iterator it = s_itemActions.begin(); it != end; ++it) {
+ if (it->second == itemDescription.action)
+ idWx = it->first;
+ }
+
+ if (itemDescription.subMenu) {
+ itemWx = new wxMenuItem(m_platformDescription, idWx, titleWx, wxEmptyString, wxITEM_NORMAL, itemDescription.subMenu);
+ } else if (itemDescription.type != SeparatorType) {
+ itemWx = new wxMenuItem(m_platformDescription, idWx, titleWx, wxT(""), menuKindWx);
+ } else {
+ itemWx = new wxMenuItem(m_platformDescription);
+ }
+
+ s_itemActions.add(itemWx->GetId(), item.action());
+
+ m_platformDescription->Append(itemWx);
+ m_platformDescription->Enable(itemWx->GetId(), itemDescription.enabled);
+
+ if (menuKindWx == wxITEM_CHECK)
+ m_platformDescription->Check(itemWx->GetId(), itemDescription.checked);
+}
+
+void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
+{
+ if (!menu)
+ return;
+
+ if (m_platformDescription)
+ delete m_platformDescription;
+
+ m_platformDescription = menu;
+}
+
+PlatformMenuDescription ContextMenu::platformDescription() const
+{
+ return m_platformDescription;
+}
+
+PlatformMenuDescription ContextMenu::releasePlatformDescription()
+{
+ PlatformMenuDescription description = m_platformDescription;
+ m_platformDescription = 0;
+
+ return description;
+}
diff --git a/WebCore/platform/wx/LocalizedStringsWx.cpp b/WebCore/platform/wx/LocalizedStringsWx.cpp
index a315181..5bede52 100644
--- a/WebCore/platform/wx/LocalizedStringsWx.cpp
+++ b/WebCore/platform/wx/LocalizedStringsWx.cpp
@@ -68,177 +68,182 @@ String fileButtonNoFileSelectedLabel()
String contextMenuItemTagOpenLinkInNewWindow()
{
- return String();
+ return String("Open Link in New Window");
}
String contextMenuItemTagDownloadLinkToDisk()
{
- return String();
+ return String("Download Link to Disk");
}
String contextMenuItemTagCopyLinkToClipboard()
{
- return String();
+ return String("Copy Link to Clipboard");
}
String contextMenuItemTagOpenImageInNewWindow()
{
- return String();
+ return String("Open Image in New Window");
}
String contextMenuItemTagDownloadImageToDisk()
{
- return String();
+ return String("Download Image to Disk");
}
String contextMenuItemTagCopyImageToClipboard()
{
- return String();
+ return String("Copy Image to Clipboard");
}
String contextMenuItemTagOpenFrameInNewWindow()
{
- return String();
+ return String("Open Frame in New Window");
}
String contextMenuItemTagCopy()
{
- return String();
+ return String("Copy");
}
String contextMenuItemTagGoBack()
{
- return String();
+ return String("Go Back");
}
String contextMenuItemTagGoForward()
{
- return String();
+ return String("Go Forward");
}
String contextMenuItemTagStop()
{
- return String();
+ return String("Stop");
}
String contextMenuItemTagReload()
{
- return String();
+ return String("Reload");
}
String contextMenuItemTagCut()
{
- return String();
+ return String("Cut");
}
String contextMenuItemTagPaste()
{
- return String();
+ return String("Paste");
}
String contextMenuItemTagNoGuessesFound()
{
- return String();
+ return String("No Guesses Found");
}
String contextMenuItemTagIgnoreSpelling()
{
- return String();
+ return String("Ignore Spelling");
}
String contextMenuItemTagLearnSpelling()
{
- return String();
+ return String("Learn Spelling");
}
String contextMenuItemTagSearchWeb()
{
- return String();
+ return String("Search Web");
}
String contextMenuItemTagLookUpInDictionary()
{
- return String();
+ return String("Look Up in Dictionary");
}
String contextMenuItemTagOpenLink()
{
- return String();
+ return String("Open Link");
}
String contextMenuItemTagIgnoreGrammar()
{
- return String();
+ return String("Ignore Grammar");
}
String contextMenuItemTagSpellingMenu()
{
- return String();
+ return String("Spelling");
}
String contextMenuItemTagShowSpellingPanel(bool show)
{
- return String();
+ return String("Show Spelling Panel");
}
String contextMenuItemTagCheckSpelling()
{
- return String();
+ return String("Check Spelling");
}
String contextMenuItemTagCheckSpellingWhileTyping()
{
- return String();
+ return String("Check Spelling While Typing");
}
String contextMenuItemTagCheckGrammarWithSpelling()
{
- return String();
+ return String("Check Grammar with Spelling");
}
String contextMenuItemTagFontMenu()
{
- return String();
+ return String("Font");
}
String contextMenuItemTagBold()
{
- return String();
+ return String("Bold");
}
String contextMenuItemTagItalic()
{
- return String();
+ return String("Italic");
}
String contextMenuItemTagUnderline()
{
- return String();
+ return String("Underline");
}
String contextMenuItemTagOutline()
{
- return String();
+ return String("Outline");
}
String contextMenuItemTagWritingDirectionMenu()
{
- return String();
+ return String("Writing Direction");
+}
+
+String contextMenuItemTagTextDirectionMenu()
+{
+ return String("Text Direction");
}
String contextMenuItemTagDefaultDirection()
{
- return String();
+ return String("Default Direction");
}
String contextMenuItemTagLeftToRight()
{
- return String();
+ return String("Left to Right");
}
String contextMenuItemTagRightToLeft()
{
- return String();
+ return String("Right to Left");
}
String searchMenuNoRecentSearchesText()
diff --git a/WebCore/platform/wx/MimeTypeRegistryWx.cpp b/WebCore/platform/wx/MimeTypeRegistryWx.cpp
index c025d02..601cd9f 100644
--- a/WebCore/platform/wx/MimeTypeRegistryWx.cpp
+++ b/WebCore/platform/wx/MimeTypeRegistryWx.cpp
@@ -38,6 +38,7 @@ static const ExtensionMap extensionMap [] = {
{ "bmp", "image/bmp" },
{ "css", "text/css" },
{ "gif", "image/gif" },
+ { "htm", "text/html" },
{ "html", "text/html" },
{ "ico", "image/x-icon" },
{ "jpeg", "image/jpeg" },
diff --git a/WebCore/platform/wx/MouseEventWx.cpp b/WebCore/platform/wx/MouseEventWx.cpp
index c9468a9..a02d7ba 100644
--- a/WebCore/platform/wx/MouseEventWx.cpp
+++ b/WebCore/platform/wx/MouseEventWx.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "Assertions.h"
#include "PlatformMouseEvent.h"
-#include "SystemTime.h"
+#include <wtf/CurrentTime.h>
#include <wx/defs.h>
#include <wx/event.h>
@@ -69,7 +69,7 @@ PlatformMouseEvent::PlatformMouseEvent(const wxMouseEvent& event, const wxPoint&
else
m_clickCount = event.ButtonDClick() ? 2 : 1;
- m_timestamp = WebCore::currentTime();
+ m_timestamp = WTF::currentTime();
}
}
diff --git a/WebCore/platform/wx/PasteboardWx.cpp b/WebCore/platform/wx/PasteboardWx.cpp
index 3b71e9a..67697de 100644
--- a/WebCore/platform/wx/PasteboardWx.cpp
+++ b/WebCore/platform/wx/PasteboardWx.cpp
@@ -31,6 +31,7 @@
#include "Frame.h"
#include "KURL.h"
#include "markup.h"
+#include "NotImplemented.h"
#include "PlatformString.h"
#include <wx/defs.h>
@@ -53,27 +54,39 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
{
if (wxTheClipboard->Open())
{
- String text = frame->selectedText();
- text.replace('\\', frame->backslashAsCurrencySymbol());
-
- wxTheClipboard->SetData( new wxTextDataObject(text) );
+ wxTheClipboard->SetData( new wxTextDataObject(frame->selectedText()) );
wxTheClipboard->Close();
}
}
bool Pasteboard::canSmartReplace()
{
+ notImplemented();
return false;
}
String Pasteboard::plainText(Frame* frame)
{
+ notImplemented();
return String();
}
PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context,
bool allowPlainText, bool& chosePlainText)
{
+ RefPtr<DocumentFragment> fragment = 0;
+ if (wxTheClipboard->Open()) {
+ if (allowPlainText && wxTheClipboard->IsSupported( wxDF_TEXT )) {
+ wxTextDataObject data;
+ wxTheClipboard->GetData( data );
+ chosePlainText = true;
+ fragment = createFragmentFromText(context.get(), data.GetText());
+ }
+ wxTheClipboard->Close();
+ }
+ if (fragment)
+ return fragment.release();
+
return 0;
}
@@ -93,6 +106,7 @@ void Pasteboard::clear()
void Pasteboard::writeImage(Node*, const KURL&, const String& title)
{
+ notImplemented();
}
}
diff --git a/WebCore/platform/wx/RenderThemeWx.cpp b/WebCore/platform/wx/RenderThemeWx.cpp
index 05ebeb9..9b6dea5 100644
--- a/WebCore/platform/wx/RenderThemeWx.cpp
+++ b/WebCore/platform/wx/RenderThemeWx.cpp
@@ -34,6 +34,7 @@
#include "WebKit/wx/WebView.h"
+#include <wx/dcgraph.h>
#include <wx/defs.h>
#include <wx/renderer.h>
#include <wx/dcclient.h>
@@ -130,7 +131,12 @@ bool RenderThemeWx::isControlStyled(const RenderStyle* style, const BorderData&
if (style->appearance() == TextFieldPart || style->appearance() == TextAreaPart)
return style->border() != border;
- return RenderTheme::isControlStyled(style, border, background, backgroundColor);
+ // Normally CSS can be used to set properties of form controls (such as adding a background bitmap).
+ // However, for this to work RenderThemeWx needs to adjust uncustomized elements (e.g. buttons) to reflect the
+ // changes made by CSS. Since we don't do that right now, the native parts of form elements appear in odd places.
+ // Until we have time to implement that support, we return false here, so that we ignore customizations
+ // and always use the native theme drawing to draw form controls.
+ return false;
}
void RenderThemeWx::adjustRepaintRect(const RenderObject* o, IntRect& r)
@@ -250,8 +256,12 @@ bool RenderThemeWx::paintButton(RenderObject* o, const RenderObject::PaintInfo&
wxRendererNative::Get().DrawPushButton(window, *dc, r, flags);
else if(part == RadioPart) {
if (isChecked(o))
- flags |= wxCONTROL_CHECKED;
+ flags |= wxCONTROL_CHECKED;
+#if wxCHECK_VERSION(2,9,0)
+ wxRendererNative::Get().DrawRadioButton(window, *dc, r, flags);
+#else
wxRenderer_DrawRadioButton(window, *dc, r, flags);
+#endif
}
else if(part == CheckboxPart) {
if (isChecked(o))
@@ -270,7 +280,12 @@ bool RenderThemeWx::paintTextField(RenderObject* o, const RenderObject::PaintInf
{
wxWindow* window = o->view()->frameView()->platformWidget();
wxDC* dc = static_cast<wxDC*>(i.context->platformContext());
+#if wxCHECK_VERSION(2,9,0)
+ wxRendererNative::Get().DrawTextCtrl(window, *dc, r, 0);
+#else
wxRenderer_DrawTextCtrl(window, *dc, r, 0);
+#endif
+
return false;
}
@@ -298,7 +313,11 @@ bool RenderThemeWx::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
if (isPressed(o))
flags |= wxCONTROL_PRESSED;
+#if wxCHECK_VERSION(2,9,0)
+ wxRendererNative::Get().DrawChoice(window, *dc, r, flags);
+#else
wxRenderer_DrawChoice(window, *dc, r, flags);
+#endif
return false;
}
diff --git a/WebCore/platform/wx/ScrollViewWx.cpp b/WebCore/platform/wx/ScrollViewWx.cpp
index 3822cba..254ac9f 100644
--- a/WebCore/platform/wx/ScrollViewWx.cpp
+++ b/WebCore/platform/wx/ScrollViewWx.cpp
@@ -306,6 +306,16 @@ void ScrollView::platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode
vertical = m_data->vScrollbarMode;
}
+void ScrollView::platformSetCanBlitOnScroll(bool canBlitOnScroll)
+{
+ m_canBlitOnScroll = canBlitOnScroll;
+}
+
+bool ScrollView::platformCanBlitOnScroll() const
+{
+ return m_canBlitOnScroll;
+}
+
// used for subframes support
void ScrollView::platformAddChild(Widget* widget)
{
diff --git a/WebCore/platform/wx/SharedTimerWx.cpp b/WebCore/platform/wx/SharedTimerWx.cpp
index 19747ce..d95457b 100644
--- a/WebCore/platform/wx/SharedTimerWx.cpp
+++ b/WebCore/platform/wx/SharedTimerWx.cpp
@@ -27,10 +27,10 @@
#include "SharedTimer.h"
#include "NotImplemented.h"
-#include "SystemTime.h"
#include "Widget.h"
#include <wtf/Assertions.h>
+#include <wtf/CurrentTime.h>
#include <stdio.h>
#include "wx/defs.h"
diff --git a/WebCore/platform/wx/SystemTimeWx.cpp b/WebCore/platform/wx/SystemTimeWx.cpp
deleted file mode 100644
index 41e6ad7..0000000
--- a/WebCore/platform/wx/SystemTimeWx.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2007 Robin Dunn. 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 "SystemTime.h"
-
-#include <wx/datetime.h>
-
-namespace WebCore {
-
-double currentTime()
-{
- wxDateTime now = wxDateTime::UNow();
- return (double)now.GetTicks() + (double)(now.GetMillisecond() / 1000.0);
-}
-
-}
diff --git a/WebCore/platform/wx/wxcode/gtk/non-kerned-drawing.cpp b/WebCore/platform/wx/wxcode/gtk/non-kerned-drawing.cpp
index b86a9bc..ed8fb09 100644
--- a/WebCore/platform/wx/wxcode/gtk/non-kerned-drawing.cpp
+++ b/WebCore/platform/wx/wxcode/gtk/non-kerned-drawing.cpp
@@ -28,6 +28,7 @@
#include "GraphicsContext.h"
#include "SimpleFontData.h"
+#include <wx/dcgraph.h>
#include <wx/defs.h>
#include <wx/dcclient.h>
#include <wx/gdicmn.h>