Changeset 171796 in webkit


Ignore:
Timestamp:
Jul 30, 2014, 3:52:33 AM (11 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
https://bugs.webkit.org/show_bug.cgi?id=135412

Reviewed by Philippe Normand.

The problem is that WebPageProxy::setUIClient() calls
setCanRunModal() with the value of m_uiClient->canRunModal() which
is always true for us. We override that manually by calling
setCanRunModal() depending on the WebKitSettings. In r171742,
webkitWebViewUpdateSettings(), the method that overrides
setCanRunModal(), was moved before attachUIClientToView(), so the
value set by WebPageProxy::setUIClient() is the last one and takes
precedence. We need to make sure webkitWebViewUpdateSettings() is
always called after attachUIClientToView().

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
call after attachUIClientToView() and add a comment to not forget
about it again.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r171792 r171796  
     12014-07-30  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
     4        https://bugs.webkit.org/show_bug.cgi?id=135412
     5
     6        Reviewed by Philippe Normand.
     7
     8        The problem is that WebPageProxy::setUIClient() calls
     9        setCanRunModal() with the value of m_uiClient->canRunModal() which
     10        is always true for us. We override that manually by calling
     11        setCanRunModal() depending on the WebKitSettings. In r171742,
     12        webkitWebViewUpdateSettings(), the method that overrides
     13        setCanRunModal(), was moved before attachUIClientToView(), so the
     14        value set by WebPageProxy::setUIClient() is the last one and takes
     15        precedence. We need to make sure webkitWebViewUpdateSettings() is
     16        always called after attachUIClientToView().
     17
     18        * UIProcess/API/gtk/WebKitWebView.cpp:
     19        (webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
     20        call after attachUIClientToView() and add a comment to not forget
     21        about it again.
     22
    1232014-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
    224
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp

    r171792 r171796  
    497497    priv->relatedView = nullptr;
    498498
    499     webkitWebViewUpdateSettings(webView);
    500499    webkitWebViewBaseSetDownloadRequestHandler(WEBKIT_WEB_VIEW_BASE(webView), webkitWebViewHandleDownloadRequest);
    501500
     
    506505    attachContextMenuClientToView(webView);
    507506    attachFormClientToView(webView);
     507
     508    // This needs to be after attachUIClientToView() because WebPageProxy::setUIClient() calls setCanRunModal() with true.
     509    // See https://bugs.webkit.org/show_bug.cgi?id=135412.
     510    webkitWebViewUpdateSettings(webView);
    508511
    509512    priv->backForwardList = adoptGRef(webkitBackForwardListCreate(&getPage(webView)->backForwardList()));
Note: See TracChangeset for help on using the changeset viewer.