2006-09-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Sep 2006 00:39:12 +0000 (00:39 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Sep 2006 00:39:12 +0000 (00:39 +0000)
        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: https://svn.webkit.org/repository/webkit/trunk@16382 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCoreSources.bkl
JavaScriptCore/jscore.bkl
WebCore/ChangeLog
WebCore/Projects/gdk/webcore-gdk.bkl
WebCore/WebCoreSources.bkl
WebCore/platform/gdk/FontCacheGdk.cpp
WebCore/platform/gdk/FontDataGdk.cpp
WebCore/platform/gdk/FontGdk.cpp
WebCore/platform/gdk/FrameGdk.cpp
WebCore/platform/gdk/FrameGdk.h
WebCore/platform/gdk/ImageGdk.cpp [new file with mode: 0644]
WebCore/platform/gdk/RenderPopupMenuGdk.cpp
WebCore/platform/gdk/RenderPopupMenuGdk.h
WebCore/platform/gdk/ScreenGdk.cpp
WebCore/platform/gdk/SystemTimeLinux.cpp
WebCore/platform/gdk/TemporaryLinkStubs.cpp
WebCore/platform/gdk/WidgetGdk.cpp
WebCore/webcore-base.bkl

index d03dc57..c16ad0c 100644 (file)
@@ -1,3 +1,13 @@
+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>
 
         Windows build fix.
index 09816ff..1334f8c 100644 (file)
                pcre/ucp_findchar.c
 
        </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>
index 24da982..de4dc29 100644 (file)
@@ -48,6 +48,7 @@ JavaScriptCore Bakefile project file.
         
         <include>$(SRCDIR)</include>
         <include>$(SRCDIR)/ForwardingHeaders</include>
+        <include>$(SRCDIR)/wtf</include>
         <include>$(SRCDIR)/kjs</include>
         <include>$(SRCDIR)/pcre</include>
         <include>$(SRCDIR)/bindings</include>
@@ -67,7 +68,7 @@ JavaScriptCore Bakefile project file.
             <define>USE_CONSERVATIVE_GC=1</define>
         </if> 
 
-        <define>KHTML_XSLT=1</define>
+        <define>XSLT_SUPPORT=1</define>
 
         <if cond="FORMAT=='gnu'">
             <!-- FIXME: we need proper configure checks -->
@@ -87,6 +88,7 @@ JavaScriptCore Bakefile project file.
 
     <exe id="dftables">
         <dirname>$(SRCDIR)</dirname>
+        <include>$(SRCDIR)/wtf</include>
         <sources>$(SRCDIR)/pcre/dftables.c</sources>
     </exe>
 
@@ -99,14 +101,15 @@ JavaScriptCore Bakefile project file.
         <objects-depend>dftables</objects-depend>
         <pre-build-target>DerivedSources</pre-build-target>
         <sources>
-                       $(JSCORE_SOURCES_WTF)
+            $(JSCORE_SOURCES_WTF)
             $(JSCORE_SOURCES_PCRE)
             $(JSCORE_SOURCES_KJS)
+            $(JSCORE_SOURCES_BINDINGS)
         </sources>
         <if cond="PLATFORM_WIN32=='1'">
             $(JSCORE_SOURCES_WIN)
-               </if>
-               <install-to>$(BUILDDIR)</install-to>
+       </if>
+       <install-to>$(BUILDDIR)</install-to>
     </lib>
 
 </makefile>
index ef59924..a2c47eb 100644 (file)
@@ -1,3 +1,76 @@
+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>
 
         Reviewed by Eric.
index 9b56a44..b7e5bea 100644 (file)
@@ -72,6 +72,7 @@
           platform/gdk/FontPlatformDataGdk.cpp
           platform/gdk/FrameGdk.cpp
           platform/gdk/GlyphMapGdk.cpp
+           platform/gdk/ImageGdk.cpp
           platform/gdk/KeyEventGdk.cpp
           platform/gdk/MouseEventGdk.cpp
           platform/gdk/PageGdk.cpp
index e4c4d87..5c2fbd2 100644 (file)
@@ -85,6 +85,7 @@
                DerivedSources/WebCore/JSNotation.cpp
                DerivedSources/WebCore/JSProcessingInstruction.cpp
                DerivedSources/WebCore/JSRange.cpp
+               DerivedSources/WebCore/JSRangeException.cpp
                DerivedSources/WebCore/JSText.cpp
                DerivedSources/WebCore/JSTreeWalker.cpp
                DerivedSources/WebCore/JSOverflowEvent.cpp
                platform/ArrayImpl.cpp
                platform/AtomicString.cpp
                platform/Color.cpp
+               platform/CString.cpp
                platform/DeprecatedCString.cpp
                platform/DeprecatedPtrListImpl.cpp
                platform/DeprecatedString.cpp
        <set append="1" var="WEBCORE_SOURCES_CSS">
                
                css/CSSBorderImageValue.cpp
+               css/CSSCharsetRule.cpp
                css/CSSComputedStyleDeclaration.cpp
                css/CSSFontFaceRule.cpp
                css/csshelper.cpp
                rendering/RenderButton.cpp
                rendering/RenderContainer.cpp
                rendering/RenderFieldset.cpp
-               rendering/RenderFileButton.cpp
+               rendering/RenderFileUploadControl.cpp
                rendering/RenderFlexibleBox.cpp
                rendering/RenderFlow.cpp
                rendering/RenderFormElement.cpp
                dom/NodeFilterCondition.cpp
                dom/NodeList.cpp
                dom/Notation.cpp
-          dom/OverflowEvent.cpp
+               dom/OverflowEvent.cpp
                dom/Position.cpp
                dom/ProcessingInstruction.cpp
                dom/QualifiedName.cpp
 
        <set append="1" var="WEBCORE_SOURCES_ICON">
                icon/IconDatabase.cpp
+               icon/IconLoader.cpp
                icon/SQLDatabase.cpp
                icon/SQLStatement.cpp
                icon/SiteIcon.cpp
index 66a438b..84def19 100644 (file)
@@ -32,7 +32,7 @@
 #include "FontCache.h"
 
 #include "Font.h"
-#include "FontPlatformData.h"
+#include "FontData.h"
 
 namespace WebCore {
 
index 7881ab6..6f72745 100644 (file)
@@ -43,6 +43,8 @@
 
 namespace WebCore {
 
+#define USE_OLD_CAIRO 1
+
 void FontData::platformInit()
 {
     cairo_font_extents_t font_extents;
@@ -51,10 +53,15 @@ void FontData::platformInit()
     m_ascent = static_cast<int>(font_extents.ascent);
     m_descent = static_cast<int>(font_extents.descent);
     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);
     m_xHeight = text_extents.height;
     cairo_scaled_font_text_extents(m_font.m_scaledFont, " ", &text_extents);
     m_spaceWidth =  static_cast<int>(text_extents.x_advance);
+#endif
     assert(m_spaceWidth != 0);
     m_lineGap = m_lineSpacing - m_ascent - m_descent;
 }
index 4a60fe3..085ff94 100644 (file)
@@ -48,7 +48,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, co
     // Select the scaled font.
     font->setFont(context);
 
-    GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
+    GlyphBufferGlyph* glyphs = (GlyphBufferGlyph*) glyphBuffer.glyphs(from);
 
     float offset = point.x();
 
index 7323a1b..b648b16 100644 (file)
@@ -233,7 +233,7 @@ void FrameGdk::handleGdkEvent(GdkEvent* event)
             PlatformKeyboardEvent kevent(event);
             bool handled = false;
             if (!kevent.isKeyUp()) {
-                Node* start = selection().start().node();
+                Node* start = selectionController()->start().node();
                 if (start && start->isContentEditable()) {
                     switch(kevent.WindowsKeyCode()) {
                         case VK_BACK:
@@ -243,16 +243,16 @@ void FrameGdk::handleGdkEvent(GdkEvent* event)
                             TypingCommand::forwardDeleteKeyPressed(document());
                             break;
                         case VK_LEFT:
-                            selection().modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity);
+                            selectionController()->modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity);
                             break;
                         case VK_RIGHT:
-                            selection().modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity);
+                            selectionController()->modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity);
                             break;
                         case VK_UP:
-                            selection().modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity);
+                            selectionController()->modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity);
                             break;
                         case VK_DOWN:
