Changeset 69856 in webkit


Ignore:
Timestamp:
Oct 15, 2010 9:27:27 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-15 Qi Zhang <qi.2.zhang@nokia.com>

Reviewed by Andreas Kling.

[Qt] window.close() doesn't work in qt
https://bugs.webkit.org/show_bug.cgi?id=46186

Introduce new attribute in QWebSettings to trigger "setAllowScriptsToCloseWindow"

  • Api/qwebsettings.cpp: (QWebSettingsPrivate::apply):
  • Api/qwebsettings.h:
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebsettings.cpp

    r69636 r69856  
    185185        settings->setJavaScriptCanOpenWindowsAutomatically(value);
    186186
     187        value = attributes.value(QWebSettings::JavascriptCanCloseWindows,
     188                                      global->attributes.value(QWebSettings::JavascriptCanCloseWindows));
     189        settings->setAllowScriptsToCloseWindows(value);
     190
    187191        value = attributes.value(QWebSettings::JavaEnabled,
    188192                                      global->attributes.value(QWebSettings::JavaEnabled));
     
    390394    \value JavascriptCanOpenWindows Specifies whether JavaScript programs
    391395        can open new windows. This is disabled by default.
     396    \value JavascriptCanCloseWindows Specifies whether JavaScript programs
     397        can close windows. This is disabled by default.
    392398    \value JavascriptCanAccessClipboard Specifies whether JavaScript programs
    393399        can read or write to the clipboard. This is disabled by default.
  • trunk/WebKit/qt/Api/qwebsettings.h

    r68166 r69856  
    7777        SiteSpecificQuirksEnabled,
    7878        WebGLEnabled,
    79         HyperlinkAuditingEnabled
     79        HyperlinkAuditingEnabled,
     80        JavascriptCanCloseWindows
    8081    };
    8182    enum WebGraphic {
  • trunk/WebKit/qt/ChangeLog

    r69851 r69856  
     12010-10-15  Qi Zhang  <qi.2.zhang@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] window.close() doesn't work in qt
     6        https://bugs.webkit.org/show_bug.cgi?id=46186
     7
     8        Introduce new attribute in QWebSettings to trigger "setAllowScriptsToCloseWindow"
     9
     10        * Api/qwebsettings.cpp:
     11        (QWebSettingsPrivate::apply):
     12        * Api/qwebsettings.h:
     13
    1142010-10-15  Andreas Kling  <kling@webkit.org>
    215
Note: See TracChangeset for help on using the changeset viewer.