Changeset 52668 in webkit


Ignore:
Timestamp:
Dec 30, 2009 11:26:15 AM (14 years ago)
Author:
kevino@webkit.org
Message:

Reviewed by Kevin Ollivier.

Introduce wxWebSettings API interface for editing wxWebView / page settings.

https://bugs.webkit.org/show_bug.cgi?id=32956

Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/wx/ChangeLog

    r52598 r52668  
     12009-12-30  Kevin Watters  <kevinwatters@gmail.com>
     2
     3        Reviewed by Kevin Ollivier.
     4
     5        Introduce wxWebSettings API interface for editing wxWebView / page settings.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=32956
     8
     9        * WebBrowserShell.h:
     10        * WebFrame.h:
     11        * WebKitDefines.h: Added.
     12        * WebSettings.cpp: Added.
     13        (wxWebSettings::SetDefaultFixedFontSize):
     14        (wxWebSettings::GetDefaultFixedFontSize):
     15        (wxWebSettings::SetDefaultFontSize):
     16        (wxWebSettings::GetDefaultFontSize):
     17        (wxWebSettings::SetMinimumFontSize):
     18        (wxWebSettings::GetMinimumFontSize):
     19        (wxWebSettings::SetLoadsImagesAutomatically):
     20        (wxWebSettings::LoadsImagesAutomatically):
     21        (wxWebSettings::SetJavaScriptEnabled):
     22        (wxWebSettings::IsJavaScriptEnabled):
     23        (wxWebSettings::SetDatabasesEnabled):
     24        (wxWebSettings::AreDatabasesEnabled):
     25        (wxWebSettings::SetLocalStoragePath):
     26        (wxWebSettings::GetLocalStoragePath):
     27        (wxWebSettings::SetEditableLinkBehavior):
     28        (wxWebSettings::GetEditableLinkBehavior):
     29        (wxWebSettings::SetPluginsEnabled):
     30        (wxWebSettings::ArePluginsEnabled):
     31        * WebSettings.h: Added.
     32        * WebView.cpp:
     33        (wxWebView::Create):
     34        (wxWebView::GetWebSettings):
     35        * WebView.h:
     36        * bindings/python/webview.i:
     37
    1382009-12-28  Patrick Gansterer  <paroga@paroga.com>
    239
  • trunk/WebKit/wx/WebBrowserShell.h

    r43265 r52668  
    3434#endif
    3535
     36#include "WebKitDefines.h"
    3637#include "WebView.h"
    3738#include <wx/srchctrl.h>
  • trunk/WebKit/wx/WebFrame.h

    r48347 r52668  
    3434#endif
    3535
     36#include "WebKitDefines.h"
     37
    3638class WebFramePrivate;
    3739class WebViewFrameData;
     
    4446    class Frame;
    4547}
    46 
    47 #ifndef SWIG
    48 
    49 #if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0)
    50 #define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
    51 #elif WXMAKINGDLL_WEBKIT
    52 #define WXDLLIMPEXP_WEBKIT WXEXPORT
    53 #elif defined(WXUSINGDLL_WEBKIT)
    54 #define WXDLLIMPEXP_WEBKIT WXIMPORT
    55 #endif
    56 
    57 #else
    58 #define WXDLLIMPEXP_WEBKIT
    59 #endif // SWIG
    6048
    6149class WXDLLIMPEXP_WEBKIT wxWebViewDOMElementInfo
  • trunk/WebKit/wx/WebView.cpp

    r52420 r52668  
    337337#if ENABLE(DATABASE)
    338338    settings->setDatabasesEnabled(true);
    339 #endif
    340 
    341 #if __WXMSW__ || __WXMAC__
    342     settings->setPluginsEnabled(true);
    343339#endif
    344340
     
    967963        mgr->setProxyInfo(host, port, curlProxyType(type), username, password);
    968964}
     965
     966wxWebSettings wxWebView::GetWebSettings()
     967{
     968    ASSERT(m_impl->page);
     969    if (m_impl->page)
     970        return wxWebSettings(m_impl->page->settings());
     971   
     972    return wxWebSettings();
     973}
  • trunk/WebKit/wx/WebView.h

    r49752 r52668  
    3535
    3636#include "WebFrame.h"
     37#include "WebKitDefines.h"
     38#include "WebSettings.h"
    3739
    3840class WebViewPrivate;
     
    4749    class FrameLoaderClientWx;
    4850}
    49 
    50 #ifndef SWIG
    51 
    52 #if !wxCHECK_VERSION(2,9,0) && wxCHECK_GCC_VERSION(4,0)
    53 #define WXDLLIMPEXP_WEBKIT __attribute__ ((visibility("default")))
    54 #elif WXMAKINGDLL_WEBKIT
    55 #define WXDLLIMPEXP_WEBKIT WXEXPORT
    56 #elif defined(WXUSINGDLL_WEBKIT)
    57 #define WXDLLIMPEXP_WEBKIT WXIMPORT
    58 #endif
    59 
    60 #else
    61 #define WXDLLIMPEXP_WEBKIT
    62 #endif // SWIG
    6351
    6452#ifndef SWIG
     
    214202                             const wxString& username = wxEmptyString,
    215203                             const wxString& password = wxEmptyString);
     204
     205    wxWebSettings GetWebSettings();
    216206
    217207protected:
  • trunk/WebKit/wx/bindings/python/webview.i

    r49908 r52668  
    2929#include "wx/wxPython/wxPython.h"
    3030#include "wx/wxPython/pyclasses.h"
     31
     32#include "WebBrowserShell.h"
    3133#include "WebFrame.h"
     34#include "WebKitDefines.h"
     35#include "WebSettings.h"
    3236#include "WebView.h"
    33 #include "WebBrowserShell.h"
    3437%}
    3538//---------------------------------------------------------------------------
     
    4043MAKE_CONST_WXSTRING(WebViewNameStr);
    4144
     45MustHaveApp(wxWebBrowserShell);
    4246MustHaveApp(wxWebFrame);
    4347MustHaveApp(wxWebView);
    44 MustHaveApp(wxWebBrowserShell);
    4548
     49%include WebKitDefines.h
     50
     51%include WebBrowserShell.h
    4652%include WebFrame.h
     53%include WebSettings.h
    4754%include WebView.h
    48 %include WebBrowserShell.h
    4955
    5056%constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD;
  • trunk/WebKitTools/ChangeLog

    r52667 r52668  
     12009-12-30  Kevin Watters  <kevinwatters@gmail.com>
     2
     3        Reviewed by Kevin Ollivier.
     4
     5        [wx] Alter a couple of default settings in the test app.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=32956
     8
     9        * wx/browser/browser.cpp:
     10        (MyApp::OnInit):
     11
    1122009-12-30  Eric Seidel  <eric@webkit.org>
    213
  • trunk/WebKitTools/wx/browser/browser.cpp

    r34152 r52668  
    2727 
    2828// webkit includes
     29#include "WebBrowserShell.h"
     30#include "WebSettings.h"
    2931#include "WebView.h"
    30 #include "WebBrowserShell.h"
    3132
    3233#include "wx/wxprec.h"
     
    5657    frame->ShowDebugMenu(true);
    5758#endif
     59
     60    wxWebSettings settings = frame->webview->GetWebSettings();
     61#if __WXMSW__ || __WXMAC__
     62    settings.SetPluginsEnabled(true);
     63#endif
     64    settings.SetDatabasesEnabled(true);
     65    settings.SetEditableLinkBehavior(wxEditableLinkOnlyLiveWithShiftKey);
    5866    frame->CentreOnScreen();
    5967    frame->Show(true);
Note: See TracChangeset for help on using the changeset viewer.