-                            selection().modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
+                            selectionController()->modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
                             break;
                         default:
                             TypingCommand::insertText(document(), kevent.text(), false);
index 534a88f..6411a0b 100644 (file)
@@ -87,7 +87,7 @@ public:
     virtual String mimeTypeForFileName(const String&) const;
 
     virtual void markMisspellingsInAdjacentWords(const VisiblePosition&);
-    virtual void markMisspellings(const SelectionController&);
+    virtual void markMisspellings(const Selection&);
 
     virtual bool lastEventIsMouseUp() const;
 
@@ -99,6 +99,7 @@ public:
     virtual KJS::Bindings::Instance* getEmbedInstanceForWidget(Widget*);
     virtual KJS::Bindings::Instance* getObjectInstanceForWidget(Widget*);
     virtual KJS::Bindings::Instance* getAppletInstanceForWidget(Widget*);
+    virtual KJS::Bindings::RootObject* bindingRootObject();
 
     virtual void registerCommandForUndo(PassRefPtr<EditCommand>);
     virtual void registerCommandForRedo(PassRefPtr<EditCommand>);
@@ -110,9 +111,10 @@ public:
     virtual void issuePasteCommand();
     virtual void issuePasteAndMatchStyleCommand();
     virtual void issueTransposeCommand();
