Changeset 70464 in webkit


Ignore:
Timestamp:
Oct 25, 2010 10:58:25 AM (14 years ago)
Author:
andersca@apple.com
Message:

Java applets don't display on the page
https://bugs.webkit.org/show_bug.cgi?id=48251
<rdar://problem/8483759>

Reviewed by Dan Bernstein.

Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.

  • Shared/WebPreferencesStore.cpp:

(WebKit::WebPreferencesStore::WebPreferencesStore):
Initialize javaEnabled.

(WebKit::WebPreferencesStore::encode):
Encode javaEnabled.

(WebKit::WebPreferencesStore::decode):
Decode javaEnabled.

  • Shared/WebPreferencesStore.h:

Add javaEnabled.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPReferencesSetJavaEnabled):
(WKPReferencesGetJavaEnabled):
Call the WebPreferences functions.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::createJavaAppletWidget):
Just call createPlugin.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Call Settings::setJavaEnabled.

Location:
trunk/WebKit2
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r70460 r70464  
     12010-10-25  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Java applets don't display on the page
     6        https://bugs.webkit.org/show_bug.cgi?id=48251
     7        <rdar://problem/8483759>
     8
     9        Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.
     10
     11        * Shared/WebPreferencesStore.cpp:
     12        (WebKit::WebPreferencesStore::WebPreferencesStore):
     13        Initialize javaEnabled.
     14
     15        (WebKit::WebPreferencesStore::encode):
     16        Encode javaEnabled.
     17
     18        (WebKit::WebPreferencesStore::decode):
     19        Decode javaEnabled.
     20
     21        * Shared/WebPreferencesStore.h:
     22        Add javaEnabled.
     23
     24        * UIProcess/API/C/WKPreferences.cpp:
     25        (WKPReferencesSetJavaEnabled):
     26        (WKPReferencesGetJavaEnabled):
     27        Call the WebPreferences functions.
     28
     29        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     30        (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
     31        Just call createPlugin.
     32
     33        * WebProcess/WebPage/WebPage.cpp:
     34        (WebKit::WebPage::updatePreferences):
     35        Call Settings::setJavaEnabled.
     36
    1372010-10-25  Patrick Gansterer  <paroga@webkit.org>
    238
  • trunk/WebKit2/Shared/WebPreferencesStore.cpp

    r70255 r70464  
    3737    , loadsImagesAutomatically(true)
    3838    , pluginsEnabled(true)
     39    , javaEnabled(true)
    3940    , offlineWebApplicationCacheEnabled(false)
    4041    , localStorageEnabled(true)
     
    7374    encoder->encode(loadsImagesAutomatically);
    7475    encoder->encode(pluginsEnabled);
     76    encoder->encode(javaEnabled);
    7577    encoder->encode(offlineWebApplicationCacheEnabled);
    7678    encoder->encode(localStorageEnabled);
     
    101103        return false;
    102104    if (!decoder->decode(s.pluginsEnabled))
     105        return false;
     106    if (!decoder->decode(s.javaEnabled))
    103107        return false;
    104108    if (!decoder->decode(s.offlineWebApplicationCacheEnabled))
  • trunk/WebKit2/Shared/WebPreferencesStore.h

    r70255 r70464  
    4646    bool loadsImagesAutomatically;
    4747    bool pluginsEnabled;
     48    bool javaEnabled;
    4849    bool offlineWebApplicationCacheEnabled;
    4950    bool localStorageEnabled;
  • trunk/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r70255 r70464  
    120120}
    121121
     122void WKPReferencesSetJavaEnabled(WKPreferencesRef preferencesRef, bool javaEnabled)
     123{
     124    toImpl(preferencesRef)->setJavaEnabled(javaEnabled);
     125}
     126
     127bool WKPReferencesGetJavaEnabled(WKPreferencesRef preferencesRef)
     128{
     129    return toImpl(preferencesRef)->javaEnabled();
     130}
     131
    122132void WKPreferencesSetStandardFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
    123133{
  • trunk/WebKit2/UIProcess/API/C/WKPreferences.h

    r70255 r70464  
    6666WK_EXPORT bool WKPreferencesGetFrameFlatteningEnabled(WKPreferencesRef preferences);
    6767
    68 // Default to true.
     68// Defaults to true.
    6969WK_EXPORT void WKPreferencesSetPluginsEnabled(WKPreferencesRef preferences, bool pluginsEnabled);
    7070WK_EXPORT bool WKPreferencesGetPluginsEnabled(WKPreferencesRef preferences);
    7171
     72// Defaults to true.
     73WK_EXPORT void WKPReferencesSetJavaEnabled(WKPreferencesRef preferences, bool javaEnabled);
     74WK_EXPORT bool WKPReferencesGetJavaEnabled(WKPreferencesRef preferences);
     75   
    7276WK_EXPORT void WKPreferencesSetStandardFontFamily(WKPreferencesRef preferencesRef, WKStringRef family);
    7377WK_EXPORT WKStringRef WKPreferencesCopyStandardFontFamily(WKPreferencesRef preferencesRef);
  • trunk/WebKit2/UIProcess/WebPreferences.cpp

    r70255 r70464  
    153153}
    154154
     155void WebPreferences::setJavaEnabled(bool b)
     156{
     157    m_store.javaEnabled = b;
     158    update();
     159}
     160
     161bool WebPreferences::javaEnabled() const
     162{
     163    return m_store.javaEnabled;
     164}
     165
    155166void WebPreferences::setFontSmoothingLevel(FontSmoothingLevel level)
    156167{
  • trunk/WebKit2/UIProcess/WebPreferences.h

    r70255 r70464  
    8080    bool pluginsEnabled() const;
    8181
     82    void setJavaEnabled(bool);
     83    bool javaEnabled() const;
     84
    8285    void setFontSmoothingLevel(FontSmoothingLevel);
    8386    FontSmoothingLevel fontSmoothingLevel() const;
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r70333 r70464  
    5252#include <WebCore/FrameLoadRequest.h>
    5353#include <WebCore/FrameView.h>
     54#include <WebCore/HTMLAppletElement.h>
    5455#include <WebCore/HTMLFormElement.h>
    5556#include <WebCore/MIMETypeRegistry.h>
     
    10101011}
    10111012
    1012 PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues)
    1013 {
    1014     notImplemented();
    1015     return 0;
     1013PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues)
     1014{
     1015    return createPlugin(pluginSize, appletElement, KURL(), paramNames, paramValues, "application/x-java-applet", false);
    10161016}
    10171017
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r70267 r70464  
    718718    settings->setLoadsImagesAutomatically(store.loadsImagesAutomatically);
    719719    settings->setPluginsEnabled(store.pluginsEnabled);
     720    settings->setJavaEnabled(store.javaEnabled);
    720721    settings->setOfflineWebApplicationCacheEnabled(store.offlineWebApplicationCacheEnabled);
    721722    settings->setLocalStorageEnabled(store.localStorageEnabled);
Note: See TracChangeset for help on using the changeset viewer.