Changeset 131229 in webkit


Ignore:
Timestamp:
Oct 12, 2012 3:02:54 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt][WK2] REGRESSION(r131057): It made plugins/plugin-document-back-forward.html timeout
https://bugs.webkit.org/show_bug.cgi?id=99152

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-12
Reviewed by Simon Fraser.

Even though Response was already checked in WTR WKBundlePagePolicyClient decidePolicyForResponse callback,
this check did not take plugins into consideration when deciding whether we can show the given MIME type or not
so added another check in WTR UI process which also includes plugins.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::decidePolicyForResponse):

  • WebKitTestRunner/TestController.h:

(TestController):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r131204 r131229  
     12012-10-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [Qt][WK2] REGRESSION(r131057): It made plugins/plugin-document-back-forward.html timeout
     4        https://bugs.webkit.org/show_bug.cgi?id=99152
     5
     6        Reviewed by Simon Fraser.
     7
     8        Even though Response was already checked in WTR WKBundlePagePolicyClient decidePolicyForResponse callback,
     9        this check did not take plugins into consideration when deciding whether we can show the given MIME type or not
     10        so added another check in WTR UI process which also includes plugins.
     11
     12        * WebKitTestRunner/TestController.cpp:
     13        (WTR::TestController::decidePolicyForResponse):
     14        * WebKitTestRunner/TestController.h:
     15        (TestController):
     16
    1172012-10-12  Rob Buis  <rbuis@rim.com>
    218
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r131057 r131229  
    10711071}
    10721072
    1073 void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
    1074 {
    1075     static_cast<TestController*>(const_cast<void*>(clientInfo))->decidePolicyForResponse(listener);
    1076 }
    1077 
    1078 void TestController::decidePolicyForResponse(WKFramePolicyListenerRef listener)
    1079 {
    1080     // Response was already checked by WKBundlePagePolicyClient, so if we are here we're supposed to ignore.
     1073void TestController::decidePolicyForResponse(WKPageRef, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
     1074{
     1075    static_cast<TestController*>(const_cast<void*>(clientInfo))->decidePolicyForResponse(frame, response, listener);
     1076}
     1077
     1078void TestController::decidePolicyForResponse(WKFrameRef frame, WKURLResponseRef response, WKFramePolicyListenerRef listener)
     1079{
     1080    // Even though Response was already checked by WKBundlePagePolicyClient, the check did not include plugins
     1081    // so we have to re-check again.
     1082    WKRetainPtr<WKStringRef> wkMIMEType(AdoptWK, WKURLResponseCopyMIMEType(response));
     1083    if (WKFrameCanShowMIMEType(frame, wkMIMEType.get())) {
     1084        WKFramePolicyListenerUse(listener);
     1085        return;
     1086    }
     1087
    10811088    WKFramePolicyListenerIgnore(listener);
    10821089}
  • trunk/Tools/WebKitTestRunner/TestController.h

    r131057 r131229  
    119119
    120120    static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
    121     void decidePolicyForResponse(WKFramePolicyListenerRef);
     121    void decidePolicyForResponse(WKFrameRef, WKURLResponseRef, WKFramePolicyListenerRef);
    122122
    123123    static WKPageRef createOtherPage(WKPageRef oldPage, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*);
Note: See TracChangeset for help on using the changeset viewer.