-    virtual void respondToChangedSelection(const SelectionController& oldSelection, bool closeTyping);
-    virtual void respondToChangedContents();
-    virtual bool shouldChangeSelection(const SelectionController& oldSelection, const SelectionController& newSelection, EAffinity affinity, bool stillSelecting) const;
+    virtual void respondToChangedSelection(const Selection& oldSelection, bool closeTyping);
+    virtual void respondToChangedContents(const Selection& endingSelection);
+    virtual bool shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity affinity, bool stillSelecting) const;
+    bool shouldChangeSelection(const Selection&) const;
     virtual void partClearedInBegin();
 
     virtual bool canGoBackOrForward(int distance) const;
diff --git a/WebCore/platform/gdk/ImageGdk.cpp b/WebCore/platform/gdk/ImageGdk.cpp
new file mode 100644 (file)
index 0000000..5be3ed1
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * 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;
+    }
+
+}
index 4502f77..a605e14 100644 (file)
@@ -47,6 +47,10 @@ void RenderPopupMenuGdk::showPopup(const IntRect&, FrameView*, int)
 {
 }
 
+void RenderPopupMenuGdk::hidePopup()
+{
+}
+
 void RenderPopupMenuGdk::addSeparator()
 {
 }
index 8ef0304..c0b2048 100644 (file)
@@ -39,6 +39,7 @@ public:
     virtual void clear();
     virtual void populate();
     virtual void showPopup(const IntRect&, FrameView*, int index);
+    virtual void hidePopup();
     
 protected:
     virtual void addSeparator();
index 4461c46..4d7a552 100644 (file)
 #include "config.h"
 #include "Screen.h"
 
-#include "FloatRect.h"
+#include "Page.h"
+#include "Frame.h"
 #include "Widget.h"
+#include "FloatRect.h"
+
 #include <gdk/gdk.h>
 
 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)
         return FloatRect();
     GdkScreen* screen = gdk_drawable_get_screen(drawable);
     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)
         return 32;
     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;
+
 }
 
 }
index cbdba91..e44aa2c 100644 (file)
 #include "config.h"
 #include "SystemTime.h"
 
-#include <time.h>
+#include <sys/time.h>
 
 namespace WebCore {
 
 double currentTime()
 {
-    time_t ttime;
-    time(&ttime);
-    return (double)ttime;
+  struct timeval aTimeval;
+  struct timezone aTimezone;
+  gettimeofday( &aTimeval, &aTimezone );
+  return (double)aTimeval.tv_sec + (double)(aTimeval.tv_usec / 1000000.0 );
 }
 
 }
