Changeset 206006 in webkit


Ignore:
Timestamp:
Sep 15, 2016 5:27:11 PM (8 years ago)
Author:
beidson@apple.com
Message:

WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
<rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests (Not possible with current testing infrastructure).

This adds the infrastructure for WebCore to track whether or not a CachedFrame had insecure content at the time
it was cached, and then to report that back to the client when a CachedPage is restored.

Since "has insecure content" is currently only tracked in the WK2 UI process, that is the only client of this code.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::setHasInsecureContent):

  • history/CachedFrame.h:

(WebCore::CachedFrame::hasInsecureContent):

  • loader/EmptyClients.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::dispatchDidCommitLoad):

  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/FrameLoaderTypes.h:

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDidCommitLoad):

Source/WebKit/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidCommitLoad):

  • WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

  • Scripts/webkit/messages.py:

(headers_for_type): Add a custom header, and alphabetize existing ones.

  • Shared/WebCoreArgumentCoders.h: Add EnumTraits for HasInsecureContent.
  • UIProcess/PageLoadState.h:

(WebKit::PageLoadState::committedHasInsecureContent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::hasInsecureContent):
(WebKit::WebPageProxy::didCommitLoadForFrame): If the WebProcess included an existing "HasInsecureContent" value, use it.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): Save the "HasInsecureContent" value to the CachedFrame in

