diff options
Diffstat (limited to 'WebKit/wx')
-rw-r--r-- | WebKit/wx/ChangeLog | 122 | ||||
-rw-r--r-- | WebKit/wx/WebBrowserShell.h | 1 | ||||
-rw-r--r-- | WebKit/wx/WebFrame.cpp | 19 | ||||
-rw-r--r-- | WebKit/wx/WebFrame.h | 21 | ||||
-rw-r--r-- | WebKit/wx/WebKitDefines.h | 45 | ||||
-rw-r--r-- | WebKit/wx/WebKitSupport/EditorClientWx.cpp | 1 | ||||
-rw-r--r-- | WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp | 4 | ||||
-rw-r--r-- | WebKit/wx/WebSettings.cpp | 194 | ||||
-rw-r--r-- | WebKit/wx/WebSettings.h | 166 | ||||
-rw-r--r-- | WebKit/wx/WebView.cpp | 28 | ||||
-rw-r--r-- | WebKit/wx/WebView.h | 20 | ||||
-rw-r--r-- | WebKit/wx/bindings/python/webview.i | 12 | ||||
-rw-r--r-- | WebKit/wx/bindings/python/wxwebkit-py.bkl | 109 | ||||
-rw-r--r-- | WebKit/wx/dependencies.bkl | 177 | ||||
-rw-r--r-- | WebKit/wx/presets/wxwebkit.bkl | 164 | ||||
-rw-r--r-- | WebKit/wx/wxwebkit.bkl | 83 | ||||
-rw-r--r-- | WebKit/wx/wxwk-settings.bkl | 109 |
17 files changed, 590 insertions, 685 deletions
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog index e6ed389..1c7adf2 100644 --- a/WebKit/wx/ChangeLog +++ b/WebKit/wx/ChangeLog @@ -1,3 +1,125 @@ +2010-01-27 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + Add a way to get the parse mode to wxWebKit API. + + https://bugs.webkit.org/show_bug.cgi?id=34341 + + * WebFrame.cpp: + (wxWebFrame::GetParseMode): + * WebFrame.h: + * WebView.cpp: + (wxWebView::GetParseMode): + * WebView.h: + +2010-01-22 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + [wx] Remove the Bakefile build system, which is no longer being used. + + https://bugs.webkit.org/show_bug.cgi?id=34022 + + * bindings/python/wxwebkit-py.bkl: Removed. + * dependencies.bkl: Removed. + * presets/wxwebkit.bkl: Removed. + * wxwebkit.bkl: Removed. + * wxwk-settings.bkl: Removed. + +2010-01-22 Kevin Ollivier <kevino@theolliviers.com> + + Build fix after r53718. + + * WebView.cpp: + (wxWebView::OnKeyEvents): + +2010-01-15 Kevin Ollivier <kevino@theolliviers.com> + + Reviewed by Alexey Proskuryakov. + + Move the code adding the child frame to the FrameTree into wxWebFrame constructor + so that it happens before we call init() on the new frame. Fixes asserts checking + frame count consistency. + + * WebFrame.cpp: + (wxWebFrame::wxWebFrame): + * WebKitSupport/FrameLoaderClientWx.cpp: + (WebCore::FrameLoaderClientWx::createFrame): + +2010-01-14 Kevin Ollivier <kevino@theolliviers.com> + + [wx] Build fix, missing header. + + * WebView.cpp: + +2010-01-09 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + ScriptController::isEnabled needs to be renamed + https://bugs.webkit.org/show_bug.cgi?id=32063 + + Rename ScriptController::isEnabled to + ScriptController::canExecuteScripts. + + * WebFrame.cpp: + (wxWebFrame::RunScript): + +2009-12-30 Kevin Watters <kevinwatters@gmail.com> + + Reviewed by Kevin Ollivier. + + Introduce wxWebSettings API interface for editing wxWebView / page settings. + + https://bugs.webkit.org/show_bug.cgi?id=32956 + + * WebBrowserShell.h: + * WebFrame.h: + * WebKitDefines.h: Added. + * WebSettings.cpp: Added. + (wxWebSettings::SetDefaultFixedFontSize): + (wxWebSettings::GetDefaultFixedFontSize): + (wxWebSettings::SetDefaultFontSize): + (wxWebSettings::GetDefaultFontSize): + (wxWebSettings::SetMinimumFontSize): + (wxWebSettings::GetMinimumFontSize): + (wxWebSettings::SetLoadsImagesAutomatically): + (wxWebSettings::LoadsImagesAutomatically): + (wxWebSettings::SetJavaScriptEnabled): + (wxWebSettings::IsJavaScriptEnabled): + (wxWebSettings::SetDatabasesEnabled): + (wxWebSettings::AreDatabasesEnabled): + (wxWebSettings::SetLocalStoragePath): + (wxWebSettings::GetLocalStoragePath): + (wxWebSettings::SetEditableLinkBehavior): + (wxWebSettings::GetEditableLinkBehavior): + (wxWebSettings::SetPluginsEnabled): + (wxWebSettings::ArePluginsEnabled): + * WebSettings.h: Added. + * WebView.cpp: + (wxWebView::Create): + (wxWebView::GetWebSettings): + * WebView.h: + * bindings/python/webview.i: + +2009-12-28 Patrick Gansterer <paroga@paroga.com> + + Reviewed by Maciej Stachowiak. + + Use JS_NO_EXPORT for JSBase.h. + + * wxwk-settings.bkl: + +2009-12-20 Kevin Ollivier <kevino@theolliviers.com> + + [wx] build fixes after recent changes. + + * WebFrame.cpp: Added missing header. + * WebKitSupport/EditorClientWx.cpp: Added missing header. + * WebView.cpp: Updated Page constructor call. + (wxWebView::Create): + 2009-12-08 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. diff --git a/WebKit/wx/WebBrowserShell.h b/WebKit/wx/WebBrowserShell.h index edda9e4..2f43ffb 100644 --- a/WebKit/wx/WebBrowserShell.h +++ b/WebKit/wx/WebBrowserShell.h @@ -33,6 +33,7 @@ #include "wx/wx.h" #endif +#include "WebKitDefines.h" #include "WebView.h" #include <wx/srchctrl.h> diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp index bd983f6..6cda197 100644 --- a/WebKit/wx/WebFrame.cpp +++ b/WebKit/wx/WebFrame.cpp @@ -24,6 +24,7 @@ */ #include "config.h" +#include "BackForwardList.h" #include "CString.h" #include "Document.h" #include "Editor.h" @@ -33,6 +34,7 @@ #include "FrameLoader.h" #include "FrameView.h" #include "HitTestResult.h" +#include "HostWindow.h" #include "HTMLFrameOwnerElement.h" #include "markup.h" #include "Page.h" @@ -90,6 +92,13 @@ wxWebFrame::wxWebFrame(wxWebView* container, wxWebFrame* parent, WebViewFrameDat m_impl->frame = newFrame.get(); + if (data) + newFrame->tree()->setName(data->name); + + // Subframes expect to be added to the FrameTree before init is called. + if (parentFrame) + parentFrame->document()->frame()->tree()->appendChild(newFrame.get()); + loaderClient->setFrame(this); loaderClient->setWebView(container); @@ -192,7 +201,7 @@ wxString wxWebFrame::RunScript(const wxString& javascript) wxASSERT_MSG(hasLoaded, wxT("Document must be loaded before calling RunScript.")); if (hasLoaded) { WebCore::ScriptController* controller = m_impl->frame->script(); - bool jsEnabled = controller->isEnabled(); + bool jsEnabled = controller->canExecuteScripts(); wxASSERT_MSG(jsEnabled, wxT("RunScript requires JavaScript to be enabled.")); if (jsEnabled) { JSC::JSValue result = controller->executeScript(javascript, true).jsValue(); @@ -409,3 +418,11 @@ bool wxWebFrame::ShouldClose() const return true; } + +wxWebKitParseMode wxWebFrame::GetParseMode() const +{ + if (m_impl->frame && m_impl->frame->document()) + return (wxWebKitParseMode)m_impl->frame->document()->parseMode(); + + return NoDocument; +} diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h index bd4bdb0..95a0691 100644 --- a/WebKit/wx/WebFrame.h +++ b/WebKit/wx/WebFrame.h @@ -33,6 +33,8 @@ #include "wx/wx.h" #endif +#include "WebKitDefines.h" + class WebFramePrivate; class WebViewFrameData; class wxWebView; @@ -44,20 +46,6 @@ namespace WebCore { class Frame; } -#ifndef SWIG - -#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0) -#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) -#elif WXMAKINGDLL_WEBKIT -#define WXDLLIMPEXP_WEBKIT WXEXPORT -#elif defined(WXUSINGDLL_WEBKIT) -#define WXDLLIMPEXP_WEBKIT WXIMPORT -#endif - -#else -#define WXDLLIMPEXP_WEBKIT -#endif // SWIG - class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo { public: @@ -89,6 +77,9 @@ private: wxString m_link; }; +// based on enums in WebCore/dom/Document.h +enum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument }; + class WXDLLIMPEXP_WEBKIT wxWebFrame { // ChromeClientWx needs to get the Page* stored by the wxWebView @@ -153,6 +144,8 @@ public: bool ShouldClose() const; + wxWebKitParseMode GetParseMode() const; + private: float m_textMagnifier; bool m_isEditable; diff --git a/WebKit/wx/WebKitDefines.h b/WebKit/wx/WebKitDefines.h new file mode 100644 index 0000000..d973063 --- /dev/null +++ b/WebKit/wx/WebKitDefines.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com> + * + * 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. + */ + +#ifndef WebKitDefines_h +#define WebKitDefines_h + +#ifndef SWIG + +#if !wxCHECK_VERSION(2, 9, 0) && wxCHECK_GCC_VERSION(4, 0) +#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) +#elif defined(WXMAKINGDLL_WEBKIT) +#define WXDLLIMPEXP_WEBKIT WXEXPORT +#elif defined(WXUSINGDLL_WEBKIT) +#define WXDLLIMPEXP_WEBKIT WXIMPORT +#endif + +#else +#define WXDLLIMPEXP_WEBKIT +#endif // SWIG + +#endif // WebKitDefines_h diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp index bd3af48..b130557 100644 --- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp +++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp @@ -32,6 +32,7 @@ #include "FocusController.h" #include "Frame.h" #include "FrameView.h" +#include "HostWindow.h" #include "KeyboardEvent.h" #include "KeyboardCodes.h" #include "NotImplemented.h" diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp index fbb4ec3..5bb4dc1 100644 --- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp +++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp @@ -828,10 +828,6 @@ PassRefPtr<Frame> FrameLoaderClientWx::createFrame(const KURL& url, const String RefPtr<Frame> childFrame = adoptRef(newFrame->m_impl->frame); - m_frame->tree()->appendChild(childFrame); - childFrame->tree()->setName(name); - childFrame->init(); - // The creation of the frame may have run arbitrary JavaScript that removed it from the page already. if (!childFrame->page()) return 0; diff --git a/WebKit/wx/WebSettings.cpp b/WebKit/wx/WebSettings.cpp new file mode 100644 index 0000000..2aa246c --- /dev/null +++ b/WebKit/wx/WebSettings.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2009 Kevin Ollivier. 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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 "WebSettings.h" + +#include "PlatformString.h" +#include "Settings.h" + +void wxWebSettings::SetDefaultFixedFontSize(int size) +{ + if (m_settings) + m_settings->setDefaultFixedFontSize(size); +} + +int wxWebSettings::GetDefaultFixedFontSize() const +{ + if (m_settings) + return m_settings->defaultFixedFontSize(); + + return 0; +} + +void wxWebSettings::SetDefaultFontSize(int size) +{ + if (m_settings) + m_settings->setDefaultFontSize(size); +} + +int wxWebSettings::GetDefaultFontSize() const +{ + if (m_settings) + return m_settings->defaultFontSize(); + + return 0; +} + +void wxWebSettings::SetMinimumFontSize(int size) +{ + if (m_settings) + m_settings->setMinimumFontSize(size); +} + +int wxWebSettings::GetMinimumFontSize() const +{ + if (m_settings) + return m_settings->minimumFontSize(); + + return 0; +} + +void wxWebSettings::SetLoadsImagesAutomatically(bool loadAutomatically) +{ + if (m_settings) + m_settings->setLoadsImagesAutomatically(loadAutomatically); +} + +bool wxWebSettings::LoadsImagesAutomatically() const +{ + if (m_settings) + return m_settings->loadsImagesAutomatically(); + + return false; +} + +void wxWebSettings::SetJavaScriptEnabled(bool enabled) +{ + if (m_settings) + m_settings->setJavaScriptEnabled(enabled); +} + +bool wxWebSettings::IsJavaScriptEnabled() const +{ + if (m_settings) + return m_settings->isJavaScriptEnabled(); + + return false; +} + +void wxWebSettings::SetDatabasesEnabled(bool enabled) +{ + if (m_settings) + m_settings->setDatabasesEnabled(enabled); +} + +bool wxWebSettings::AreDatabasesEnabled() const +{ + if (m_settings) + return m_settings->databasesEnabled(); + + return false; +} + +void wxWebSettings::SetLocalStoragePath(const wxString& path) +{ + if (m_settings) + m_settings->setLocalStorageDatabasePath(path); +} + +wxString wxWebSettings::GetLocalStoragePath() const +{ + if (m_settings) + return m_settings->localStorageDatabasePath(); + + return wxEmptyString; +} + +void wxWebSettings::SetEditableLinkBehavior(wxEditableLinkBehavior behavior) +{ + WebCore::EditableLinkBehavior webCoreBehavior; + if (m_settings) { + switch (behavior) { + case wxEditableLinkAlwaysLive: + webCoreBehavior = WebCore::EditableLinkAlwaysLive; + break; + case wxEditableLinkOnlyLiveWithShiftKey: + webCoreBehavior = WebCore::EditableLinkOnlyLiveWithShiftKey; + break; + case wxEditableLinkLiveWhenNotFocused: + webCoreBehavior = WebCore::EditableLinkLiveWhenNotFocused; + break; + case wxEditableLinkNeverLive: + webCoreBehavior = WebCore::EditableLinkNeverLive; + break; + default: + webCoreBehavior = WebCore::EditableLinkDefaultBehavior; + } + m_settings->setEditableLinkBehavior(webCoreBehavior); + } +} + +wxEditableLinkBehavior wxWebSettings::GetEditableLinkBehavior() const +{ + wxEditableLinkBehavior behavior = wxEditableLinkDefaultBehavior; + if (m_settings) { + WebCore::EditableLinkBehavior webCoreBehavior = m_settings->editableLinkBehavior(); + switch (webCoreBehavior) { + case WebCore::EditableLinkAlwaysLive: + behavior = wxEditableLinkAlwaysLive; + break; + case WebCore::EditableLinkOnlyLiveWithShiftKey: + behavior = wxEditableLinkOnlyLiveWithShiftKey; + break; + case WebCore::EditableLinkLiveWhenNotFocused: + behavior = wxEditableLinkLiveWhenNotFocused; + break; + case WebCore::EditableLinkNeverLive: + behavior = wxEditableLinkNeverLive; + break; + default: + behavior = wxEditableLinkDefaultBehavior; + } + } + return behavior; +} + +void wxWebSettings::SetPluginsEnabled(bool enabled) +{ + if (m_settings) + m_settings->setPluginsEnabled(enabled); +} + +bool wxWebSettings::ArePluginsEnabled() const +{ + if (m_settings) + return m_settings->arePluginsEnabled(); + + return false; +} diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h new file mode 100644 index 0000000..e526b70 --- /dev/null +++ b/WebKit/wx/WebSettings.h @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2009 Kevin Ollivier. 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. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. + */ + +#ifndef WebSettings_h +#define WebSettings_h + +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "WebKitDefines.h" + +namespace WebCore { +class Settings; +} + +enum wxEditableLinkBehavior { + wxEditableLinkDefaultBehavior, + wxEditableLinkAlwaysLive, + wxEditableLinkOnlyLiveWithShiftKey, + wxEditableLinkLiveWhenNotFocused, + wxEditableLinkNeverLive +}; + +/** + @class wxWebSettings + + This class is used to control the configurable aspects of the WebKit engine. + + Do not instantiate this object directly. Instead, create a wxWebView and + call its wxWebView::GetWebSettings() method to get and change that WebView's settings. + +*/ + +class WXDLLIMPEXP_WEBKIT wxWebSettings: public wxObject { +public: + wxWebSettings(WebCore::Settings* settings) : + wxObject(), + m_settings(settings) + {} + + wxWebSettings() : wxObject() {} + + /** + Sets the default font size for fixed fonts. + */ + void SetDefaultFixedFontSize(int size); + + /** + Returns the default font size for fixed fonts. + */ + int GetDefaultFixedFontSize() const; + + /** + Sets the default font size for fonts. + */ + void SetDefaultFontSize(int size); + + /** + Returns the default font size for fonts. + */ + int GetDefaultFontSize() const; + + /** + Sets the minimum acceptable font size. + */ + void SetMinimumFontSize(int size); + + /** + Returns the minimum acceptable font size. + */ + int GetMinimumFontSize() const; + + /** + Sets whether or not images are loaded automatically. (e.g. in email + programs you may wish to not load images until you confirm it is not SPAM) + */ + void SetLoadsImagesAutomatically(bool loadAutomatically); + + /** + Returns whether or not images are loaded automatically. + */ + bool LoadsImagesAutomatically() const; + + /** + Sets whether or not the WebView runs JavaScript code. + */ + void SetJavaScriptEnabled(bool enabled); + + /** + Returns whether or not the WebView runs JavaScript code. + */ + bool IsJavaScriptEnabled() const; + + /** + Sets whether or not web pages can create databases. + */ + void SetDatabasesEnabled(bool enabled); + + /** + Returns whether or not the WebView runs JavaScript code. + */ + bool AreDatabasesEnabled() const; + + /** + Sets the path where local data will be stored. + */ + void SetLocalStoragePath(const wxString& path); + + /** + Returns the path where local data will be stored. + */ + wxString GetLocalStoragePath() const; + + /** + Sets how links are handled when the wxWebView is in editing mode. + */ + void SetEditableLinkBehavior(wxEditableLinkBehavior behavior); + + /** + Returns how links are handled when the wxWebView is in editing mode. + */ + wxEditableLinkBehavior GetEditableLinkBehavior() const; + + /** + Sets whether or not web pages can load plugins. + */ + void SetPluginsEnabled(bool enabled); + + /** + Returns whether or not web pages can load plugins. + */ + bool ArePluginsEnabled() const; + +private: + WebCore::Settings* m_settings; + +}; + +#endif // WebSettings_h diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp index 2c752de..5fdae83 100644 --- a/WebKit/wx/WebView.cpp +++ b/WebKit/wx/WebView.cpp @@ -34,6 +34,7 @@ #include "Editor.h" #include "EmptyClients.h" #include "EventHandler.h" +#include "FileChooser.h" #include "FocusController.h" #include "Frame.h" #include "FrameLoader.h" @@ -317,7 +318,7 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, WebCore::HTMLFrameOwnerElement* parentFrame = 0; WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx(); - m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), new WebCore::EmptyPluginHalterClient()); + m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this), new WebCore::ContextMenuClientWx(), editorClient, new WebCore::DragClientWx(), new WebCore::InspectorClientWx(), 0, 0); editorClient->setPage(m_impl->page); m_mainFrame = new wxWebFrame(this); @@ -338,10 +339,6 @@ bool wxWebView::Create(wxWindow* parent, int id, const wxPoint& position, settings->setDatabasesEnabled(true); #endif -#if __WXMSW__ || __WXMAC__ - settings->setPluginsEnabled(true); -#endif - m_isInitialized = true; return true; @@ -824,11 +821,11 @@ void wxWebView::OnKeyEvents(wxKeyEvent& event) return; case WXK_PAGEUP: case WXK_NUMPAD_PAGEUP: - frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() + WebCore::cAmountToKeepWhenPaging)); + frame->view()->scrollBy(WebCore::IntSize(0, -frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging)); return; case WXK_PAGEDOWN: case WXK_NUMPAD_PAGEDOWN: - frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() - WebCore::cAmountToKeepWhenPaging)); + frame->view()->scrollBy(WebCore::IntSize(0, frame->view()->visibleHeight() * WebCore::cFractionToStepWhenPaging)); return; //These we don't want turning into char events, stuff 'em case WXK_ESCAPE: @@ -966,3 +963,20 @@ void wxWebView::SetProxyInfo(const wxString& host, if (ResourceHandleManager* mgr = ResourceHandleManager::sharedInstance()) mgr->setProxyInfo(host, port, curlProxyType(type), username, password); } + +wxWebSettings wxWebView::GetWebSettings() +{ + ASSERT(m_impl->page); + if (m_impl->page) + return wxWebSettings(m_impl->page->settings()); + + return wxWebSettings(); +} + +wxWebKitParseMode wxWebView::GetParseMode() const +{ + if (m_mainFrame) + return m_mainFrame->GetParseMode(); + + return NoDocument; +}
\ No newline at end of file diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h index 9b1cfab..7d923a3 100644 --- a/WebKit/wx/WebView.h +++ b/WebKit/wx/WebView.h @@ -34,6 +34,8 @@ #endif #include "WebFrame.h" +#include "WebKitDefines.h" +#include "WebSettings.h" class WebViewPrivate; class WebViewFrameData; @@ -48,20 +50,6 @@ namespace WebCore { } #ifndef SWIG - -#if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0) -#define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default"))) -#elif WXMAKINGDLL_WEBKIT -#define WXDLLIMPEXP_WEBKIT WXEXPORT -#elif defined(WXUSINGDLL_WEBKIT) -#define WXDLLIMPEXP_WEBKIT WXIMPORT -#endif - -#else -#define WXDLLIMPEXP_WEBKIT -#endif // SWIG - -#ifndef SWIG extern WXDLLIMPEXP_WEBKIT const wxChar* wxWebViewNameStr; #endif @@ -214,6 +202,10 @@ public: const wxString& username = wxEmptyString, const wxString& password = wxEmptyString); + wxWebSettings GetWebSettings(); + + wxWebKitParseMode GetParseMode() const; + protected: // event handlers (these functions should _not_ be virtual) diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i index 410191a..bdc5561 100644 --- a/WebKit/wx/bindings/python/webview.i +++ b/WebKit/wx/bindings/python/webview.i @@ -28,9 +28,12 @@ %{ #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" + +#include "WebBrowserShell.h" #include "WebFrame.h" +#include "WebKitDefines.h" +#include "WebSettings.h" #include "WebView.h" -#include "WebBrowserShell.h" %} //--------------------------------------------------------------------------- @@ -39,13 +42,16 @@ MAKE_CONST_WXSTRING(WebViewNameStr); +MustHaveApp(wxWebBrowserShell); MustHaveApp(wxWebFrame); MustHaveApp(wxWebView); -MustHaveApp(wxWebBrowserShell); +%include WebKitDefines.h + +%include WebBrowserShell.h %include WebFrame.h +%include WebSettings.h %include WebView.h -%include WebBrowserShell.h %constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD; %constant wxEventType wxEVT_WEBVIEW_LOAD; diff --git a/WebKit/wx/bindings/python/wxwebkit-py.bkl b/WebKit/wx/bindings/python/wxwebkit-py.bkl index 2fade58..e69de29 100644 --- a/WebKit/wx/bindings/python/wxwebkit-py.bkl +++ b/WebKit/wx/bindings/python/wxwebkit-py.bkl @@ -1,109 +0,0 @@ -<?xml version="1.0" ?> -<!-- -Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> - -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. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. - -Bakefile for wxWebKit Python bindings. ---> - -<makefile> - <set var="WX_UNICODE">1</set> - <set var="WX_SHARED">1</set> - <include file="../../wxwk-settings.bkl"/> - - <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define - it in case the presets/wx.bkl doesn't define it for us. --> - <if cond="not isdefined('WX_PYTHON')"> - <set var="WX_PYTHON">1</set> - </if> - - <if cond="not isdefined('PYTHON_LIB')"> - <option name="PYTHON_LIB" never_empty="1"> - <default-value>python26</default-value> - <description> - The name of the Python library file. - </description> - </option> - </if> - - <if cond="not isdefined('PYTHON_LIBDIR')"> - <option name="PYTHON_LIBDIR" category="path"> - <default-value>C:/Python25/Libs</default-value> - <description> - The directory containing the Python library to link against. - </description> - </option> - </if> - - <module id="wxwebkit-python" template="wxwk,webcore,xml2,iconv,xslt,icu,jscore,curl,sqlite3,gtk,pthreads"> - <!-- make sure we relink wxwebkit if either webcore or jscore change --> - <if cond="FORMAT=='gnu'"> - <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file> - </if> - <if cond="FORMAT=='msvc'"> - <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file> - </if> - <runtime-libs>dynamic</runtime-libs> - <dllname>_webview</dllname> - - <include>$(WK_ROOT)/WebCore/platform/wx</include> - <include>$(WK_ROOT)/WebCore/bridge/wx</include> - <include>$(WK_ROOT)/WebCore/page/wx</include> - <include>$(WK_ROOT)/WebKit/wx</include> - <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include> - - <if cond="FORMAT=='gnu'"> - <sys-lib>png</sys-lib> - <set var="MAC_FLAGS"> - <if cond="PLATFORM_OS=='mac'">-bundle -undefined dynamic_lookup</if> - </set> - <ldflags>$(PYTHON_LIB)</ldflags> - <ldflags>$(MAC_FLAGS)</ldflags> - </if> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>libpng</sys-lib> - <lib-path>$(WK_ROOT)/libpng</lib-path> - <sys-lib>$(PYTHON_LIB)</sys-lib> - </if> - - <lib-path>$(PYTHON_LIBDIR)</lib-path> - - - <sys-lib>wxwebkit</sys-lib> - <lib-path>$(WKOUTPUTDIR)</lib-path> - - <define>SWIG_TYPE_TABLE=_wxPython_table</define> - <define>WXP_USE_THREAD=1</define> - <define>SWIG_PYTHON_OUTPUT_TUPLE</define> - - <sources> - webview.cpp - </sources> - </module> - -</makefile> diff --git a/WebKit/wx/dependencies.bkl b/WebKit/wx/dependencies.bkl index dc82c3f..e69de29 100644 --- a/WebKit/wx/dependencies.bkl +++ b/WebKit/wx/dependencies.bkl @@ -1,177 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2005, 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. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. - -This file contains templates with settings for components used by JavaScriptCore -and WebCore. Include this file to use these settings. - ---> - - -<makefile> - - <option name="SQLITE3_LIBS"> - <default-value>$(DOLLAR)(shell pkg-config --libs sqlite3)</default-value> - </option> - - <option name="SQLITE3_CFLAGS"> - <default-value>$(DOLLAR)(shell pkg-config --cflags sqlite3)</default-value> - </option> - - <template id="sqlite3"> - <if cond="FORMAT=='gnu'"> - <set var="SQLITE_LDFLAGS"><if cond="PLATFORM_OS=='mac'">-lWebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_LIBS)</if></set> - <set var="SQLITE_CFLAGS"><if cond="PLATFORM_OS=='mac'">-I$(WK_ROOT)/WebKitLibraries/WebCoreSQLite3</if><if cond="PLATFORM_OS=='linux'">$(SQLITE3_CFLAGS)</if></set> - <ldflags>$(SQLITE_LDFLAGS)</ldflags> - <cxxflags>$(SQLITE_CFLAGS)</cxxflags> - </if> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>sqlite3</sys-lib> - <include>$(WK_ROOT)/WebKitLibraries/win/include/SQLite</include> - </if> - </template> - - <option name="CURL_LIBS"> - <default-value>$(DOLLAR)(shell curl-config --libs)</default-value> - </option> - - <option name="CURL_CFLAGS"> - <default-value>$(DOLLAR)(shell curl-config --cflags)</default-value> - </option> - - <template id="curl"> - <if cond="FORMAT not in ['msvc', 'msvc2005prj']"> - <ldflags>$(CURL_LIBS)</ldflags> - <cxxflags>$(CURL_CFLAGS)</cxxflags> - </if> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <sys-lib>libcurl</sys-lib> - </if> - </template> - - <option name="GTK_LIBS"> - <default-value>$(DOLLAR)(shell pkg-config --libs gtk+-2.0)</default-value> - </option> - - <option name="GTK_CFLAGS"> - <default-value>$(DOLLAR)(shell pkg-config --cflags gtk+-2.0)</default-value> - </option> - - <!-- GTK settings, for GTK ports - wx doesn't use these --> - <template id="gtk"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(GTK_LIBS)</ldflags> - <cxxflags>$(GTK_CFLAGS)</cxxflags> - </if> - - <!-- TODO: non-Cygwin Windows support for this? :) --> - </template> - - - <option name="XML2_LIBS"> - <default-value>$(DOLLAR)(shell xml2-config --libs)</default-value> - </option> - - <option name="XML2_CFLAGS"> - <default-value>$(DOLLAR)(shell xml2-config --cflags)</default-value> - </option> - - <!-- XML2 library settings --> - <template id="xml2"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(XML2_LIBS)</ldflags> - <cxxflags>$(XML2_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <sys-lib>libxml2</sys-lib> - </if> - </template> - - - <option name="XSLT_LIBS"> - <default-value>$(DOLLAR)(shell xslt-config --libs)</default-value> - </option> - - <option name="XSLT_CFLAGS"> - <default-value>$(DOLLAR)(shell xslt-config --cflags)</default-value> - </option> - - <!-- XSLT library settings --> - <template id="xslt" template="xml2"> - <if cond="FORMAT=='gnu'"> - <ldflags>$(XSLT_LIBS)</ldflags> - <cxxflags>$(XSLT_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <sys-lib>libxslt</sys-lib> - </if> - </template> - - <!-- IBM ICU settings --> - <template id="icu"> - <if cond="FORMAT=='gnu'"> - <!-- Mac includes ICU with the system, but doesn't include headers or - icu-config, so we have to hardcode settings there. --> - <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/JavaScriptCore/icu</if></set> - <set var="ICU_INCLUDE"><if cond="PLATFORM_OS=='mac'">$(WK_ROOT)/WebCore/icu</if></set> - <set var="ICU_LIB"><if cond="PLATFORM_OS=='mac'">icucore</if></set> - <set var="ICU_LDFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --ldflags)</if></set> - <set var="ICU_CFLAGS"><if cond="PLATFORM_OS=='linux'">$(DOLLAR)(shell icu-config --cppflags)</if></set> - - <include>$(ICU_INCLUDE)</include> - <sys-lib>$(ICU_LIB)</sys-lib> - <ldflags>$(ICU_LDFLAGS)</ldflags> - <cxxflags>$(ICU_CFLAGS)</cxxflags> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <sys-lib>icuuc</sys-lib> - <sys-lib>icuin</sys-lib> - </if> - </template> - - - <template id="iconv"> - </template> - - - <template id="pthreads"> - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/WebKitLibraries/win/include/pthreads</include> - <sys-lib>pthreadVC2</sys-lib> - </if> - <if cond="FORMAT=='gnu'"> - <sys-lib>pthread</sys-lib> - </if> - </template> - -</makefile> diff --git a/WebKit/wx/presets/wxwebkit.bkl b/WebKit/wx/presets/wxwebkit.bkl index 029441f..e69de29 100644 --- a/WebKit/wx/presets/wxwebkit.bkl +++ b/WebKit/wx/presets/wxwebkit.bkl @@ -1,164 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2007 Kevin Ollivier. 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. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. - -This file contains templates with settings for components used by JavaScriptCore -and WebCore. Include this file to use these settings. - ---> - - -<makefile> - <if cond="not isdefined('WK_ROOT')"> - <option name="WK_ROOT" category="path"> - <default-value>$(DOLLAR)(WEBKIT_ROOT)</default-value> - <description> - The root directory containing WebKit sources - </description> - </option> - </if> - <if cond="not isdefined('WKOUTPUTDIR')"> - <option name="WKOUTPUTDIR" category="path"> - <default-value>$(DOLLAR)(WEBKITOUTPUTDIR)</default-value> - <description> - The root directory containing WebKit products - </description> - </option> - </if> - - <if cond="not isdefined('WX_PORT')"> - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <set var="WX_PORT_DEFAULT" overwrite="0"> - msw - </set> - </if> - <if cond="not FORMAT in ['msvc','msvs2005prj']"> - <set var="WX_PORT_DEFAULT" overwrite="0"> - $(DOLLAR)(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1) - </set> - </if> - <option name="WX_PORT"> - <values>gtk2,msw,mac</values> - <default-value force="1">$(WX_PORT_DEFAULT)</default-value> - <description> - Port of the wx library to build against - </description> - </option> - </if> - - <if cond="not isdefined('PLATFORM_OS')"> - <option name="PLATFORM_OS"> - <values>linux,mac,win</values> - <default-value force="1">win</default-value> - <description> - Platform the wx library is being built on - </description> - </option> - </if> - - - <if cond="not isdefined('DEBUG')"> - <option name="DEBUG"> - <values>0,1</values> - <default-value>0</default-value> - <description> - Whether or not to build debug - </description> - </option> - </if> - - <template id="jscore"> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <!-- MSVC chokes on #import, so don't use ForwardingHeaders... --> - <include>$(WK_ROOT)/JavaScriptCore/os-win32</include><!-- stdint.h is here --> - <include>$(WKOUTPUTDIR)</include> - </if> - <lib-path>$(WKOUTPUTDIR)</lib-path> - <sys-lib>jscore</sys-lib> - </template> - - <template id="webcore"> - <if cond="FORMAT=='gnu'"> - <!-- FIXME: we need proper configure checks --> - <define>HAVE_FUNC_ISNAN</define> - </if> - - <if cond="PLATFORM_WIN32=='1'"> - <include>$(WK_ROOT)/os-win32</include> - <define>HAVE_SYS_TIMEB_H=1</define> - <define>HAVE_FLOAT_H=1</define> - <define>HAVE_FUNC__FINITE=1</define> - </if> - - <include>$(WKOUTPUTDIR)</include> - <include>$(WK_ROOT)/WebCore</include> - <include>$(WK_ROOT)/WebCore/DerivedSources/WebCore</include> - <include>$(WK_ROOT)/WebCore/bindings/js</include> - <include>$(WK_ROOT)/WebCore/bridge</include> - <include>$(WK_ROOT)/WebCore/css</include> - <include>$(WK_ROOT)/WebCore/dom</include> - <include>$(WK_ROOT)/WebCore/editing</include> - <include>$(WK_ROOT)/WebCore/history</include> - <include>$(WK_ROOT)/WebCore/html</include> - <include>$(WK_ROOT)/WebCore/inspector</include> - <include>$(WK_ROOT)/WebCore/loader</include> - <include>$(WK_ROOT)/WebCore/loader/icon</include> - <include>$(WK_ROOT)/WebCore/page</include> - <include>$(WK_ROOT)/WebCore/page/animation</include> - <include>$(WK_ROOT)/WebCore/platform</include> - <include>$(WK_ROOT)/WebCore/platform/animation</include> - <include>$(WK_ROOT)/WebCore/platform/graphics</include> - <include>$(WK_ROOT)/WebCore/platform/graphics/transforms</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/gif</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/jpeg</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/png</include> - <include>$(WK_ROOT)/WebCore/platform/image-decoders/zlib</include> - <include>$(WK_ROOT)/WebCore/platform/network</include> - <include>$(WK_ROOT)/WebCore/platform/network/curl</include> - <include>$(WK_ROOT)/WebCore/platform/sql</include> - <include>$(WK_ROOT)/WebCore/platform/text</include> - <include>$(WK_ROOT)/WebCore/rendering</include> - <include>$(WK_ROOT)/WebCore/rendering/style</include> - <include>$(WK_ROOT)/WebCore/storage</include> - <include>$(WK_ROOT)/WebCore/xml</include> - - <include>$(WK_ROOT)/JavaScriptCore</include> - <include>$(WK_ROOT)/JavaScriptCore/assembler</include> - <include>$(WK_ROOT)/JavaScriptCore/bytecode</include> - <include>$(WK_ROOT)/JavaScriptCore/bytecompiler</include> - <include>$(WK_ROOT)/JavaScriptCore/jit</include> - <include>$(WK_ROOT)/JavaScriptCore/parser</include> - <include>$(WK_ROOT)/JavaScriptCore/pcre</include> - <include>$(WK_ROOT)/JavaScriptCore/profiler</include> - <include>$(WK_ROOT)/JavaScriptCore/runtime</include> - <include>$(WK_ROOT)/JavaScriptCore/interpreter</include> - <include>$(WK_ROOT)/JavaScriptCore/wtf</include> - </template> - -</makefile> diff --git a/WebKit/wx/wxwebkit.bkl b/WebKit/wx/wxwebkit.bkl index ccf6752..e69de29 100644 --- a/WebKit/wx/wxwebkit.bkl +++ b/WebKit/wx/wxwebkit.bkl @@ -1,83 +0,0 @@ -<?xml version="1.0" ?> -<!-- - -Copyright (C) 2007 Kevin Ollivier. 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. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. - -This file builds the wxWebKit library. - ---> - -<makefile> - <include file="wxwk-settings.bkl"/> - - <dll id="wxwebkit-dynamic" template="wxwk,jscore,webcore,xml2,iconv,xslt,icu,curl,sqlite3,gtk,pthreads"> - <!-- make sure we relink wxwebkit if either webcore or jscore change --> - <if cond="FORMAT=='gnu'"> - <depends-on-file>$(WKOUTPUTDIR)/libjscore.a</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/libwebcore-wx.a</depends-on-file> - </if> - <if cond="FORMAT=='msvc'"> - <depends-on-file>$(WKOUTPUTDIR)/jscore.lib</depends-on-file> - <depends-on-file>$(WKOUTPUTDIR)/webcore-wx.lib</depends-on-file> - </if> - <runtime-libs>dynamic</runtime-libs> - <dllname>wxwebkit</dllname> - <libname>wxwebkit</libname> - - <include>$(WK_ROOT)/WebCore/platform/graphics/wx</include> - <include>$(WK_ROOT)/WebCore/platform/wx</include> - <include>$(WK_ROOT)/WebCore/bridge/wx</include> - <include>$(WK_ROOT)/WebCore/page/wx</include> - <include>$(WK_ROOT)/WebKit/wx</include> - <include>$(WK_ROOT)/WebKit/wx/WebKitSupport</include> - - <lib-path>$(WKOUTPUTDIR)</lib-path> - <sys-lib>webcore-wx</sys-lib> - <sys-lib>jscore</sys-lib> - - <if cond="FORMAT in ['msvc','msvs2005prj']"> - <sys-lib>winmm</sys-lib> <!-- for timeGetTime --> - <sys-lib>gdiplus</sys-lib> - <sys-lib>libpng</sys-lib> - <sys-lib>libjpeg</sys-lib> - </if> - - <sources> - WebKitSupport/ChromeClientWx.cpp - WebKitSupport/ContextMenuClientWx.cpp - WebKitSupport/DragClientWx.cpp - WebKitSupport/EditorClientWx.cpp - WebKitSupport/FrameLoaderClientWx.cpp - WebKitSupport/InspectorClientWx.cpp - - WebFrame.cpp - WebView.cpp - WebBrowserShell.cpp - </sources> - </dll> - -</makefile> diff --git a/WebKit/wx/wxwk-settings.bkl b/WebKit/wx/wxwk-settings.bkl index d51c18a..e69de29 100644 --- a/WebKit/wx/wxwk-settings.bkl +++ b/WebKit/wx/wxwk-settings.bkl @@ -1,109 +0,0 @@ -<?xml version="1.0" ?> -<!-- -Copyright (C) 2007 Kevin Ollivier 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. -3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 OR ITS 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. - -JavaScriptCore Bakefile project file. ---> - -<makefile> - <set var="WX_UNICODE">1</set> - <set var="WX_SHARED">1</set> - - <include file="presets/wx.bkl"/> - <include file="presets/wxwebkit.bkl"/> - <include file="dependencies.bkl"/> - - <set var="BUILDDIR">obj-$(FORMAT)</set> - <!-- the WX_PYTHON option was added to presets/wx.bkl in 2.8.5, so define - it in case the presets/wx.bkl doesn't define it for us. --> - - <if cond="not isdefined('WX_PYTHON')"> - <set var="WX_PYTHON">0</set> - </if> - - <template id="wxwk_build_settings"> - <dirname>$(WKOUTPUTDIR)</dirname> - <warnings>default</warnings> - <cxx-rtti>on</cxx-rtti> - <cxx-exceptions>on</cxx-exceptions> - <define>BUILDING_WX__=1</define> - <define>ENABLE_DOM_STORAGE</define> - <define> - $(substituteFromDict(DEBUG,{'1':'','0':'NDEBUG'})) - </define> - <define>USE_SYSTEM_MALLOC</define> - <optimize> - $(substituteFromDict(DEBUG,{'1':'off','0':'speed'})) - </optimize> - <debug-info> - $(substituteFromDict(DEBUG,{'1':'on','0':'off'})) - </debug-info> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <set var="DEBUG_RUNTIME"> - <if cond="WX_PYTHON=='1' and WX_DEBUG=='0'">off</if> - <if cond="WX_PYTHON=='0' and WX_DEBUG=='0'">off</if> - <if cond="WX_PYTHON=='1' and WX_DEBUG=='1'">off</if> - <if cond="WX_PYTHON=='0' and WX_DEBUG=='1'">on</if> - </set> - <debug-runtime-libs> - $(DEBUG_RUNTIME) - </debug-runtime-libs> - </if> - <if cond="FORMAT=='gnu'"> - <include>$(WK_ROOT)/WebKitLibraries/unix/include</include> - <lib-path>$(WK_ROOT)/WebKitLibraries/unix/lib</lib-path> - <lib-path>$(WK_ROOT)/WebKitLibraries</lib-path> - </if> - <if cond="FORMAT in ['msvc', 'msvs2005prj']"> - <include>$(WK_ROOT)/WebKitLibraries/win/include</include> - <lib-path>$(WK_ROOT)/WebKitLibraries/win/lib</lib-path> - </if> - </template> - <template id="wxwk" template="wxwk_build_settings,wx"> - <!-- - since wx 2.8's libpng and libjpeg symbols get exported when using gcc/gnu make - we need to make sure our versions appear first, so that it will get the symbols - from the right place - --> - <if cond="FORMAT=='gnu'"> - <ldflags>-ljpeg -lpng</ldflags> - </if> - - <set var="WEBCORE_LIBS"> - <if cond="PLATFORM_OS=='mac'"> - WebKitSystemInterfaceTiger - </if> - </set> - <sys-lib>$(WEBCORE_LIBS)</sys-lib> - <wx-lib>core</wx-lib> - <wx-lib>base</wx-lib> - <if cond="PLATFORM_WIN32=='1'"> - <define>WXUSINGDLL=1</define> - </if> - </template> - -</makefile> |