index 81a91c3..dce8f93 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "CString.h"
 #include "Node.h"
 #include "TextField.h"
+#include "FileChooser.h"
 #include "Font.h"
-#include "FileButton.h"
 #include "PopUpButton.h"
 #include "IntPoint.h"
 #include "Widget.h"
@@ -44,6 +45,7 @@
 #include "loader.h"
 #include "FrameView.h"
 #include "KURL.h"
+#include "PlatformScrollBar.h"
 #include "ScrollBar.h"
 #include "JavaAppletWidget.h"
 #include "Path.h"
 #include "RenderThemeGdk.h"
 #include "TextBoundaries.h"
 #include "AXObjectCache.h"
-#include "DeprecatedString.h"
-#include "DeprecatedStringList.h"
-#include "SSLKeyGenerator.h"
+#include "RenderPopupMenuGdk.h"
+#include "EditCommand.h"
+#include "Icon.h"
+#include "IconLoader.h"
+#include "IconDatabase.h"
 
 using namespace WebCore;
 
@@ -114,16 +118,6 @@ void ListBox::setEnabled(bool) { notImplemented(); }
 void ListBox::clear() { notImplemented(); }
 bool ListBox::checksDescendantsForFocus() const { notImplemented(); return 0; }
 
-FileButton::FileButton(Frame*) { notImplemented(); }
-void FileButton::click(bool) { notImplemented(); }
-IntSize FileButton::sizeForCharacterWidth(int) const { notImplemented(); return IntSize(); }
-Widget::FocusPolicy FileButton::focusPolicy() const { notImplemented(); return NoFocus; }
-WebCore::IntRect FileButton::frameGeometry() const { notImplemented(); return IntRect(); }
-void FileButton::setFilename(DeprecatedString const&) { notImplemented(); }
-int FileButton::baselinePosition(int) const { notImplemented(); return 0; }
-void FileButton::setFrameGeometry(WebCore::IntRect const&) { notImplemented(); }
-void FileButton::setDisabled(bool) { notImplemented(); }
-
 Widget::FocusPolicy Slider::focusPolicy() const { notImplemented(); return NoFocus; }
 Widget::FocusPolicy ListBox::focusPolicy() const { notImplemented(); return NoFocus; }
 Widget::FocusPolicy TextField::focusPolicy() const { notImplemented(); return NoFocus; }
@@ -149,6 +143,7 @@ bool FrameGdk::locationbarVisible() { notImplemented(); return 0; }
 void FrameGdk::issueRedoCommand(void) { notImplemented(); }
 KJS::Bindings::Instance* FrameGdk::getObjectInstanceForWidget(Widget *) { notImplemented(); return 0; }
 KJS::Bindings::Instance* FrameGdk::getEmbedInstanceForWidget(Widget *) { notImplemented(); return 0; }
+KJS::Bindings::RootObject* FrameGdk::bindingRootObject() { notImplemented(); return 0; }
 bool FrameGdk::canRedo() const { notImplemented(); return 0; }
 bool FrameGdk::canUndo() const { notImplemented(); return 0; }
 void FrameGdk::registerCommandForRedo(PassRefPtr<WebCore::EditCommand>) { notImplemented(); }
@@ -164,7 +159,7 @@ void FrameGdk::issueUndoCommand() { notImplemented(); }
 String FrameGdk::mimeTypeForFileName(String const&) const { notImplemented(); return String(); }
 void FrameGdk::issuePasteCommand() { notImplemented(); }
 void FrameGdk::scheduleClose() { notImplemented(); }
-void FrameGdk::markMisspellings(WebCore::SelectionController const&) { notImplemented(); }
+void FrameGdk::markMisspellings(WebCore::Selection const&) { notImplemented(); }
 bool FrameGdk::menubarVisible() { notImplemented(); return 0; }
 bool FrameGdk::personalbarVisible() { notImplemented(); return 0; }
 bool FrameGdk::statusbarVisible() { notImplemented(); return 0; }
