⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238739 in webkit


Ignore:
Timestamp:
Nov 30, 2018, 9:09:37 AM (8 years ago)
Author:
aestes@apple.com
Message:

[Cocoa] Add some WKA extension points
​https://bugs.webkit.org/show_bug.cgi?id=192131
<rdar://problem/46330293>

Reviewed by Tim Horton.

Source/WebCore:

  • DerivedSources.make: Added an extension point for derived sources.
  • Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for

PaymentCoordinatorClient.

  • SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
  • WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
  • bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
  • page/SettingsBase.h: Added an extension point for settings.
  • platform/cocoa/WebCoreAdditions.mm: Added.

Source/WebKit:

  • DerivedSources.make: Added an extension point for WebPreferences.yaml.
  • Platform/IPC/MessageSender.h:

(IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.

  • Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
  • SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for

WebPaymentCoordinatorProxy.

  • WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
  • WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for

WebPaymentCoordinator.

Location:
trunk/Source
Files:
2 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238738 r238739  
     12018-11-30  Andy Estes  <aestes@apple.com>
     2
     3        [Cocoa] Add some WKA extension points
     4        https://bugs.webkit.org/show_bug.cgi?id=192131
     5        <rdar://problem/46330293>
     6
     7        Reviewed by Tim Horton.
     8
     9        * DerivedSources.make: Added an extension point for derived sources.
     10        * Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for
     11        PaymentCoordinatorClient.
     12        * SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
     13        * WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
     14        * bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
     15        * page/SettingsBase.h: Added an extension point for settings.
     16        * platform/cocoa/WebCoreAdditions.mm: Added.
     17
    1182018-11-30  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    219
  • trunk/Source/WebCore/DerivedSources.make

    r238722 r238739  
    11501150ADDITIONAL_EVENT_TARGET_FACTORY =
    11511151
     1152-include WebCoreDerivedSourcesAdditions.make
     1153
    11521154JS_BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
    11531155
  • trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h

    r238722 r238739  
    3232#include <wtf/Function.h>
    3333
     34#if USE(APPLE_INTERNAL_SDK)
     35#import <WebKitAdditions/PaymentCoordinatorClientAdditions.h>
     36#endif
     37
    3438namespace WebCore {
    3539
    … …  
    6367protected:
    6468    virtual ~PaymentCoordinatorClient() = default;
     69
     70#if defined(PAYMENTCOORDINATORCLIENT_ADDITIONS)
     71PAYMENTCOORDINATORCLIENT_ADDITIONS
     72#undef PAYMENTCOORDINATORCLIENT_ADDITIONS
     73#endif
    6574};
    6675
  • trunk/Source/WebCore/SourcesCocoa.txt

    r238722 r238739  
    214214platform/cocoa/VideoFullscreenModelVideoElement.mm
    215215platform/cocoa/VideoToolboxSoftLink.cpp
     216platform/cocoa/WebCoreAdditions.mm @no-unify
    216217platform/cocoa/WebCoreNSErrorExtras.mm
    217218
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r238722 r238739  
    29932993                A17D275E1EAC579800BF01E7 /* MediaSelectionOption.h in Headers */ = {isa = PBXBuildFile; fileRef = A17D275D1EAC579800BF01E7 /* MediaSelectionOption.h */; settings = {ATTRIBUTES = (Private, ); }; };
    29942994                A17FEE641F8893220021E811 /* PaymentSessionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A17FEE631F8893220021E811 /* PaymentSessionBase.h */; };
     2995                A180AD5B219F81B000DC039A /* WebCoreAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */; };
    29952996                A185B42A1E8211A100DC9118 /* PreviewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A185B4281E8211A100DC9118 /* PreviewLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
    29962997                A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */; };
    … …  
    1113211133                A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLElementFactory.h; path = DerivedSources/WebCore/HTMLElementFactory.h; sourceTree = BUILT_PRODUCTS_DIR; };
    1113311134                A17D275D1EAC579800BF01E7 /* MediaSelectionOption.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaSelectionOption.h; sourceTree = "<group>"; };
     11135                A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreAdditions.mm; sourceTree = "<group>"; };
    1113411136                A17FEE631F8893220021E811 /* PaymentSessionBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentSessionBase.h; sourceTree = "<group>"; };
    1113511137                A182D5B61BE722620087A7CC /* SettingsBaseCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsBaseCocoa.mm; sourceTree = "<group>"; };
    … …  
    2214422146                                CDC939A51E9BDFB100BB768D /* VideoToolboxSoftLink.cpp */,
    2214522147                                CDC939A61E9BDFB100BB768D /* VideoToolboxSoftLink.h */,
     22148                                A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */,
    2214622149                                CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */,
    2214722150                                CDC979F21C498C0900DB50D4 /* WebCoreNSErrorExtras.mm */,
    … …  
    3292932932                                DE5F861E1FA281FD006DB63A /* WebAccessibilityObjectWrapperBase.mm in Sources */,
    3293032933                                DE5F861D1FA2815B006DB63A /* WebAccessibilityObjectWrapperMac.mm in Sources */,
     32934                                A180AD5B219F81B000DC039A /* WebCoreAdditions.mm in Sources */,
    3293132935                                CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */,
    3293232936                                CD225C0B1C46FBF400140761 /* WebCoreNSURLSession.mm in Sources */,
  • trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

    r238722 r238739  
    11/*
    22 *  Copyright (c) 2015, Canon Inc. All rights reserved.
     3 *  Copyright (C) 2018 Apple Inc. All rights reserved.
    34 *
    45 *  Redistribution and use in source and binary forms, with or without
    … …  
    2930#include <JavaScriptCore/BuiltinUtils.h>
    3031
     32#if USE(APPLE_INTERNAL_SDK)
     33#include <WebKitAdditions/WebCoreBuiltinNamesAdditions.h>
     34#endif
     35
    3136namespace WebCore {
     37
     38#if !defined(WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS)
     39#define WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro)
     40#endif
    3241
    3342#define WEBCORE_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
    … …  
    342351    macro(webgpu) \
    343352    macro(window) \
    344     macro(writing)
     353    macro(writing) \
     354    WEBCORE_ADDITIONAL_PRIVATE_IDENTIFIERS(macro) \
    345355
    346356class WebCoreBuiltinNames {
  • trunk/Source/WebCore/page/SettingsBase.h

    r238722 r238739  
    208208    float m_maxTextAutosizingScaleIncrease { defaultMaxTextAutosizingScaleIncrease };
    209209#endif
     210
     211#if USE(APPLE_INTERNAL_SDK)
     212#include <WebKitAdditions/SettingsAdditions.h>
     213#endif
    210214};
    211215
  • trunk/Source/WebKit/ChangeLog

    r238729 r238739  
     12018-11-30  Andy Estes  <aestes@apple.com>
     2
     3        [Cocoa] Add some WKA extension points
     4        https://bugs.webkit.org/show_bug.cgi?id=192131
     5        <rdar://problem/46330293>
     6
     7        Reviewed by Tim Horton.
     8
     9        * DerivedSources.make: Added an extension point for WebPreferences.yaml.
     10        * Platform/IPC/MessageSender.h:
     11        (IPC::MessageSender::sendWithAsyncReply): Send async messages via IPC::MessageSender.
     12        * Platform/cocoa/WebKitAdditions.mm: A an extension point for additional WebKit sources.
     13        * SourcesCocoa.txt: Added WebKitAdditions.mm as non-unified source.
     14        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
     15        (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Called finishConstruction.
     16        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Added an extension point for
     17        WebPaymentCoordinatorProxy.
     18        * WebKit.xcodeproj/project.pbxproj: Added WebKitAdditions.mm.
     19        * WebProcess/ApplePay/WebPaymentCoordinator.h: Added an extension point for
     20        WebPaymentCoordinator.
     21
    1222018-11-30  Frederic Wang  <fwang@igalia.com>
    223
  • trunk/Source/WebKit/DerivedSources.make

    r238722 r238739  
    1 # Copyright (C) 2010-2017 Apple Inc. All rights reserved.
     1# Copyright (C) 2010-2018 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
    … …  
    291291# WebPreferences generation
    292292
     293WEB_PREFERENCES_INPUT_FILES = \
     294    $(WebKit2)/Shared/WebPreferences.yaml \
     295    $(ADDITIONAL_WEB_PREFERENCES_INPUT_FILES) \
     296#
     297WEB_PREFERENCES_COMBINED_INPUT_FILE = WebPreferencesCombined.yaml
     298
    293299WEB_PREFERENCES_TEMPLATES = \
    294300    $(WebKit2)/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb \
    … …  
    303309WEB_PREFERENCES_PATTERNS = $(subst .,%,$(WEB_PREFERENCES_FILES))
    304310
    305 all : $(WEB_PREFERENCES_FILES)
    306 
    307 $(WEB_PREFERENCES_PATTERNS) : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WebKit2)/Shared/WebPreferences.yaml
    308         $(RUBY) $< --input $(WebKit2)/Shared/WebPreferences.yaml
     311all : $(WEB_PREFERENCES_FILES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
     312
     313$(WEB_PREFERENCES_COMBINED_INPUT_FILE) : $(WEB_PREFERENCES_INPUT_FILES)
     314        cat $^ > $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
     315
     316$(WEB_PREFERENCES_PATTERNS) : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
     317        $(RUBY) $< --input $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
  • trunk/Source/WebKit/Platform/IPC/MessageSender.h

    r238722 r238739  
    11/*
    2  * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
    … …  
    6767
    6868    template<typename T, typename... Args>
    69     void sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& args, uint64_t destinationID = 0)
     69    void sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler)
    7070    {
    71         ASSERT(messageSenderConnection());
    72 
    73         messageSenderConnection()->sendWithAsyncReply(WTFMove(message), WTFMove(args), destinationID);
     71        messageSenderConnection()->sendWithAsyncReply(WTFMove(message), WTFMove(completionHandler), messageSenderDestinationID());
    7472    }
    7573
  • trunk/Source/WebKit/SourcesCocoa.txt

    r238722 r238739  
    6363Platform/cocoa/SharedMemoryCocoa.cpp
    6464Platform/cocoa/WKCrashReporter.mm
     65Platform/cocoa/WebKitAdditions.mm @no-unify
    6566
    6667Platform/foundation/LoggingFoundation.mm
  • trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp

    r238722 r238739  
    4545{
    4646    m_webPageProxy.process().addMessageReceiver(Messages::WebPaymentCoordinatorProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
     47    finishConstruction(*this);
    4748}
    4849
  • trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h

    r238722 r238739  
    3333#include <wtf/RetainPtr.h>
    3434#include <wtf/WeakPtr.h>
     35
     36#if USE(APPLE_INTERNAL_SDK)
     37#import <WebKitAdditions/WebPaymentCoordinatorProxyAdditions.h>
     38#endif
    3539
    3640namespace IPC {
    … …  
    151155    RetainPtr<NSObject *> m_sheetWindowWillCloseObserver;
    152156#endif
     157   
     158#if defined(WEBPAYMENTCOORDINATORPROXY_ADDITIONS)
     159WEBPAYMENTCOORDINATORPROXY_ADDITIONS
     160#undef WEBPAYMENTCOORDINATORPROXY_ADDITIONS
     161#else
     162    void finishConstruction(WebPaymentCoordinatorProxy&) { }
     163#endif
    153164};
    154165
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r238722 r238739  
    12711271                A15EEDE61E301CEE000069B0 /* WKPasswordView.h in Headers */ = {isa = PBXBuildFile; fileRef = A15EEDE41E301CEE000069B0 /* WKPasswordView.h */; };
    12721272                A175C44A21AA3171000037D0 /* ArgumentCodersCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = A175C44921AA3170000037D0 /* ArgumentCodersCocoa.h */; };
     1273                A181A79821ACC74B0059A316 /* WebKitAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A181A79721ACAC610059A316 /* WebKitAdditions.mm */; };
    12731274                A182D5B51BE6BD250087A7CC /* AccessibilityIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = A182D5B31BE6BD250087A7CC /* AccessibilityIOS.h */; };
    12741275                A19DD3C01D07D16800AC823B /* _WKWebViewPrintFormatterInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A19DD3BF1D07D16800AC823B /* _WKWebViewPrintFormatterInternal.h */; };
    … …  
    38373838                A175C44921AA3170000037D0 /* ArgumentCodersCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersCocoa.h; sourceTree = "<group>"; };
    38383839                A175C44B21AA331B000037D0 /* ArgumentCodersCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ArgumentCodersCocoa.mm; sourceTree = "<group>"; };
     3840                A181A79721ACAC610059A316 /* WebKitAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitAdditions.mm; sourceTree = "<group>"; };
    38393841                A182D5B21BE6BD250087A7CC /* AccessibilityIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityIOS.mm; sourceTree = "<group>"; };
    38403842                A182D5B31BE6BD250087A7CC /* AccessibilityIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityIOS.h; sourceTree = "<group>"; };
    … …  
    63596361                        children = (
    63606362                                4450AEBF1DC3FAE5009943F2 /* SharedMemoryCocoa.cpp */,
     6363                                A181A79721ACAC610059A316 /* WebKitAdditions.mm */,
    63616364                                A1FB68221F6E518200C43F9F /* WKCrashReporter.h */,
    63626365                                A1FB68231F6E518200C43F9F /* WKCrashReporter.mm */,
    … …  
    91139116                                2D50366B1BCDE17900E20BB3 /* NativeWebGestureEvent.h in Headers */,
    91149117                                263172CF18B469490065B9C3 /* NativeWebTouchEvent.h in Headers */,
    9115                                 637281A221ADC744009E0DE6 /* WKDownloadProgress.h in Headers */,
    91169118                                1ADCB86B189831B30022EE5A /* NavigationActionData.h in Headers */,
    91179119                                1ABC3DF61899E437004F0626 /* NavigationState.h in Headers */,
    … …  
    96739675                                BC017D2116263308007054F5 /* WKDOMTextIterator.h in Headers */,
    96749676                                1AB7D78D1288CD9A00CFD08C /* WKDownload.h in Headers */,
     9677                                637281A221ADC744009E0DE6 /* WKDownloadProgress.h in Headers */,
    96759678                                F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */,
    96769679                                2DC18FAD218910490025A88D /* WKDrawingView.h in Headers */,
    … …  
    1079310796                                CDA29A281CBEB67A00901CCF /* PlaybackSessionManagerMessageReceiver.cpp in Sources */,
    1079410797                                CDA29A2A1CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp in Sources */,
    10795                                 637281A321ADC744009E0DE6 /* WKDownloadProgress.mm in Sources */,
    1079610798                                2D913449212CF9F000128AFD /* Plugin.cpp in Sources */,
    1079710799                                1A8EF4CC1252403700F7067F /* PluginControllerProxy.cpp in Sources */,
    … …  
    1104011042                                1A6280F31919982A006AD9F9 /* WebKit.m in Sources */,
    1104111043                                2D92A78B212B6AB100F493FD /* WebKit2Initialize.cpp in Sources */,
     11044                                A181A79821ACC74B0059A316 /* WebKitAdditions.mm in Sources */,
    1104211045                                51F060E11654318500F3282F /* WebMDNSRegisterMessageReceiver.cpp in Sources */,
    1104311046                                2D92A78C212B6AB100F493FD /* WebMouseEvent.cpp in Sources */,
    … …  
    1108011083                                2D931169212F61B200044BFE /* WKContentView.mm in Sources */,
    1108111084                                2D93116A212F61B500044BFE /* WKContentViewInteraction.mm in Sources */,
     11085                                637281A321ADC744009E0DE6 /* WKDownloadProgress.mm in Sources */,
    1108211086                                5CA26D83217AD1B800F97A35 /* WKSafeBrowsingWarning.mm in Sources */,
    1108311087                                1DB01944211CF005009FB3E8 /* WKShareSheet.mm in Sources */,
  • trunk/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h

    r238722 r238739  
    9797
    9898    std::optional<AvailablePaymentNetworksSet> m_availablePaymentNetworks;
     99
     100#if USE(APPLE_INTERNAL_SDK)
     101#import <WebKitAdditions/WebPaymentCoordinatorAdditions.h>
     102#endif
    99103};
    100104
Note: See TracChangeset for help on using the changeset viewer.