Changeset 86201 in webkit


Ignore:
Timestamp:
May 10, 2011 6:24:16 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-10 Chris Evans <cevans@chromium.org>

Reviewed by Adam Barth.

Add WebCore::Setting to block displaying and/or running insecure content on secure pages
https://bugs.webkit.org/show_bug.cgi?id=58378

  • DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::setAllowDisplayOfInsecureContent): (LayoutTestController::setAllowRunningOfInsecureContent):
  • DumpRenderTree/chromium/LayoutTestController.h:
  • DumpRenderTree/chromium/WebPreferences.cpp: (WebPreferences::reset): (WebPreferences::applyTo):
  • DumpRenderTree/chromium/WebPreferences.h: Add plumbing for new settings to Chromium DRT.
Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r86191 r86201  
     12011-05-10  Chris Evans  <cevans@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Add WebCore::Setting to block displaying and/or running insecure content on secure pages
     6        https://bugs.webkit.org/show_bug.cgi?id=58378
     7
     8        * DumpRenderTree/chromium/LayoutTestController.cpp:
     9        (LayoutTestController::LayoutTestController):
     10        (LayoutTestController::setAllowDisplayOfInsecureContent):
     11        (LayoutTestController::setAllowRunningOfInsecureContent):
     12        * DumpRenderTree/chromium/LayoutTestController.h:
     13        * DumpRenderTree/chromium/WebPreferences.cpp:
     14        (WebPreferences::reset):
     15        (WebPreferences::applyTo):
     16        * DumpRenderTree/chromium/WebPreferences.h:
     17        Add plumbing for new settings to Chromium DRT.
     18
    1192011-05-10  Enrica Casucci  <enrica@apple.com>
    220
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r86047 r86201  
    139139    bindMethod("sampleSVGAnimationForElementAtTime", &LayoutTestController::sampleSVGAnimationForElementAtTime);
    140140    bindMethod("setAcceptsEditing", &LayoutTestController::setAcceptsEditing);
     141    bindMethod("setAllowDisplayOfInsecureContent", &LayoutTestController::setAllowDisplayOfInsecureContent);
    141142    bindMethod("setAllowFileAccessFromFileURLs", &LayoutTestController::setAllowFileAccessFromFileURLs);
     143    bindMethod("setAllowRunningOfInsecureContent", &LayoutTestController::setAllowRunningOfInsecureContent);
    142144    bindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
    143145    bindMethod("setAlwaysAcceptCookies", &LayoutTestController::setAlwaysAcceptCookies);
     
    12831285}
    12841286
     1287void LayoutTestController::setAllowDisplayOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
     1288{
     1289    if (arguments.size() > 0 && arguments[0].isBool()) {
     1290        m_shell->preferences()->allowDisplayOfInsecureContent = arguments[0].value.boolValue;
     1291        m_shell->applyPreferences();
     1292    }
     1293    result->setNull();
     1294}
     1295
    12851296void LayoutTestController::setAllowFileAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
    12861297{
    12871298    if (arguments.size() > 0 && arguments[0].isBool()) {
    12881299        m_shell->preferences()->allowFileAccessFromFileURLs = arguments[0].value.boolValue;
     1300        m_shell->applyPreferences();
     1301    }
     1302    result->setNull();
     1303}
     1304
     1305void LayoutTestController::setAllowRunningOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
     1306{
     1307    if (arguments.size() > 0 && arguments[0].isBool()) {
     1308        m_shell->preferences()->allowRunningOfInsecureContent = arguments[0].value.boolValue;
    12891309        m_shell->applyPreferences();
    12901310    }
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h

    r86047 r86201  
    270270    void overridePreference(const CppArgumentList&, CppVariant*);
    271271    void setAllowUniversalAccessFromFileURLs(const CppArgumentList&, CppVariant*);
     272    void setAllowDisplayOfInsecureContent(const CppArgumentList&, CppVariant*);
    272273    void setAllowFileAccessFromFileURLs(const CppArgumentList&, CppVariant*);
     274    void setAllowRunningOfInsecureContent(const CppArgumentList&, CppVariant*);
    273275
    274276    void shadowRoot(const CppArgumentList&, CppVariant*);
  • trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp

    r85777 r86201  
    7171    DOMPasteAllowed = true;
    7272    XSSAuditorEnabled = false;
     73    allowDisplayOfInsecureContent = true;
    7374    allowFileAccessFromFileURLs = true;
     75    allowRunningOfInsecureContent = true;
    7476    authorAndUserStylesEnabled = true;
    7577    defaultTextEncodingName = WebString::fromUTF8("ISO-8859-1");
     
    128130    settings->setDOMPasteAllowed(DOMPasteAllowed);
    129131    settings->setXSSAuditorEnabled(XSSAuditorEnabled);
     132    settings->setAllowDisplayOfInsecureContent(allowDisplayOfInsecureContent);
    130133    settings->setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
     134    settings->setAllowRunningOfInsecureContent(allowRunningOfInsecureContent);
    131135    settings->setAuthorAndUserStylesEnabled(authorAndUserStylesEnabled);
    132136    settings->setDefaultTextEncodingName(defaultTextEncodingName);
  • trunk/Tools/DumpRenderTree/chromium/WebPreferences.h

    r85777 r86201  
    5555    bool DOMPasteAllowed;
    5656    bool XSSAuditorEnabled;
     57    bool allowDisplayOfInsecureContent;
    5758    bool allowFileAccessFromFileURLs;
     59    bool allowRunningOfInsecureContent;
    5860    bool authorAndUserStylesEnabled;
    5961    WebKit::WebString defaultTextEncodingName;
Note: See TracChangeset for help on using the changeset viewer.