@@ -184,8 +179,8 @@ void BrowserExtensionGdk::goBackOrForward(int) { notImplemented(); }
 KURL BrowserExtensionGdk::historyURL(int distance) { notImplemented(); return KURL(); }
 void BrowserExtensionGdk::createNewWindow(struct WebCore::ResourceRequest const&) { 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; }
 
 /********************************************************/
 /* Completely empty stubs (mostly to allow DRT to run): */
@@ -199,6 +194,9 @@ bool WebCore::historyContains(DeprecatedString const&) { return false; }
 String WebCore::submitButtonDefaultLabel() { return "Submit"; }
 String WebCore::inputElementAltText() { return DeprecatedString(); }
 String WebCore::resetButtonDefaultLabel() { return "Reset"; }
+String WebCore::fileButtonChooseFileLabel() { return "Browse..."; }
+String WebCore::fileButtonNoFileSelectedLabel() { return String(); }
+
 String WebCore::defaultLanguage() { return "en"; }
 
 void WebCore::findWordBoundary(UChar const* str, int len, int position, int* start, int* end) {*start = position; *end = position; }
@@ -219,8 +217,9 @@ void FrameGdk::handledOnloadEvents() { }
 Range* FrameGdk::markedTextRange() const { return 0; }
 bool FrameGdk::lastEventIsMouseUp() const { return false; }
 void FrameGdk::addMessageToConsole(String const&, unsigned int, String const&) { }
-bool FrameGdk::shouldChangeSelection(SelectionController const&, SelectionController const&, WebCore::EAffinity, bool) const { return true; }
-void FrameGdk::respondToChangedSelection(WebCore::SelectionController const&, bool) { }
+bool FrameGdk::shouldChangeSelection(const Selection&, const Selection&, WebCore::EAffinity, bool) const { return true; }
+bool FrameGdk::shouldChangeSelection(const Selection&) const { return true; }
+void FrameGdk::respondToChangedSelection(WebCore::Selection const&, bool) { }
 Frame* FrameGdk::createFrame(const KURL& url, const String& name, Element* ownerElement, const String& referrer) { return 0; }
 
 void FrameGdk::saveDocumentState() { }
@@ -228,7 +227,7 @@ void FrameGdk::registerCommandForUndo(PassRefPtr<WebCore::EditCommand>) { }
 void FrameGdk::clearUndoRedoOperations(void) { }
 String FrameGdk::incomingReferrer() const { return String(); }
 void FrameGdk::markMisspellingsInAdjacentWords(WebCore::VisiblePosition const&) { }
-void FrameGdk::respondToChangedContents() { }
+void FrameGdk::respondToChangedContents(const Selection&) { }
 
 BrowserExtensionGdk::BrowserExtensionGdk(WebCore::Frame*) { }
 void BrowserExtensionGdk::setTypedIconURL(KURL const&, const String&) { }
@@ -276,7 +275,7 @@ void GraphicsContext::scale(const FloatSize&) { }
 Path::Path(){ }
 Path::~Path(){ }
 Path::Path(const Path&){ }
-bool Path::contains(const FloatPoint&) const{ return false; }
+bool Path::contains(const FloatPoint&, WindRule rule) const{ return false; }
 void Path::translate(const FloatSize&){ }
 FloatRect Path::boundingRect() const { return FloatRect(); }
 Path& Path::operator=(const Path&){ return * this; }
@@ -322,6 +321,17 @@ IntSize PopUpButton::sizeHint() const { return IntSize(); }
 IntRect PopUpButton::frameGeometry() const { return IntRect(); }
 void PopUpButton::setFrameGeometry(IntRect const&) { }
 
