Changeset 265037 in webkit


Ignore:
Timestamp:
Jul 29, 2020 4:55:11 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, reverting r265018.
https://bugs.webkit.org/show_bug.cgi?id=214917

Broke various ios-wk2 tests.

Reverted changeset:

"Migrate App-Bound Domains code from WebKit Additions"
https://bugs.webkit.org/show_bug.cgi?id=214889
https://trac.webkit.org/changeset/265018

Location:
trunk
Files:
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r265029 r265037  
     12020-07-29  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r265018.
     4        https://bugs.webkit.org/show_bug.cgi?id=214917
     5
     6        Broke various ios-wk2 tests.
     7
     8        Reverted changeset:
     9
     10        "Migrate App-Bound Domains code from WebKit Additions"
     11        https://bugs.webkit.org/show_bug.cgi?id=214889
     12        https://trac.webkit.org/changeset/265018
     13
    1142020-07-28  Ryan Haddad  <ryanhaddad@apple.com>
    215
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r265018 r265037  
    17981798
    17991799webkit.org/b/214598 fast/scrolling/ios/autoscroll-input-when-very-zoomed.html [ Pass Failure ]
    1800 
    1801 http/tests/in-app-browser-privacy/ [ Pass ]
  • trunk/Source/WebKit/ChangeLog

    r265035 r265037  
     12020-07-29  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r265018.
     4        https://bugs.webkit.org/show_bug.cgi?id=214917
     5
     6        Broke various ios-wk2 tests.
     7
     8        Reverted changeset:
     9
     10        "Migrate App-Bound Domains code from WebKit Additions"
     11        https://bugs.webkit.org/show_bug.cgi?id=214889
     12        https://trac.webkit.org/changeset/265018
     13
    1142020-07-29  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r265018 r265037  
    3030#import "AuthenticationManager.h"
    3131#import "DataReference.h"
    32 #import "DefaultWebBrowserChecks.h"
    3332#import "Download.h"
    3433#import "LegacyCustomProtocolManager.h"
     
    6564#else
    6665#define NETWORK_SESSION_COCOA_ADDITIONS_1
     66#define NETWORK_SESSION_COCOA_ADDITIONS_2 true
    6767#endif
    6868
     
    11531153}
    11541154
    1155 #if HAVE(SESSION_CLEANUP)
    1156 static void activateSessionCleanup(NetworkSessionCocoa& session, const NetworkSessionCreationParameters& parameters)
    1157 {
    1158 #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
    1159     // Don't override an explicitly set value.
    1160     if (parameters.resourceLoadStatisticsParameters.isItpStateExplicitlySet)
    1161         return;
    1162 
    1163 #if !PLATFORM(IOS_FAMILY_SIMULATOR)
    1164     auto parentAuditToken = session.networkProcess().parentProcessConnection()->getAuditToken();
    1165     RELEASE_ASSERT(parentAuditToken); // This should be impossible.
    1166 
    1167     bool itpEnabled = doesParentProcessHaveITPEnabled(parentAuditToken);
    1168     bool passedEnabledState = session.isResourceLoadStatisticsEnabled();
    1169 
    1170     if (itpEnabled != passedEnabledState)
    1171         WTFLogAlways("Passed ITP enabled state (%d) does not match TCC setting (%d)\n", itpEnabled, passedEnabledState);
    1172     session.setResourceLoadStatisticsEnabled(passedEnabledState);
    1173 #endif
    1174 #endif
    1175 }
    1176 #endif
    1177 
    11781155NetworkSessionCocoa::NetworkSessionCocoa(NetworkProcess& networkProcess, NetworkSessionCreationParameters&& parameters)
    11791156    : NetworkSession(networkProcess, parameters)
     
    13161293{
    13171294    auto shouldBeConsideredAppBound = isNavigatingToAppBoundDomain ? *isNavigatingToAppBoundDomain : NavigatingToAppBoundDomain::Yes;
    1318     if (isParentProcessAFullWebBrowser(networkProcess().parentProcessConnection()->getAuditToken()))
     1295    if (NETWORK_SESSION_COCOA_ADDITIONS_2)
    13191296        shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
    13201297#if ENABLE(RESOURCE_LOAD_STATISTICS)
  • trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp

    r265018 r265037  
    2727#include "APIHTTPCookieStore.h"
    2828
    29 #if PLATFORM(IOS_FAMILY)
    30 #include "DefaultWebBrowserChecks.h"
    31 #endif
    32 
    3329#include "WebCookieManagerProxy.h"
    3430#include "WebProcessPool.h"
     
    4036#include <WebCore/NetworkStorageSession.h>
    4137
     38#if USE(APPLE_INTERNAL_SDK)
     39#include <WebKitAdditions/HTTPCookieStoreAdditions.h>
     40#else
     41#define IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED false
     42#endif
     43
    4244using namespace WebKit;
    4345
     
    6567#if PLATFORM(IOS_FAMILY)
    6668    m_owningDataStore->getAppBoundDomains([cookies, appBoundCookies = WTFMove(appBoundCookies), completionHandler = WTFMove(completionHandler)] (auto& domains) mutable {
    67         if (!domains.isEmpty() && !isFullWebBrowser()) {
     69        if (!domains.isEmpty() && IMPLEMENT_IN_APP_BROWSER_PRIVACY_ENABLED) {
    6870            for (auto& cookie : cookies) {
    6971                if (domains.contains(WebCore::RegistrableDomain::uncheckedCreateFromHost(cookie.domain)))
  • trunk/Source/WebKit/UIProcess/API/APIPageConfiguration.cpp

    r265018 r265037  
    3636#include "WebUserContentControllerProxy.h"
    3737
     38#if USE(APPLE_INTERNAL_SDK)
     39#include <WebKitAdditions/PageConfigurationAdditions.h>
     40#else
     41#define PAGE_CONFIGURATION_ADDITIONS
     42#endif
     43
    3844#if ENABLE(APPLICATION_MANIFEST)
    3945#include "APIApplicationManifest.h"
     
    4955
    5056PageConfiguration::PageConfiguration()
     57PAGE_CONFIGURATION_ADDITIONS
    5158{
    5259}
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r265018 r265037  
    289289#endif
    290290
    291 #if PLATFORM(COCOA)
    292 #include "DefaultWebBrowserChecks.h"
     291#if USE(APPLE_INTERNAL_SDK)
     292#include <WebKitAdditions/WebPageProxyAdditions.h>
     293#else
     294static bool isFullWebBrowser() { return true; }
     295#if PLATFORM(IOS_FAMILY)
     296static bool hasProhibitedUsageStrings() { return false; }
     297#endif
    293298#endif
    294299
     
    13921397    RELEASE_LOG_IF_ALLOWED(Loading, "loadData:");
    13931398
    1394 #if PLATFORM(IOS_FAMILY)
    13951399    if (MIMEType == "text/html"_s && !isFullWebBrowser())
    13961400        m_limitsNavigationsToAppBoundDomains = true;
    1397 #endif
    13981401
    13991402    if (m_isClosed) {
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r265018 r265037  
    127127
    128128#if PLATFORM(COCOA)
    129 #include "DefaultWebBrowserChecks.h"
    130129#include "VersionChecks.h"
    131130#include <WebCore/GameControllerGamepadProvider.h>
     
    141140#ifndef NDEBUG
    142141#include <wtf/RefCountedLeakCounter.h>
     142#endif
     143
     144#if USE(APPLE_INTERNAL_SDK)
     145#include <WebKitAdditions/WebProcessPoolAdditions.h>
     146#else
     147#define WEB_PROCESS_POOL_ADDITIONS
     148#define WEB_PROCESS_POOL_ADDITIONS_2
     149#define WEB_PROCESS_POOL_ADDITIONS_3
     150#define WEB_PROCESS_POOL_ADDITIONS_4
    143151#endif
    144152
     
    248256    , m_alwaysRunsAtBackgroundPriority(m_configuration->alwaysRunsAtBackgroundPriority())
    249257    , m_shouldTakeUIBackgroundAssertion(m_configuration->shouldTakeUIBackgroundAssertion())
     258    WEB_PROCESS_POOL_ADDITIONS
    250259    , m_userObservablePageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
    251260    , m_processSuppressionDisabledForPageCounter([this](RefCounterEvent) { updateProcessSuppressionState(); })
     
    263272        WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true);
    264273        Process::setIdentifier(WebCore::ProcessIdentifier::generate());
    265 #if PLATFORM(COCOA)
    266         determineITPState();
    267 #endif
     274        WEB_PROCESS_POOL_ADDITIONS_4
    268275    });
    269276
     
    607614    HashSet<WebCore::RegistrableDomain> appBoundDomains;
    608615    WebCore::RegistrableDomain manualPrevalentResource;
    609 
    610 #if PLATFORM(COCOA)
    611     m_tccPreferenceEnabled = doesAppHaveITPEnabled();
    612     if (withWebsiteDataStore && !withWebsiteDataStore->isItpStateExplicitlySet()) {
    613         enableResourceLoadStatistics = m_tccPreferenceEnabled;
    614         withWebsiteDataStore->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
    615     } else if (m_websiteDataStore && !m_websiteDataStore->isItpStateExplicitlySet()) {
    616         enableResourceLoadStatistics = m_tccPreferenceEnabled;
    617         m_websiteDataStore->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
    618     } else if (WebsiteDataStore::defaultDataStoreExists() && !WebsiteDataStore::defaultDataStore()->isItpStateExplicitlySet()) {
    619         enableResourceLoadStatistics = m_tccPreferenceEnabled;
    620         WebsiteDataStore::defaultDataStore()->setResourceLoadStatisticsEnabled(enableResourceLoadStatistics);
    621     } else
    622         enableResourceLoadStatistics = m_tccPreferenceEnabled;
    623 #endif
    624 
     616    WEB_PROCESS_POOL_ADDITIONS_2
    625617    if (withWebsiteDataStore) {
    626618        enableResourceLoadStatistics = withWebsiteDataStore->resourceLoadStatisticsEnabled();
     
    893885WebProcessProxy& WebProcessPool::createNewWebProcess(WebsiteDataStore* websiteDataStore, WebProcessProxy::IsPrewarmed isPrewarmed)
    894886{
    895 #if PLATFORM(COCOA)
    896     m_tccPreferenceEnabled = doesAppHaveITPEnabled();
    897     if (websiteDataStore && !websiteDataStore->isItpStateExplicitlySet())
    898         websiteDataStore->setResourceLoadStatisticsEnabled(m_tccPreferenceEnabled);
    899 #endif
    900 
     887    WEB_PROCESS_POOL_ADDITIONS_3
    901888    auto processProxy = WebProcessProxy::create(*this, websiteDataStore, isPrewarmed);
    902889    auto& process = processProxy.get();
  • trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm

    r265018 r265037  
    2828
    2929#import "CookieStorageUtilsCF.h"
    30 #import "DefaultWebBrowserChecks.h"
    3130#import "SandboxUtilities.h"
    3231#import "StorageManager.h"
     
    4746#import <wtf/text/StringBuilder.h>
    4847
     48#if USE(APPLE_INTERNAL_SDK)
     49#import <WebKitAdditions/WebsiteDataStoreAdditions.h>
     50#else
     51#define WEBSITE_DATA_STORE_ADDITIONS
     52#endif
     53
    4954#if PLATFORM(IOS_FAMILY)
    5055#import <UIKit/UIApplication.h>
     
    459464}
    460465
    461 void WebsiteDataStore::addTestDomains() const
    462 {
    463     if (appBoundDomains().isEmpty()) {
    464         auto bundleID = WebCore::applicationBundleIdentifier();
    465         auto appBoundDomainsTesting = getAppBoundDomainsTesting(bundleID);
    466         if (appBoundDomainsTesting) {
    467             for (auto& domain : *appBoundDomainsTesting)
    468                 appBoundDomains().add(domain);
    469         }
    470     }
    471 }
    472 
    473466void WebsiteDataStore::ensureAppBoundDomains(CompletionHandler<void(const HashSet<WebCore::RegistrableDomain>&, const HashSet<String>&)>&& completionHandler) const
    474467{
    475468    if (hasInitializedAppBoundDomains) {
    476469        if (m_isInAppBrowserPrivacyTestModeEnabled) {
    477             addTestDomains();
     470            WEBSITE_DATA_STORE_ADDITIONS;
    478471        }
    479472        completionHandler(appBoundDomains(), appBoundSchemes());
     
    487480            ASSERT(hasInitializedAppBoundDomains);
    488481            if (m_isInAppBrowserPrivacyTestModeEnabled) {
    489                 addTestDomains();
     482                WEBSITE_DATA_STORE_ADDITIONS;
    490483            }
    491484            completionHandler(appBoundDomains(), appBoundSchemes());
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h

    r265018 r265037  
    313313    enum class ForceReinitialization : bool { No, Yes };
    314314    void initializeAppBoundDomains(ForceReinitialization = ForceReinitialization::No);
    315     void addTestDomains() const;
    316315
    317316    void fetchDataAndApply(OptionSet<WebsiteDataType>, OptionSet<WebsiteDataFetchOption>, RefPtr<WorkQueue>&&, Function<void(Vector<WebsiteDataRecord>)>&& apply);
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r265018 r265037  
    964964                49BCA19523A18CFD0028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19023A175490028A836 /* _WKResourceLoadStatisticsFirstPartyInternal.h */; };
    965965                49BCA19723A1930D0028A836 /* APIResourceLoadStatisticsThirdParty.h in Headers */ = {isa = PBXBuildFile; fileRef = 49BCA19623A18F620028A836 /* APIResourceLoadStatisticsThirdParty.h */; };
    966                 49DAA38C24CBA1A800793D75 /* DefaultWebBrowserChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */; };
    967966                49ECA41C23FCA5D80023358D /* PolicyDecision.h in Headers */ = {isa = PBXBuildFile; fileRef = 49ECA41B23FCA4860023358D /* PolicyDecision.h */; };
    968967                49FBEFFD239B011D00BD032F /* _WKResourceLoadStatisticsFirstParty.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FBEFFC239B011D00BD032F /* _WKResourceLoadStatisticsFirstParty.mm */; };
     
    35883587                49BCA19123A177660028A836 /* APIResourceLoadStatisticsFirstParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIResourceLoadStatisticsFirstParty.h; sourceTree = "<group>"; };
    35893588                49BCA19623A18F620028A836 /* APIResourceLoadStatisticsThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIResourceLoadStatisticsThirdParty.h; sourceTree = "<group>"; };
    3590                 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DefaultWebBrowserChecks.mm; sourceTree = "<group>"; };
    3591                 49DAA38D24CBA1BD00793D75 /* DefaultWebBrowserChecks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DefaultWebBrowserChecks.h; sourceTree = "<group>"; };
    35923589                49ECA41B23FCA4860023358D /* PolicyDecision.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PolicyDecision.h; sourceTree = "<group>"; };
    35933590                49FBEFFA239AD97800BD032F /* _WKResourceLoadStatisticsThirdParty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _WKResourceLoadStatisticsThirdParty.h; sourceTree = "<group>"; };
     
    74877484                                C55F916C1C595E440029E92D /* DataDetectionResult.h */,
    74887485                                C55F916D1C595E440029E92D /* DataDetectionResult.mm */,
    7489                                 49DAA38D24CBA1BD00793D75 /* DefaultWebBrowserChecks.h */,
    7490                                 49DAA38B24CBA1A800793D75 /* DefaultWebBrowserChecks.mm */,
    74917486                                CE550E132283744400D28791 /* InsertTextOptions.cpp */,
    74927487                                CE550E12228373C800D28791 /* InsertTextOptions.h */,
     
    1273612731                                2D92A77E212B6A7100F493FD /* DataReference.cpp in Sources */,
    1273712732                                2D92A77F212B6A7100F493FD /* Decoder.cpp in Sources */,
    12738                                 49DAA38C24CBA1A800793D75 /* DefaultWebBrowserChecks.mm in Sources */,
    1273912733                                2D0C56FE229F1DEA00BD33E7 /* DeviceManagementSoftLink.mm in Sources */,
    1274012734                                1AB7D6191288B9D900CFD08C /* DownloadProxyMessageReceiver.cpp in Sources */,
  • trunk/Tools/ChangeLog

    r265035 r265037  
     12020-07-29  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, reverting r265018.
     4        https://bugs.webkit.org/show_bug.cgi?id=214917
     5
     6        Broke various ios-wk2 tests.
     7
     8        Reverted changeset:
     9
     10        "Migrate App-Bound Domains code from WebKit Additions"
     11        https://bugs.webkit.org/show_bug.cgi?id=214889
     12        https://trac.webkit.org/changeset/265018
     13
    1142020-07-29  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm

    r265018 r265037  
    4646#if PLATFORM(IOS_FAMILY)
    4747
     48#if USE(APPLE_INTERNAL_SDK)
     49#import <WebKitAdditions/InAppBrowserPrivacyTestAdditions.h>
     50
    4851static bool isDone;
    4952
     
    129132{
    130133    WebCore::clearApplicationBundleIdentifierTestingOverride();
    131     WebCore::setApplicationBundleIdentifier("com.apple.WebKit.TestWebKitAPI");
     134    IN_APP_BROWSER_PRIVACY_ADDITIONS_2
    132135}
    133136
     
    136139    WTF::initializeMainThread();
    137140    WebCore::clearApplicationBundleIdentifierTestingOverride();
    138     WebCore::setApplicationBundleIdentifier("inAppBrowserPrivacyTestIdentifier");
     141    IN_APP_BROWSER_PRIVACY_ADDITIONS
    139142}
    140143
     
    13361339}
    13371340
     1341#endif // USE(APPLE_INTERNAL_SDK)
     1342
    13381343#endif // PLATFORM(IOS_FAMILY)
Note: See TracChangeset for help on using the changeset viewer.