From e2ec6f257decf55699e7ceda4b01136e866d40c5 Mon Sep 17 00:00:00 2001 From: bdash Date: Sat, 16 Sep 2006 00:39:12 +0000 Subject: [PATCH] 2006-09-15 Krzysztof Kowalczyk 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 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 --- JavaScriptCore/ChangeLog | 10 +++ JavaScriptCore/JavaScriptCoreSources.bkl | 16 +++++ JavaScriptCore/jscore.bkl | 11 ++-- WebCore/ChangeLog | 73 +++++++++++++++++++++ WebCore/Projects/gdk/webcore-gdk.bkl | 1 + WebCore/WebCoreSources.bkl | 8 ++- WebCore/platform/gdk/FontCacheGdk.cpp | 2 +- WebCore/platform/gdk/FontDataGdk.cpp | 7 ++ WebCore/platform/gdk/FontGdk.cpp | 2 +- WebCore/platform/gdk/FrameGdk.cpp | 10 +-- WebCore/platform/gdk/FrameGdk.h | 10 +-- WebCore/platform/gdk/ImageGdk.cpp | 62 +++++++++++++++++ WebCore/platform/gdk/RenderPopupMenuGdk.cpp | 4 ++ WebCore/platform/gdk/RenderPopupMenuGdk.h | 1 + WebCore/platform/gdk/ScreenGdk.cpp | 34 ++++++++-- WebCore/platform/gdk/SystemTimeLinux.cpp | 10 +-- WebCore/platform/gdk/TemporaryLinkStubs.cpp | 72 ++++++++++++++------ WebCore/platform/gdk/WidgetGdk.cpp | 6 -- WebCore/webcore-base.bkl | 3 +- 19 files changed, 286 insertions(+), 56 deletions(-) create mode 100644 WebCore/platform/gdk/ImageGdk.cpp diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index d03dc57484e..c16ad0c71f3 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,13 @@ +2006-09-15 Krzysztof Kowalczyk + + 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 Windows build fix. diff --git a/JavaScriptCore/JavaScriptCoreSources.bkl b/JavaScriptCore/JavaScriptCoreSources.bkl index 09816ffc54b..1334f8ca81d 100644 --- a/JavaScriptCore/JavaScriptCoreSources.bkl +++ b/JavaScriptCore/JavaScriptCoreSources.bkl @@ -73,4 +73,20 @@ pcre/ucp_findchar.c + + + 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 + + + diff --git a/JavaScriptCore/jscore.bkl b/JavaScriptCore/jscore.bkl index 24da98219f1..de4dc29f9dd 100644 --- a/JavaScriptCore/jscore.bkl +++ b/JavaScriptCore/jscore.bkl @@ -48,6 +48,7 @@ JavaScriptCore Bakefile project file. $(SRCDIR) $(SRCDIR)/ForwardingHeaders + $(SRCDIR)/wtf $(SRCDIR)/kjs $(SRCDIR)/pcre $(SRCDIR)/bindings @@ -67,7 +68,7 @@ JavaScriptCore Bakefile project file. USE_CONSERVATIVE_GC=1 - KHTML_XSLT=1 + XSLT_SUPPORT=1 @@ -87,6 +88,7 @@ JavaScriptCore Bakefile project file. $(SRCDIR) + $(SRCDIR)/wtf $(SRCDIR)/pcre/dftables.c @@ -99,14 +101,15 @@ JavaScriptCore Bakefile project file. dftables DerivedSources - $(JSCORE_SOURCES_WTF) + $(JSCORE_SOURCES_WTF) $(JSCORE_SOURCES_PCRE) $(JSCORE_SOURCES_KJS) + $(JSCORE_SOURCES_BINDINGS) $(JSCORE_SOURCES_WIN) - - $(BUILDDIR) + + $(BUILDDIR) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index ef5992472b2..a2c47eb5470 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,76 @@ +2006-09-15 Krzysztof Kowalczyk + + 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 Reviewed by Eric. diff --git a/WebCore/Projects/gdk/webcore-gdk.bkl b/WebCore/Projects/gdk/webcore-gdk.bkl index 9b56a44d8c7..b7e5beae1bc 100644 --- a/WebCore/Projects/gdk/webcore-gdk.bkl +++ b/WebCore/Projects/gdk/webcore-gdk.bkl @@ -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 diff --git a/WebCore/WebCoreSources.bkl b/WebCore/WebCoreSources.bkl index e4c4d87791b..5c2fbd2366e 100644 --- a/WebCore/WebCoreSources.bkl +++ b/WebCore/WebCoreSources.bkl @@ -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 @@ -144,6 +145,7 @@ platform/ArrayImpl.cpp platform/AtomicString.cpp platform/Color.cpp + platform/CString.cpp platform/DeprecatedCString.cpp platform/DeprecatedPtrListImpl.cpp platform/DeprecatedString.cpp @@ -377,6 +379,7 @@ css/CSSBorderImageValue.cpp + css/CSSCharsetRule.cpp css/CSSComputedStyleDeclaration.cpp css/CSSFontFaceRule.cpp css/csshelper.cpp @@ -432,7 +435,7 @@ rendering/RenderButton.cpp rendering/RenderContainer.cpp rendering/RenderFieldset.cpp - rendering/RenderFileButton.cpp + rendering/RenderFileUploadControl.cpp rendering/RenderFlexibleBox.cpp rendering/RenderFlow.cpp rendering/RenderFormElement.cpp @@ -533,7 +536,7 @@ dom/NodeFilterCondition.cpp dom/NodeList.cpp dom/Notation.cpp - dom/OverflowEvent.cpp + dom/OverflowEvent.cpp dom/Position.cpp dom/ProcessingInstruction.cpp dom/QualifiedName.cpp @@ -551,6 +554,7 @@ icon/IconDatabase.cpp + icon/IconLoader.cpp icon/SQLDatabase.cpp icon/SQLStatement.cpp icon/SiteIcon.cpp diff --git a/WebCore/platform/gdk/FontCacheGdk.cpp b/WebCore/platform/gdk/FontCacheGdk.cpp index 66a438b01b3..84def197e39 100644 --- a/WebCore/platform/gdk/FontCacheGdk.cpp +++ b/WebCore/platform/gdk/FontCacheGdk.cpp @@ -32,7 +32,7 @@ #include "FontCache.h" #include "Font.h" -#include "FontPlatformData.h" +#include "FontData.h" namespace WebCore { diff --git a/WebCore/platform/gdk/FontDataGdk.cpp b/WebCore/platform/gdk/FontDataGdk.cpp index 7881ab605b7..6f72745174b 100644 --- a/WebCore/platform/gdk/FontDataGdk.cpp +++ b/WebCore/platform/gdk/FontDataGdk.cpp @@ -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(font_extents.ascent); m_descent = static_cast(font_extents.descent); m_lineSpacing = static_cast(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(text_extents.x_advance); +#endif assert(m_spaceWidth != 0); m_lineGap = m_lineSpacing - m_ascent - m_descent; } diff --git a/WebCore/platform/gdk/FontGdk.cpp b/WebCore/platform/gdk/FontGdk.cpp index 4a60fe338fa..085ff949fe4 100644 --- a/WebCore/platform/gdk/FontGdk.cpp +++ b/WebCore/platform/gdk/FontGdk.cpp @@ -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(); diff --git a/WebCore/platform/gdk/FrameGdk.cpp b/WebCore/platform/gdk/FrameGdk.cpp index 7323a1b6473..b648b164dcf 100644 --- a/WebCore/platform/gdk/FrameGdk.cpp +++ b/WebCore/platform/gdk/FrameGdk.cpp @@ -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); diff --git a/WebCore/platform/gdk/FrameGdk.h b/WebCore/platform/gdk/FrameGdk.h index 534a88f3066..6411a0b6f47 100644 --- a/WebCore/platform/gdk/FrameGdk.h +++ b/WebCore/platform/gdk/FrameGdk.h @@ -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); virtual void registerCommandForRedo(PassRefPtr); @@ -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 index 00000000000..5be3ed12916 --- /dev/null +++ b/WebCore/platform/gdk/ImageGdk.cpp @@ -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 +#else +#error "GDK port requires PLATFORM(CAIRO)" +#endif + +// This function loads resources from WebKit +Vector loadResourceIntoArray(const char*); + +namespace WebCore { + + void Image::initPlatformData() + { + } + + void Image::invalidatePlatformData() + { + } + + Image* Image::loadPlatformResource(const char *name) + { + Vector arr = loadResourceIntoArray(name); + Image* img = new Image; + img->setNativeData(&arr, true); + return img; + } + + bool Image::supportsType(const String& type) + { + // FIXME: Implement. + return false; + } + +} diff --git a/WebCore/platform/gdk/RenderPopupMenuGdk.cpp b/WebCore/platform/gdk/RenderPopupMenuGdk.cpp index 4502f772b36..a605e14310f 100644 --- a/WebCore/platform/gdk/RenderPopupMenuGdk.cpp +++ b/WebCore/platform/gdk/RenderPopupMenuGdk.cpp @@ -47,6 +47,10 @@ void RenderPopupMenuGdk::showPopup(const IntRect&, FrameView*, int) { } +void RenderPopupMenuGdk::hidePopup() +{ +} + void RenderPopupMenuGdk::addSeparator() { } diff --git a/WebCore/platform/gdk/RenderPopupMenuGdk.h b/WebCore/platform/gdk/RenderPopupMenuGdk.h index 8ef0304312c..c0b2048c2c5 100644 --- a/WebCore/platform/gdk/RenderPopupMenuGdk.h +++ b/WebCore/platform/gdk/RenderPopupMenuGdk.h @@ -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(); diff --git a/WebCore/platform/gdk/ScreenGdk.cpp b/WebCore/platform/gdk/ScreenGdk.cpp index 4461c46ad7b..4d7a552e1c1 100644 --- a/WebCore/platform/gdk/ScreenGdk.cpp +++ b/WebCore/platform/gdk/ScreenGdk.cpp @@ -28,32 +28,52 @@ #include "config.h" #include "Screen.h" -#include "FloatRect.h" +#include "Page.h" +#include "Frame.h" #include "Widget.h" +#include "FloatRect.h" + #include 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; + } } diff --git a/WebCore/platform/gdk/SystemTimeLinux.cpp b/WebCore/platform/gdk/SystemTimeLinux.cpp index cbdba91134f..e44aa2c4acf 100644 --- a/WebCore/platform/gdk/SystemTimeLinux.cpp +++ b/WebCore/platform/gdk/SystemTimeLinux.cpp @@ -28,15 +28,17 @@ #include "config.h" #include "SystemTime.h" -#include +#include 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 ); } } diff --git a/WebCore/platform/gdk/TemporaryLinkStubs.cpp b/WebCore/platform/gdk/TemporaryLinkStubs.cpp index 81a91c38e61..dce8f936634 100644 --- a/WebCore/platform/gdk/TemporaryLinkStubs.cpp +++ b/WebCore/platform/gdk/TemporaryLinkStubs.cpp @@ -31,10 +31,11 @@ #include #include +#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" @@ -61,9 +63,11 @@ #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) { 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) { } 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::newIconForFile(const String& filename) { notImplemented(); return PassRefPtr(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; } diff --git a/WebCore/platform/gdk/WidgetGdk.cpp b/WebCore/platform/gdk/WidgetGdk.cpp index 97b6844b59a..ae7c940bb10 100644 --- a/WebCore/platform/gdk/WidgetGdk.cpp +++ b/WebCore/platform/gdk/WidgetGdk.cpp @@ -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; - -} - } diff --git a/WebCore/webcore-base.bkl b/WebCore/webcore-base.bkl index c667bc37d1d..4a72c47c4e8 100644 --- a/WebCore/webcore-base.bkl +++ b/WebCore/webcore-base.bkl @@ -86,6 +86,7 @@ Base settings shared by all Bakefile-based ports. $(SRCDIR)/css $(SRCDIR)/dom $(SRCDIR)/loader + $(SRCDIR)/loader/icon $(SRCDIR)/page $(SRCDIR)/platform $(SRCDIR)/platform/image-decoders @@ -111,7 +112,7 @@ Base settings shared by all Bakefile-based ports. APPLE_CHANGES=1 - KHTML_XSLT=1 + XSLT_SUPPORT=1 -- GitLab