case we restore it in the future.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Location:
trunk/Source
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206001 r206006  
     12016-09-15  Brady Eidson  <beidson@apple.com>
     2
     3        WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
     4        <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043
     5
     6        Reviewed by Brent Fulgham.
     7
     8        No new tests (Not possible with current testing infrastructure).
     9
     10        This adds the infrastructure for WebCore to track whether or not a CachedFrame had insecure content at the time
     11        it was cached, and then to report that back to the client when a CachedPage is restored.
     12
     13        Since "has insecure content" is currently only tracked in the WK2 UI process, that is the only client of this code.
     14
     15        * history/CachedFrame.cpp:
     16        (WebCore::CachedFrame::setHasInsecureContent):
     17        * history/CachedFrame.h:
     18        (WebCore::CachedFrame::hasInsecureContent):
     19
     20        * loader/EmptyClients.h:
     21
     22        * loader/FrameLoader.cpp:
     23        (WebCore::FrameLoader::receivedFirstData):
     24        (WebCore::FrameLoader::commitProvisionalLoad):
     25        (WebCore::FrameLoader::dispatchDidCommitLoad):
     26        * loader/FrameLoader.h:
     27
     28        * loader/FrameLoaderClient.h:
     29
     30        * loader/FrameLoaderTypes.h:
     31
    1322016-09-13  Jer Noble  <jer.noble@apple.com>
    233
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r205818 r206006  
    281281}
    282282
     283void CachedFrame::setHasInsecureContent(HasInsecureContent hasInsecureContent)
     284{
     285    m_hasInsecureContent = hasInsecureContent;
     286}
     287
    283288int CachedFrame::descendantFrameCount() const
    284289{
  • trunk/Source/WebCore/history/CachedFrame.h

    r187587 r206006  
    4040class FrameView;
    4141class Node;
     42enum class HasInsecureContent;
    4243
    4344class CachedFrameBase {
     
    6263    bool m_isMainFrame;
    6364    bool m_isComposited;
    64    
     65    Optional<HasInsecureContent> m_hasInsecureContent;
     66
    6567    Vector<std::unique_ptr<CachedFrame>> m_childFrames;
    6668};
     
    7880    WEBCORE_EXPORT CachedFramePlatformData* cachedFramePlatformData();
    7981
     82    WEBCORE_EXPORT void setHasInsecureContent(HasInsecureContent);
     83    Optional<HasInsecureContent> hasInsecureContent() const { return m_hasInsecureContent; }
     84
    8085    using CachedFrameBase::document;
    8186    using CachedFrameBase::view;
  • trunk/Source/WebCore/loader/EmptyClients.h

    r205487 r206006  
    297297    void dispatchDidStartProvisionalLoad() override { }
    298298    void dispatchDidReceiveTitle(const StringWithDirection&) override { }
    299     void dispatchDidCommitLoad() override { }
     299    void dispatchDidCommitLoad(Optional<HasInsecureContent>) override { }
    300300    void dispatchDidFailProvisionalLoad(const ResourceError&) override { }
    301301    void dispatchDidFailLoad(const ResourceError&) override { }
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r205817 r206006  
    639639void FrameLoader::receivedFirstData()
    640640{
    641     dispatchDidCommitLoad();
     641    dispatchDidCommitLoad(Nullopt);
    642642    dispatchDidClearWindowObjectsInAllWorlds();
    643643    dispatchGlobalObjectAvailableInAllWorlds();
     
    18271827        notifier().dispatchDidReceiveResponse(cachedPage->documentLoader(), mainResourceIdentifier, cachedPage->documentLoader()->response());
    18281828
     1829        Optional<HasInsecureContent> hasInsecureContent = cachedPage->cachedMainFrame()->hasInsecureContent();
     1830
    18291831        // FIXME: This API should be turned around so that we ground CachedPage into the Page.
    18301832        cachedPage->restore(*m_frame.page());
    18311833
    1832         dispatchDidCommitLoad();
     1834        dispatchDidCommitLoad(hasInsecureContent);
    18331835#if PLATFORM(IOS)
    18341836        m_frame.page()->chrome().setDispatchViewportDataDidChangeSuppressed(false);
     
    35333535}
    35343536
    3535 void FrameLoader::dispatchDidCommitLoad()
     3537void FrameLoader::dispatchDidCommitLoad(Optional<HasInsecureContent> initialHasInsecureContent)
    35363538{
    35373539    if (m_stateMachine.creatingInitialEmptyDocument())
    35383540        return;
    35393541
    3540     m_client.dispatchDidCommitLoad();
     3542    m_client.dispatchDidCommitLoad(initialHasInsecureContent);
    35413543
    35423544    if (m_frame.isMainFrame()) {
  • trunk/Source/WebCore/loader/FrameLoader.h

    r204637 r206006  
    5151
    5252class Archive;
     53class CachedFrame;
    5354class CachedFrameBase;
    5455class CachedPage;
     
    351352    bool shouldReloadToHandleUnreachableURL(DocumentLoader*);
    352353
    353     void dispatchDidCommitLoad();
     354    void dispatchDidCommitLoad(Optional<HasInsecureContent> initialHasInsecureContent);
    354355
    355356    void urlSelected(const FrameLoadRequest&, Event*);
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r205487 r206006  
    165165        virtual void dispatchDidStartProvisionalLoad() = 0;
    166166        virtual void dispatchDidReceiveTitle(const StringWithDirection&) = 0;
    167         virtual void dispatchDidCommitLoad() = 0;
     167        virtual void dispatchDidCommitLoad(Optional<HasInsecureContent>) = 0;
    168168        virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
    169169        virtual void dispatchDidFailLoad(const ResourceError&) = 0;
  • trunk/Source/WebCore/loader/FrameLoaderTypes.h

    r204320 r206006  
    130130};
    131131
     132enum class HasInsecureContent {
     133    Yes,
     134    No,
     135};
     136
    132137} // namespace WebCore
  • trunk/Source/WebKit/mac/ChangeLog

    r206004 r206006  
     12016-09-15  Brady Eidson  <beidson@apple.com>
     2
     3        WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
     4        <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.h:
     9        * WebCoreSupport/WebFrameLoaderClient.mm:
     10        (WebFrameLoaderClient::dispatchDidCommitLoad):
     11
    1122016-09-15  Anders Carlsson  <andersca@apple.com>
    213
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h

    r205487 r206006  
    112112    void dispatchDidStartProvisionalLoad() override;
    113113    void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
    114     void dispatchDidCommitLoad() override;
     114    void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
    115115    void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
    116116    void dispatchDidFailLoad(const WebCore::ResourceError&) override;
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r204637 r206006  
    691691}
    692692
    693 void WebFrameLoaderClient::dispatchDidCommitLoad()
     693void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent>)
    694694{
    695695    // Tell the client we've committed this URL.
  • trunk/Source/WebKit/win/ChangeLog

    r205569 r206006  
     12016-09-15  Brady Eidson  <beidson@apple.com>
     2
     3        WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
     4        <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.cpp:
     9        (WebFrameLoaderClient::dispatchDidCommitLoad):
     10        * WebCoreSupport/WebFrameLoaderClient.h:
     11
    1122016-09-07  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp

    r204637 r206006  
    424424}
    425425
    426 void WebFrameLoaderClient::dispatchDidCommitLoad()
     426void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent>)
    427427{
    428428    WebView* webView = m_webFrame->webView();
  • trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h

    r204637 r206006  
    8787    void dispatchDidStartProvisionalLoad() override;
    8888    void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
    89     void dispatchDidCommitLoad() override;
     89    void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
    9090    void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
    9191    void dispatchDidFailLoad(const WebCore::ResourceError&) override;
  • trunk/Source/WebKit2/ChangeLog

    r206003 r206006  
     12016-09-15  Brady Eidson  <beidson@apple.com>
     2
     3        WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
     4        <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043
     5
     6        Reviewed by Brent Fulgham.
     7
     8        * Scripts/webkit/messages.py:
     9        (headers_for_type): Add a custom header, and alphabetize existing ones.
     10
     11        * Shared/WebCoreArgumentCoders.h: Add EnumTraits for HasInsecureContent.
     12
     13        * UIProcess/PageLoadState.h:
     14        (WebKit::PageLoadState::committedHasInsecureContent):
     15
     16        * UIProcess/WebPageProxy.cpp:
     17        (WebKit::WebPageProxy::hasInsecureContent):
     18        (WebKit::WebPageProxy::didCommitLoadForFrame): If the WebProcess included an existing "HasInsecureContent" value, use it.
     19        * UIProcess/WebPageProxy.h:
     20        * UIProcess/WebPageProxy.messages.in:
     21
     22        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     23        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
     24        (WebKit::WebFrameLoaderClient::savePlatformDataToCachedFrame): Save the "HasInsecureContent" value to the CachedFrame in
     25          case we restore it in the future.
     26        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
     27
    1282016-09-15  Anders Carlsson  <andersca@apple.com>
    229
  • trunk/Source/WebKit2/Scripts/webkit/messages.py

    r206000 r206006  
    350350        'WebCore::CompositionUnderline': ['<WebCore/Editor.h>'],
    351351        'WebCore::ExceptionDetails': ['<WebCore/JSDOMBinding.h>'],
     352        'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
    352353        'WebCore::GrammarDetail': ['<WebCore/TextCheckerClient.h>'],
    353         'WebCore::TextureMapperAnimations': ['<WebCore/TextureMapperAnimation.h>'],
     354        'WebCore::HasInsecureContent': ['<WebCore/FrameLoaderTypes.h>'],
     355        'WebCore::Highlight': ['<WebCore/InspectorOverlay.h>'],
    354356        'WebCore::KeyframeValueList': ['<WebCore/GraphicsLayer.h>'],
    355357        'WebCore::KeypressCommand': ['<WebCore/KeyboardEvent.h>'],
    356         'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
    357         'WebCore::Highlight': ['<WebCore/InspectorOverlay.h>'],
    358         'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
    359358        'WebCore::PasteboardImage': ['<WebCore/Pasteboard.h>'],
    360359        'WebCore::PasteboardWebContent': ['<WebCore/Pasteboard.h>'],
     360        'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
    361361        'WebCore::RecentSearch': ['<WebCore/SearchPopupMenu.h>'],
    362362        'WebCore::TextCheckingRequestData': ['<WebCore/TextChecking.h>'],
    363363        'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
    364364        'WebCore::TextIndicatorData': ['<WebCore/TextIndicator.h>'],
     365        'WebCore::TextureMapperAnimations': ['<WebCore/TextureMapperAnimation.h>'],
    365366        'WebCore::ViewportAttributes': ['<WebCore/ViewportArguments.h>'],
    366367        'WebKit::BackForwardListItemState': ['"SessionState.h"'],
     368        'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
    367369        'WebKit::PageState': ['"SessionState.h"'],
    368370        'WebKit::WebGestureEvent': ['"WebEvent.h"'],
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h

    r204668 r206006  
    2424 */
    2525
    26 #ifndef WebCoreArgumentCoders_h
    27 #define WebCoreArgumentCoders_h
     26#pragma once
    2827
    2928#include "ArgumentCoders.h"
     29#include <WebCore/FrameLoaderTypes.h>
    3030#include <WebCore/PaymentHeaders.h>
    3131
     
    531531} // namespace IPC
    532532
    533 #endif // WebCoreArgumentCoders_h
     533namespace WTF {
     534
     535template<> struct EnumTraits<WebCore::HasInsecureContent> {
     536    using values = EnumValues<
     537        WebCore::HasInsecureContent,
     538        WebCore::HasInsecureContent::No,
     539        WebCore::HasInsecureContent::Yes
     540    >;
     541};
     542
     543} // namespace WTF
  • trunk/Source/WebKit2/UIProcess/PageLoadState.h

    r191924 r206006  
    166166    void setNetworkRequestsInProgress(const Transaction::Token&, bool);
    167167
     168    bool committedHasInsecureContent() const { return m_committedState.hasInsecureContent; }
     169
    168170    // FIXME: We piggy-back off PageLoadState::Observer so that both WKWebView and WKObservablePageState
    169171    // can listen for changes. Once we get rid of WKObservablePageState these could just be part of API::NavigationClient.
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r206000 r206006  
    31073107}
    31083108
     3109void WebPageProxy::hasInsecureContent(HasInsecureContent& hasInsecureContent)
     3110{
     3111    hasInsecureContent = m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No;
     3112}
     3113
    31093114void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
    31103115{
     
    32433248}
    32443249
    3245 void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, const UserData& userData)
     3250void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<HasInsecureContent> hasInsecureContent, const UserData& userData)
    32463251{
    32473252    PageClientProtector protector(m_pageClient);
     
    32633268
    32643269    auto transaction = m_pageLoadState.transaction();
    3265     bool markPageInsecure = m_treatsSHA1CertificatesAsInsecure && certificateInfo.containsNonRootSHA1SignedCertificate();
    32663270    Ref<WebCertificateInfo> webCertificateInfo = WebCertificateInfo::create(certificateInfo);
     3271    bool markPageInsecure = hasInsecureContent ? hasInsecureContent.value() == HasInsecureContent::Yes : m_treatsSHA1CertificatesAsInsecure && certificateInfo.containsNonRootSHA1SignedCertificate();
     3272
    32673273    if (frame->isMainFrame()) {
    32683274        m_pageLoadState.didCommitLoad(transaction, webCertificateInfo, markPageInsecure);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r205934 r206006  
    154154class SharedBuffer;
    155155class TextIndicator;
     156enum class HasInsecureContent;
    156157struct DictionaryPopupInfo;
    157158struct ExceptionDetails;
     
    11731174    void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
    11741175    void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
    1175     void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
     1176    void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData&);
    11761177    void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
    11771178    void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
     
    11901191    void didFinishProgress();
    11911192    void setNetworkRequestsInProgress(bool);
     1193
     1194    void hasInsecureContent(WebCore::HasInsecureContent&);
    11921195
    11931196    void didDestroyNavigation(uint64_t navigationID);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r205934 r206006  
    127127    DidChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, String url)
    128128    DidFailProvisionalLoadForFrame(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, String provisionalURL, WebCore::ResourceError error, WebKit::UserData userData)
    129     DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, WebKit::UserData userData)
     129    DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, WebKit::UserData userData)
    130130    DidFailLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::UserData userData)
    131131    DidFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
     
    140140    DidSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t type, String url, WebKit::UserData userData)
    141141    DidDestroyNavigation(uint64_t navigationID)
     142
     143    HasInsecureContent() -> (enum WebCore::HasInsecureContent hasInsecureContent)
    142144
    143145    MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r205487 r206006  
    5656#include <JavaScriptCore/APICast.h>
    5757#include <JavaScriptCore/JSObject.h>
     58#include <WebCore/CachedFrame.h>
    5859#include <WebCore/CertificateInfo.h>
    5960#include <WebCore/Chrome.h>
     
    439440}
    440441
    441 void WebFrameLoaderClient::dispatchDidCommitLoad()
     442void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent> hasInsecureContent)
    442443{
    443444    WebPage* webPage = m_frame->page();
     
    454455
    455456    // Notify the UIProcess.
    456 
    457     webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), documentLoader.response().certificateInfo().valueOrCompute([] { return CertificateInfo(); }), m_frame->coreFrame()->document()->isPluginDocument(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
     457    webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), documentLoader.navigationID(), documentLoader.response().mimeType(), m_frameHasCustomContentProvider, static_cast<uint32_t>(m_frame->coreFrame()->loader().loadType()), documentLoader.response().certificateInfo().valueOrCompute([] { return CertificateInfo(); }), m_frame->coreFrame()->document()->isPluginDocument(), hasInsecureContent, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
    458458    webPage->didCommitLoad(m_frame);
    459459}
     
    12821282}
    12831283
    1284 void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame*)
    1285 {
     1284void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame* cachedFrame)
     1285{
     1286    WebPage* webPage = m_frame->page();
     1287    if (!webPage)
     1288        return;
     1289
     1290    HasInsecureContent hasInsecureContent;
     1291    if (webPage->sendSync(Messages::WebPageProxy::HasInsecureContent(), Messages::WebPageProxy::HasInsecureContent::Reply(hasInsecureContent)))
     1292        cachedFrame->setHasInsecureContent(hasInsecureContent);
    12861293}
    12871294
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h

    r205487 r206006  
    9797    void dispatchDidStartProvisionalLoad() override;
    9898    void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
    99     void dispatchDidCommitLoad() override;
     99    void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
    100100    void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
    101101    void dispatchDidFailLoad(const WebCore::ResourceError&) override;
Note: See TracChangeset for help on using the changeset viewer.