Skip to content
Permalink
Browse files
Stop using PolicyCallback
https://bugs.webkit.org/show_bug.cgi?id=176088

Reviewed by Andy Estes.

Source/WebCore:

This is what lambdas are for. No change in behavior.
Cancelling the callback is now the responsibility of the FrameLoaderClient, to whom we have given the lambda.
That is why there are changes in WebKit and WebKitLegacy where the FrameLoaderClient::cancelPolicyCheck finds the lambda it has stored.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
* loader/FrameLoader.cpp:
* loader/FrameLoaderClient.h:
* loader/PolicyCallback.cpp: Removed.
* loader/PolicyCallback.h: Removed.
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::continueAfterNavigationPolicy): Deleted.
* loader/PolicyChecker.h:
(WebCore::PolicyChecker::setSuggestedFilename): Deleted.

Source/WebKit:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::invalidatePolicyListener):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebInspector.cpp:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(-[WebFramePolicyListener invalidate]):
(-[WebFramePolicyListener receivedPolicyDecision:]):



Canonical link: https://commits.webkit.org/193766@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed Sep 25, 2017
1 parent 9114a02 commit e93a5617dcc3ad4fe47729b3d224ceb1049453ff
@@ -2116,7 +2116,6 @@ set(WebCore_SOURCES
loader/NavigationScheduler.cpp
loader/NetscapePlugInStreamLoader.cpp
loader/PingLoader.cpp
loader/PolicyCallback.cpp
loader/PolicyChecker.cpp
loader/ProgressTracker.cpp
loader/ResourceCryptographicDigest.cpp
@@ -1,3 +1,29 @@
2017-09-25 Alex Christensen <achristensen@webkit.org>

Stop using PolicyCallback
https://bugs.webkit.org/show_bug.cgi?id=176088

Reviewed by Andy Estes.

This is what lambdas are for. No change in behavior.
Cancelling the callback is now the responsibility of the FrameLoaderClient, to whom we have given the lambda.
That is why there are changes in WebKit and WebKitLegacy where the FrameLoaderClient::cancelPolicyCheck finds the lambda it has stored.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
* loader/FrameLoader.cpp:
* loader/FrameLoaderClient.h:
* loader/PolicyCallback.cpp: Removed.
* loader/PolicyCallback.h: Removed.
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::continueAfterNavigationPolicy): Deleted.
* loader/PolicyChecker.h:
(WebCore::PolicyChecker::setSuggestedFilename): Deleted.

2017-09-25 Youenn Fablet <youenn@apple.com>

MediaStreamTrack.getSettings should compute its deviceId/groupId like enumerateDevices
@@ -4105,8 +4105,6 @@
952076061F2675FE007D2AAB /* CallTracerTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 952076021F2675F9007D2AAB /* CallTracerTypes.h */; };
96ABA42314BCB80E00D56204 /* GraphicsContext3DOpenGLCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 96ABA42214BCB80E00D56204 /* GraphicsContext3DOpenGLCommon.cpp */; };
9703E1BF15DC4E37001F24C8 /* JSVoidCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E9EC8B15DC492F004F2E71 /* JSVoidCallback.cpp */; };
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97059973107D975200A50A7C /* PolicyCallback.cpp */; };
97059978107D975200A50A7C /* PolicyCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 97059974107D975200A50A7C /* PolicyCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97059975107D975200A50A7C /* PolicyChecker.cpp */; };
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 97059976107D975200A50A7C /* PolicyChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
970B728A144FFAC600F00A37 /* EventInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = 970B7289144FFAC600F00A37 /* EventInterfaces.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -12470,8 +12468,6 @@
952076011F2675F9007D2AAB /* CallTracer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallTracer.h; sourceTree = "<group>"; };
952076021F2675F9007D2AAB /* CallTracerTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CallTracerTypes.h; sourceTree = "<group>"; };
96ABA42214BCB80E00D56204 /* GraphicsContext3DOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DOpenGLCommon.cpp; sourceTree = "<group>"; };
97059973107D975200A50A7C /* PolicyCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyCallback.cpp; sourceTree = "<group>"; };
97059974107D975200A50A7C /* PolicyCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyCallback.h; sourceTree = "<group>"; };
97059975107D975200A50A7C /* PolicyChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyChecker.cpp; sourceTree = "<group>"; };
97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
970B7289144FFAC600F00A37 /* EventInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventInterfaces.h; sourceTree = "<group>"; };
@@ -24463,8 +24459,6 @@
656D372B0ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h */,
D0FF2A5B11F8C45A007E74E0 /* PingLoader.cpp */,
D0FF2A5C11F8C45A007E74E0 /* PingLoader.h */,
97059973107D975200A50A7C /* PolicyCallback.cpp */,
97059974107D975200A50A7C /* PolicyCallback.h */,
97059975107D975200A50A7C /* PolicyChecker.cpp */,
97059976107D975200A50A7C /* PolicyChecker.h */,
1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
@@ -29587,7 +29581,6 @@
B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */,
3FF813A71DBA8640009BF001 /* PointerLockController.h in Headers */,
84730D921248F0B300D3A9C9 /* PointLightSource.h in Headers */,
97059978107D975200A50A7C /* PolicyCallback.h in Headers */,
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */,
FD45A957175D414C00C21EC8 /* PolygonShape.h in Headers */,
5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */,
@@ -33578,7 +33571,6 @@
B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */,
5CFC4350192409E300A0D3B5 /* PointerLockController.cpp in Sources */,
A1E1154613015C4E0054AC8C /* PointLightSource.cpp in Sources */,
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */,
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */,
FD45A959175D417100C21EC8 /* PolygonShape.cpp in Sources */,
5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */,
@@ -75,6 +75,7 @@
#include "SubresourceLoader.h"
#include "TextResourceDecoder.h"
#include <wtf/Assertions.h>
#include <wtf/CompletionHandler.h>
#include <wtf/NeverDestroyed.h>
#include <wtf/Ref.h>
#include <wtf/text/CString.h>
@@ -119,6 +119,7 @@
#include "UserContentController.h"
#include "WindowFeatures.h"
#include "XMLDocumentParser.h"
#include <wtf/CompletionHandler.h>
#include <wtf/CurrentTime.h>
#include <wtf/Ref.h>
#include <wtf/StdLibExtras.h>
@@ -84,7 +84,6 @@ class MessageEvent;
class NavigationAction;
class Page;
class PluginViewBase;
class PolicyChecker;
class PreviewLoaderClient;
class ProtectionSpace;
class RTCPeerConnectionHandler;

This file was deleted.

This file was deleted.

0 comments on commit e93a561

Please sign in to comment.