Changeset 23529 in webkit


Ignore:
Timestamp:
Jun 14, 2007 10:21:04 AM (17 years ago)
Author:
andersca
Message:

Reviewed by Geoff.

<rdar://problem/5211677>
-[WebPreferences setJavaEnabled:] only disables java inside <applet>, not <object>


  • loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): If the object is a Java MIME type and Java is disabled, don't load the plug-in.


  • platform/MimeTypeRegistry.cpp: (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Clean this up and add another applet MIME type.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r23528 r23529  
     12007-06-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        <rdar://problem/5211677>
     6        -[WebPreferences setJavaEnabled:] only disables java inside <applet>, not <object>
     7       
     8        * loader/FrameLoader.cpp:
     9        (WebCore::FrameLoader::requestObject):
     10        If the object is a Java MIME type and Java is disabled, don't load the plug-in.
     11       
     12        * platform/MimeTypeRegistry.cpp:
     13        (WebCore::MimeTypeRegistry::isJavaAppletMIMEType):
     14        Clean this up and add another applet MIME type.
     15
    1162007-06-14  George Staikos  <staikos@kde.org>
    217
  • trunk/WebCore/loader/FrameLoader.cpp

    r21975 r23529  
    6363#include "Logging.h"
    6464#include "MainResourceLoader.h"
     65#include "MimeTypeRegistry.h"
    6566#include "Page.h"
    6667#include "PageCache.h"
     
    14441445    if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
    14451446        Settings* settings = m_frame->settings();
    1446         if (!settings || !settings->arePluginsEnabled())
     1447        if (!settings || !settings->arePluginsEnabled() ||
     1448            (!settings->isJavaEnabled() && MimeTypeRegistry::isJavaAppletMIMEType(mimeType)))
    14471449            return false;
    14481450        return loadPlugin(renderer, completedURL, mimeType, paramNames, paramValues, useFallback);
  • trunk/WebCore/platform/MimeTypeRegistry.cpp

    r21559 r23529  
    175175{
    176176    // Since this set is very limited and is likely to remain so we won't bother with the overhead
    177     // of using a Hashset.
    178     // Note - "application/x-java-applet" may be followed by any number of specific versions of the JVM,
     177    // of using a hash set.
     178    // Any of the MIME types below may be followed by any number of specific versions of the JVM,
    179179    // which is why we use startsWith()
    180    
    181     String lower = mimeType.lower();
    182     return lower.startsWith("application/x-java-applet") || lower == "application/x-java-vm";
     180    return mimeType.startsWith("application/x-java-applet", false)
     181        || mimeType.startsWith("application/x-java-bean", false)
     182        || mimeType.startsWith("application/x-java-vm", false);
    183183}
    184184
Note: See TracChangeset for help on using the changeset viewer.