Diff
Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/ChangeLog 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog 2016-09-16 21:43:13 UTC (rev 206053)
@@ -1,3 +1,38 @@
+2016-09-16 Babak Shafiei <bshaf...@apple.com>
+
+ Merge r206006. rdar://problem/27991573
+
+ 2016-09-15 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ 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:
+
2016-09-14 Babak Shafiei <bshaf...@apple.com>
Merge r205938. rdar://problem/28227805
Modified: branches/safari-602-branch/Source/WebCore/history/CachedFrame.cpp (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/history/CachedFrame.cpp 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/history/CachedFrame.cpp 2016-09-16 21:43:13 UTC (rev 206053)
@@ -280,6 +280,11 @@
return m_cachedFramePlatformData.get();
}
+void CachedFrame::setHasInsecureContent(HasInsecureContent hasInsecureContent)
+{
+ m_hasInsecureContent = hasInsecureContent;
+}
+
int CachedFrame::descendantFrameCount() const
{
int count = m_childFrames.size();
Modified: branches/safari-602-branch/Source/WebCore/history/CachedFrame.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/history/CachedFrame.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/history/CachedFrame.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -39,6 +39,7 @@
class DocumentLoader;
class FrameView;
class Node;
+enum class HasInsecureContent;
class CachedFrameBase {
public:
@@ -61,7 +62,8 @@
std::unique_ptr<CachedFramePlatformData> m_cachedFramePlatformData;
bool m_isMainFrame;
bool m_isComposited;
-
+ Optional<HasInsecureContent> m_hasInsecureContent;
+
Vector<std::unique_ptr<CachedFrame>> m_childFrames;
};
@@ -77,6 +79,9 @@
WEBCORE_EXPORT void setCachedFramePlatformData(std::unique_ptr<CachedFramePlatformData>);
WEBCORE_EXPORT CachedFramePlatformData* cachedFramePlatformData();
+ WEBCORE_EXPORT void setHasInsecureContent(HasInsecureContent);
+ Optional<HasInsecureContent> hasInsecureContent() const { return m_hasInsecureContent; }
+
using CachedFrameBase::document;
using CachedFrameBase::view;
using CachedFrameBase::url;
Modified: branches/safari-602-branch/Source/WebCore/loader/EmptyClients.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/loader/EmptyClients.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/loader/EmptyClients.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -295,7 +295,7 @@
void dispatchDidReceiveIcon() override { }
void dispatchDidStartProvisionalLoad() override { }
void dispatchDidReceiveTitle(const StringWithDirection&) override { }
- void dispatchDidCommitLoad() override { }
+ void dispatchDidCommitLoad(Optional<HasInsecureContent>) override { }
void dispatchDidFailProvisionalLoad(const ResourceError&) override { }
void dispatchDidFailLoad(const ResourceError&) override { }
void dispatchDidFinishDocumentLoad() override { }
Modified: branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp 2016-09-16 21:43:13 UTC (rev 206053)
@@ -639,7 +639,7 @@
void FrameLoader::receivedFirstData()
{
- dispatchDidCommitLoad();
+ dispatchDidCommitLoad(Nullopt);
dispatchDidClearWindowObjectsInAllWorlds();
dispatchGlobalObjectAvailableInAllWorlds();
@@ -1830,10 +1830,12 @@
requestFromDelegate(mainResourceRequest, mainResourceIdentifier, mainResouceError);
notifier().dispatchDidReceiveResponse(cachedPage->documentLoader(), mainResourceIdentifier, cachedPage->documentLoader()->response());
+ Optional<HasInsecureContent> hasInsecureContent = cachedPage->cachedMainFrame()->hasInsecureContent();
+
// FIXME: This API should be turned around so that we ground CachedPage into the Page.
cachedPage->restore(*m_frame.page());
- dispatchDidCommitLoad();
+ dispatchDidCommitLoad(hasInsecureContent);
#if PLATFORM(IOS)
m_frame.page()->chrome().setDispatchViewportDataDidChangeSuppressed(false);
m_frame.page()->chrome().dispatchViewportPropertiesDidChange(m_frame.page()->viewportArguments());
@@ -3530,12 +3532,12 @@
#endif
}
-void FrameLoader::dispatchDidCommitLoad()
+void FrameLoader::dispatchDidCommitLoad(Optional<HasInsecureContent> initialHasInsecureContent)
{
if (m_stateMachine.creatingInitialEmptyDocument())
return;
- m_client.dispatchDidCommitLoad();
+ m_client.dispatchDidCommitLoad(initialHasInsecureContent);
if (m_frame.isMainFrame()) {
m_frame.page()->resetSeenPlugins();
Modified: branches/safari-602-branch/Source/WebCore/loader/FrameLoader.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/loader/FrameLoader.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/loader/FrameLoader.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -49,6 +49,7 @@
namespace WebCore {
class Archive;
+class CachedFrame;
class CachedFrameBase;
class CachedPage;
class CachedResource;
@@ -349,7 +350,7 @@
bool shouldReloadToHandleUnreachableURL(DocumentLoader*);
- void dispatchDidCommitLoad();
+ void dispatchDidCommitLoad(Optional<HasInsecureContent> initialHasInsecureContent);
void urlSelected(const FrameLoadRequest&, Event*);
Modified: branches/safari-602-branch/Source/WebCore/loader/FrameLoaderClient.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/loader/FrameLoaderClient.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/loader/FrameLoaderClient.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -164,7 +164,7 @@
virtual void dispatchDidReceiveIcon() = 0;
virtual void dispatchDidStartProvisionalLoad() = 0;
virtual void dispatchDidReceiveTitle(const StringWithDirection&) = 0;
- virtual void dispatchDidCommitLoad() = 0;
+ virtual void dispatchDidCommitLoad(Optional<HasInsecureContent>) = 0;
virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
virtual void dispatchDidFailLoad(const ResourceError&) = 0;
virtual void dispatchDidFinishDocumentLoad() = 0;
Modified: branches/safari-602-branch/Source/WebCore/loader/FrameLoaderTypes.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebCore/loader/FrameLoaderTypes.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebCore/loader/FrameLoaderTypes.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -130,4 +130,9 @@
No
};
+enum class HasInsecureContent {
+ Yes,
+ No,
+};
+
} // namespace WebCore
Modified: branches/safari-602-branch/Source/WebKit/mac/ChangeLog (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/mac/ChangeLog 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/mac/ChangeLog 2016-09-16 21:43:13 UTC (rev 206053)
@@ -1,5 +1,20 @@
2016-09-16 Babak Shafiei <bshaf...@apple.com>
+ Merge r206006. rdar://problem/27991573
+
+ 2016-09-15 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+
+2016-09-16 Babak Shafiei <bshaf...@apple.com>
+
Merge r205991. rdar://problem/28272353
2016-09-15 Beth Dakin <bda...@apple.com>
Modified: branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -111,7 +111,7 @@
void dispatchDidReceiveIcon() override;
void dispatchDidStartProvisionalLoad() override;
void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
- void dispatchDidCommitLoad() override;
+ void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
void dispatchDidFailLoad(const WebCore::ResourceError&) override;
void dispatchDidFinishDocumentLoad() override;
Modified: branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2016-09-16 21:43:13 UTC (rev 206053)
@@ -685,7 +685,7 @@
CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title.string(), m_webFrame.get());
}
-void WebFrameLoaderClient::dispatchDidCommitLoad()
+void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent>)
{
// Tell the client we've committed this URL.
ASSERT([m_webFrame->_private->webFrameView documentView] != nil);
Modified: branches/safari-602-branch/Source/WebKit/win/ChangeLog (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/win/ChangeLog 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/win/ChangeLog 2016-09-16 21:43:13 UTC (rev 206053)
@@ -1,3 +1,18 @@
+2016-09-16 Babak Shafiei <bshaf...@apple.com>
+
+ Merge r206006. rdar://problem/27991573
+
+ 2016-09-15 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+
2016-09-09 Babak Shafiei <bshaf...@apple.com>
Merge r205393. rdar://problem/27806012
Modified: branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp 2016-09-16 21:43:13 UTC (rev 206053)
@@ -423,7 +423,7 @@
frameLoadDelegate->didReceiveTitle(webView, BString(title.string()), m_webFrame);
}
-void WebFrameLoaderClient::dispatchDidCommitLoad()
+void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent>)
{
WebView* webView = m_webFrame->webView();
COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
Modified: branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -86,7 +86,7 @@
void dispatchDidReceiveIcon() override;
void dispatchDidStartProvisionalLoad() override;
void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
- void dispatchDidCommitLoad() override;
+ void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
void dispatchDidFailLoad(const WebCore::ResourceError&) override;
void dispatchDidFinishDocumentLoad() override;
Modified: branches/safari-602-branch/Source/WebKit2/ChangeLog (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/ChangeLog 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/ChangeLog 2016-09-16 21:43:13 UTC (rev 206053)
@@ -1,5 +1,36 @@
2016-09-16 Babak Shafiei <bshaf...@apple.com>
+ Merge r206006. rdar://problem/27991573
+
+ 2016-09-15 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ * 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:
+
+2016-09-16 Babak Shafiei <bshaf...@apple.com>
+
Merge r206003. rdar://problem/27991573
2016-09-15 Anders Carlsson <ander...@apple.com>
Modified: branches/safari-602-branch/Source/WebKit2/Scripts/webkit/messages.py (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/Scripts/webkit/messages.py 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/Scripts/webkit/messages.py 2016-09-16 21:43:13 UTC (rev 206053)
@@ -358,22 +358,24 @@
'String': ['<wtf/text/WTFString.h>'],
'WebCore::CompositionUnderline': ['<WebCore/Editor.h>'],
'WebCore::ExceptionDetails': ['<WebCore/JSDOMBinding.h>'],
+ 'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
'WebCore::GrammarDetail': ['<WebCore/TextCheckerClient.h>'],
- 'WebCore::TextureMapperAnimations': ['<WebCore/TextureMapperAnimation.h>'],
+ 'WebCore::HasInsecureContent': ['<WebCore/FrameLoaderTypes.h>'],
+ 'WebCore::Highlight': ['<WebCore/InspectorOverlay.h>'],
'WebCore::KeyframeValueList': ['<WebCore/GraphicsLayer.h>'],
'WebCore::KeypressCommand': ['<WebCore/KeyboardEvent.h>'],
- 'WebCore::FileChooserSettings': ['<WebCore/FileChooser.h>'],
- 'WebCore::Highlight': ['<WebCore/InspectorOverlay.h>'],
- 'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
'WebCore::PasteboardImage': ['<WebCore/Pasteboard.h>'],
'WebCore::PasteboardWebContent': ['<WebCore/Pasteboard.h>'],
+ 'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
'WebCore::RecentSearch': ['<WebCore/SearchPopupMenu.h>'],
'WebCore::TextCheckingRequestData': ['<WebCore/TextChecking.h>'],
'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
'WebCore::TextIndicatorData': ['<WebCore/TextIndicator.h>'],
+ 'WebCore::TextureMapperAnimations': ['<WebCore/TextureMapperAnimation.h>'],
'WebCore::ViewportAttributes': ['<WebCore/ViewportArguments.h>'],
'WebKit::BackForwardListItemState': ['"SessionState.h"'],
'WebKit::InjectedBundleUserMessageEncoder': [],
+ 'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
'WebKit::PageState': ['"SessionState.h"'],
'WebKit::WebContextUserMessageEncoder': [],
'WebKit::WebGestureEvent': ['"WebEvent.h"'],
Modified: branches/safari-602-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -23,10 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebCoreArgumentCoders_h
-#define WebCoreArgumentCoders_h
+#pragma once
#include "ArgumentCoders.h"
+#include <WebCore/FrameLoaderTypes.h>
#include <WebCore/PaymentHeaders.h>
namespace WebCore {
@@ -530,4 +530,14 @@
} // namespace IPC
-#endif // WebCoreArgumentCoders_h
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::HasInsecureContent> {
+ using values = EnumValues<
+ WebCore::HasInsecureContent,
+ WebCore::HasInsecureContent::No,
+ WebCore::HasInsecureContent::Yes
+ >;
+};
+
+} // namespace WTF
Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/PageLoadState.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/UIProcess/PageLoadState.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/PageLoadState.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -165,6 +165,8 @@
void didFinishProgress(const Transaction::Token&);
void setNetworkRequestsInProgress(const Transaction::Token&, bool);
+ bool committedHasInsecureContent() const { return m_committedState.hasInsecureContent; }
+
// FIXME: We piggy-back off PageLoadState::Observer so that both WKWebView and WKObservablePageState
// can listen for changes. Once we get rid of WKObservablePageState these could just be part of API::NavigationClient.
void willChangeProcessIsResponsive();
Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp 2016-09-16 21:43:13 UTC (rev 206053)
@@ -3080,6 +3080,11 @@
m_pageLoadState.setNetworkRequestsInProgress(transaction, networkRequestsInProgress);
}
+void WebPageProxy::hasInsecureContent(HasInsecureContent& hasInsecureContent)
+{
+ hasInsecureContent = m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No;
+}
+
void WebPageProxy::didDestroyNavigation(uint64_t navigationID)
{
PageClientProtector protector(m_pageClient);
@@ -3216,7 +3221,7 @@
}
}
-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)
+void 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)
{
PageClientProtector protector(m_pageClient);
@@ -3236,8 +3241,9 @@
#endif
auto transaction = m_pageLoadState.transaction();
- bool markPageInsecure = m_treatsSHA1CertificatesAsInsecure && certificateInfo.containsNonRootSHA1SignedCertificate();
Ref<WebCertificateInfo> webCertificateInfo = WebCertificateInfo::create(certificateInfo);
+ bool markPageInsecure = hasInsecureContent ? hasInsecureContent.value() == HasInsecureContent::Yes : m_treatsSHA1CertificatesAsInsecure && certificateInfo.containsNonRootSHA1SignedCertificate();
+
if (frame->isMainFrame()) {
m_pageLoadState.didCommitLoad(transaction, webCertificateInfo, markPageInsecure);
m_suppressNavigationSnapshotting = false;
Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -153,6 +153,7 @@
class RunLoopObserver;
class SharedBuffer;
class TextIndicator;
+enum class HasInsecureContent;
struct DictionaryPopupInfo;
struct ExceptionDetails;
struct FileChooserSettings;
@@ -1166,7 +1167,7 @@
void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, const String&, const UserData&);
void didChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, const String& url);
void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
- void didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo&, bool containsPluginDocument, const UserData&);
+ 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&);
void didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
void didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData&);
void didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const WebCore::ResourceError&, const UserData&);
@@ -1184,6 +1185,8 @@
void didFinishProgress();
void setNetworkRequestsInProgress(bool);
+ void hasInsecureContent(WebCore::HasInsecureContent&);
+
void didDestroyNavigation(uint64_t navigationID);
void decidePolicyForNavigationAction(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const NavigationActionData&, uint64_t originatingFrameID, const WebCore::SecurityOriginData& originatingFrameSecurityOrigin, const WebCore::ResourceRequest& originalRequest, const WebCore::ResourceRequest&, uint64_t listenerID, const UserData&, bool& receivedPolicyAction, uint64_t& newNavigationID, uint64_t& policyAction, DownloadID&);
Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2016-09-16 21:43:13 UTC (rev 206053)
@@ -126,7 +126,7 @@
DidReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, String url, WebKit::UserData userData)
DidChangeProvisionalURLForFrame(uint64_t frameID, uint64_t navigationID, String url)
DidFailProvisionalLoadForFrame(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, uint64_t navigationID, String provisionalURL, WebCore::ResourceError error, WebKit::UserData userData)
- DidCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, String mimeType, bool hasCustomContentProvider, uint32_t loadType, WebCore::CertificateInfo certificateInfo, bool containsPluginDocument, WebKit::UserData userData)
+ 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)
DidFailLoadForFrame(uint64_t frameID, uint64_t navigationID, WebCore::ResourceError error, WebKit::UserData userData)
DidFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
DidFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
@@ -140,6 +140,8 @@
DidSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t type, String url, WebKit::UserData userData)
DidDestroyNavigation(uint64_t navigationID)
+ HasInsecureContent() -> (enum WebCore::HasInsecureContent hasInsecureContent)
+
MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
FrameDidBecomeFrameSet(uint64_t frameID, bool value)
Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2016-09-16 21:43:13 UTC (rev 206053)
@@ -55,6 +55,7 @@
#include "WebProcessPoolMessages.h"
#include <_javascript_Core/APICast.h>
#include <_javascript_Core/JSObject.h>
+#include <WebCore/CachedFrame.h>
#include <WebCore/CertificateInfo.h>
#include <WebCore/Chrome.h>
#include <WebCore/DOMWrapperWorld.h>
@@ -438,7 +439,7 @@
webPage->send(Messages::WebPageProxy::DidReceiveTitleForFrame(m_frame->frameID(), title.string(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
}
-void WebFrameLoaderClient::dispatchDidCommitLoad()
+void WebFrameLoaderClient::dispatchDidCommitLoad(Optional<HasInsecureContent> hasInsecureContent)
{
WebPage* webPage = m_frame->page();
if (!webPage)
@@ -453,8 +454,7 @@
webPage->sandboxExtensionTracker().didCommitProvisionalLoad(m_frame);
// Notify the UIProcess.
-
- 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())));
+ 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())));
webPage->didCommitLoad(m_frame);
}
@@ -1281,8 +1281,15 @@
return webPage->userAgent(m_frame, url);
}
-void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame*)
+void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame* cachedFrame)
{
+ WebPage* webPage = m_frame->page();
+ if (!webPage)
+ return;
+
+ HasInsecureContent hasInsecureContent;
+ if (webPage->sendSync(Messages::WebPageProxy::HasInsecureContent(), Messages::WebPageProxy::HasInsecureContent::Reply(hasInsecureContent)))
+ cachedFrame->setHasInsecureContent(hasInsecureContent);
}
void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(CachedFrame*)
Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (206052 => 206053)
--- branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:04 UTC (rev 206052)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2016-09-16 21:43:13 UTC (rev 206053)
@@ -96,7 +96,7 @@
void dispatchDidReceiveIcon() override;
void dispatchDidStartProvisionalLoad() override;
void dispatchDidReceiveTitle(const WebCore::StringWithDirection&) override;
- void dispatchDidCommitLoad() override;
+ void dispatchDidCommitLoad(Optional<WebCore::HasInsecureContent>) override;
void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&) override;
void dispatchDidFailLoad(const WebCore::ResourceError&) override;
void dispatchDidFinishDocumentLoad() override;