+PlatformScrollBar::PlatformScrollBar(ScrollBarClient* client, ScrollBarOrientation orientation) : ScrollBar(client, orientation) { }
+PlatformScrollBar::~PlatformScrollBar() { }
+int PlatformScrollBar::width() const { return 0; }
+int PlatformScrollBar::height() const { return 0; }
+void PlatformScrollBar::setEnabled(bool) { }
+void PlatformScrollBar::paint(GraphicsContext*, const IntRect& damageRect) { }
+void PlatformScrollBar::setScrollBarValue(int v) { }
+void PlatformScrollBar::setKnobProportion(int visibleSize, int totalSize) { }
+void PlatformScrollBar::setRect(const IntRect&) { }
+
+ScrollBar::ScrollBar(ScrollBarClient*, ScrollBarOrientation) { }
 void ScrollBar::setSteps(int, int) { }
 bool ScrollBar::scroll(ScrollDirection, ScrollGranularity, float) { return 0; }
 bool ScrollBar::setValue(int) { return 0; }
@@ -332,6 +342,13 @@ ListBox::~ListBox() { }
 void ListBox::setSelectionMode(ListBox::SelectionMode) { }
 void ListBox::setFont(WebCore::Font const&) { }
 
+FileChooser::FileChooser(Document*, RenderFileUploadControl*) { notImplemented(); }
+FileChooser::~FileChooser() { notImplemented(); }
+void FileChooser::openFileChooser() { notImplemented(); }
+String FileChooser::basenameForWidth(int width) const { notImplemented(); return String(); }
+void FileChooser::uploadControlDetaching() { notImplemented(); }
+void FileChooser::chooseFile(const String& filename) { notImplemented(); }
+
 Color WebCore::focusRingColor() { return 0xFF0000FF; }
 void WebCore::setFocusRingColorChangeFunction(void (*)()) { }
 
@@ -345,6 +362,19 @@ void RenderThemeGdk::setRadioSize(RenderStyle*) const { }
 void RenderThemeGdk::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element* e) const {}
 bool RenderThemeGdk::paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&) { return false; }
 
+Icon::Icon() { notImplemented(); }
+Icon::~Icon() { notImplemented(); }
+PassRefPtr<Icon> Icon::newIconForFile(const String& filename) { notImplemented(); return PassRefPtr<Icon>(new Icon()); }
+void Icon::paint(GraphicsContext*, const IntRect&) { notImplemented(); }
+
+void IconLoader::stopLoading() { notImplemented(); } 
+void IconLoader::startLoading() { notImplemented(); } 
+IconLoader* IconLoader::createForFrame(Frame *frame) { return 0; } 
+
+bool IconDatabase::isIconExpiredForIconURL(const String& url) { return false; }
+bool IconDatabase::hasEntryForIconURL(const String& url) { return false; }
+IconDatabase* IconDatabase::sharedIconDatabase() { return 0; }
+
 FloatRect Font::selectionRectForComplexText(const TextRun&, const TextStyle&, const IntPoint&, int) const { return FloatRect(); }
 void Font::drawComplexText(GraphicsContext*, const TextRun&, const TextStyle&, const FloatPoint&) const { notImplemented(); }
 float Font::floatWidthForComplexText(const TextRun&, const TextStyle&) const { notImplemented(); return 0; }
index 97b6844..ae7c940 100644 (file)
@@ -169,10 +169,4 @@ IntPoint Widget::mapFromGlobal(const IntPoint& p) const
     return IntPoint(p.x() - x, p.y() - y);
 }
 
-float Widget::scaleFactor() const
-{
-    return 1.0f;
-
-}
-
 }
index c667bc3..4a72c47 100644 (file)
@@ -86,6 +86,7 @@ Base settings shared by all Bakefile-based ports.
         <include>$(SRCDIR)/css</include>
         <include>$(SRCDIR)/dom</include>
         <include>$(SRCDIR)/loader</include>
+        <include>$(SRCDIR)/loader/icon</include>
         <include>$(SRCDIR)/page</include>
         <include>$(SRCDIR)/platform</include>
         <include>$(SRCDIR)/platform/image-decoders</include>
@@ -111,7 +112,7 @@ Base settings shared by all Bakefile-based ports.
 <!-- END HACKS -->
 
         <define>APPLE_CHANGES=1</define>
-        <define>KHTML_XSLT=1</define>
+        <define>XSLT_SUPPORT=1</define>
 
         <!-- TODO: is there a Linux-specific platform define? -->
         <if cond="PLATFORM_UNIX=='1'">