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

Changeset 279477 in webkit


Ignore:
Timestamp:
Jul 1, 2021, 12:37:13 PM (5 years ago)
Author:
graouts@webkit.org
Message:

[Model] Restrict IPC calls to ARKit SPI availability and runtime flag
​https://bugs.webkit.org/show_bug.cgi?id=227581

Reviewed by Tim Horton.

Source/WebCore:

Guard all IPC calls related to <model> by the most appropriate platform-specific flag
and also ensure that those calls don't do anything unless the runtime flag is also
enabled.

  • Modules/model-element/HTMLModelElement.cpp:
  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElementCocoa.mm:

(WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):

  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::modelElementDidCreatePreview const):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Source/WebKit:

Guard all IPC calls related to <model> by the most appropriate platform-specific flag
and also ensure that those calls don't do anything unless the runtime flag is also
enabled.

  • Shared/WebProcessDataStoreParameters.h:

(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:

(WebKit::ModelElementController::takeModelElementFullscreen):
(WebKit::ModelElementController::modelElementDidCreatePreview):

  • UIProcess/ModelElementController.cpp:
  • UIProcess/ModelElementController.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::takeModelElementFullscreen):
(WebKit::WebPageProxy::modelElementDidCreatePreview):
(WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::webProcessDataStoreParameters):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
(WebKit::WebsiteDataStoreConfiguration::copy const):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::modelElementDidCreatePreview const):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::modelElementPreviewDidObtainContextId):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setWebsiteDataStoreParameters):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformSetWebsiteDataStoreParameters):

Source/WTF:

Define a new compile-time flag when either of the iOS or macOS ARKit SPIs are available.

  • wtf/PlatformHave.h:
Location:
trunk/Source
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r279475 r279477  
     12021-07-01  Antoine Quint  <graouts@webkit.org>
     2
     3        [Model] Restrict IPC calls to ARKit SPI availability and runtime flag
     4        https://bugs.webkit.org/show_bug.cgi?id=227581
     5
     6        Reviewed by Tim Horton.
     7
     8        Define a new compile-time flag when either of the iOS or macOS ARKit SPIs are available.
     9
     10        * wtf/PlatformHave.h:
     11
    1122021-07-01  Aditya Keerthi  <akeerthi@apple.com>
    213
  • trunk/Source/WTF/wtf/PlatformHave.h

    r279475 r279477  
    10191019#define HAVE_ARKIT_INLINE_PREVIEW_MAC 1
    10201020#endif
     1021
     1022#if defined(HAVE_ARKIT_INLINE_PREVIEW_IOS) || defined(HAVE_ARKIT_INLINE_PREVIEW_MAC)
     1023#define HAVE_ARKIT_INLINE_PREVIEW 1
     1024#endif
    10211025#endif
    10221026
  • trunk/Source/WebCore/ChangeLog

    r279472 r279477  
     12021-07-01  Antoine Quint  <graouts@webkit.org>
     2
     3        [Model] Restrict IPC calls to ARKit SPI availability and runtime flag
     4        https://bugs.webkit.org/show_bug.cgi?id=227581
     5
     6        Reviewed by Tim Horton.
     7
     8        Guard all IPC calls related to <model> by the most appropriate platform-specific flag
     9        and also ensure that those calls don't do anything unless the runtime flag is also
     10        enabled.
     11
     12        * Modules/model-element/HTMLModelElement.cpp:
     13        * Modules/model-element/HTMLModelElement.h:
     14        * Modules/model-element/HTMLModelElementCocoa.mm:
     15        (WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):
     16        * loader/EmptyClients.cpp:
     17        (WebCore::EmptyChromeClient::modelElementDidCreatePreview const):
     18        * loader/EmptyClients.h:
     19        * page/ChromeClient.h:
     20
    1212021-07-01  Youenn Fablet  <youenn@apple.com>
    222
  • trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp

    r279451 r279477  
    168168}
    169169
     170#if HAVE(ARKIT_INLINE_PREVIEW)
    170171static String& sharedModelElementCacheDirectory()
    171172{
    … …  
    183184    return sharedModelElementCacheDirectory();
    184185}
     186#endif
    185187
    186188// MARK: - DOM overrides.
  • trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h

    r279451 r279477  
    6262    RefPtr<Model> model() const;
    6363
     64#if HAVE(ARKIT_INLINE_PREVIEW)
    6465    WEBCORE_EXPORT static void setModelElementCacheDirectory(const String&);
    6566    WEBCORE_EXPORT static const String& modelElementCacheDirectory();
     67#endif
    6668
    6769#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
  • trunk/Source/WebCore/Modules/model-element/HTMLModelElementCocoa.mm

    r279451 r279477  
    3535#include "RenderLayer.h"
    3636#include "RenderLayerModelObject.h"
     37#include "Settings.h"
    3738#include <pal/spi/mac/SystemPreviewSPI.h>
    3839#include <wtf/FileSystem.h>
    … …  
    108109void HTMLModelElement::inlinePreviewDidObtainContextId(const String& uuid, uint32_t contextId)
    109110{
     111    if (!document().settings().modelElementEnabled())
     112        return;
     113
    110114    if (uuid != (String)[m_inlinePreview uuid].UUIDString) {
    111115        LOG(ModelElement, "HTMLModelElement::inlinePreviewDidObtainContextId() UUID mismatch, received %s but expected %s.", uuid.utf8().data(), ((String)[m_inlinePreview uuid].UUIDString).utf8().data());
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r279451 r279477  
    579579}
    580580
    581 #if ENABLE(MODEL_ELEMENT)
    582 
     581#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    583582void EmptyChromeClient::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const
    584583{
    585584}
    586 
     585#endif
     586
     587#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    587588void EmptyChromeClient::modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const
    588589{
    589590}
    590 
    591591#endif
    592592
  • trunk/Source/WebCore/loader/EmptyClients.h

    r279451 r279477  
    217217    bool shouldNotifyOnFormChanges() final { return false; }
    218218
    219 #if ENABLE(MODEL_ELEMENT)
     219#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    220220    void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const final;
    221221#endif
    … …  
    223223    RefPtr<Icon> createIconForFiles(const Vector<String>& /* filenames */) final { return nullptr; }
    224224
    225 #if ENABLE(MODEL_ELEMENT)
     225#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    226226    void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const final;
    227227#endif
  • trunk/Source/WebCore/page/ChromeClient.h

    r279451 r279477  
    7979#endif
    8080
    81 #if ENABLE(MODEL_ELEMENT)
     81#if HAVE(ARKIT_INLINE_PREVIEW)
    8282class HTMLModelElement;
    8383#endif
    … …  
    601601#endif
    602602
    603 #if ENABLE(MODEL_ELEMENT)
     603#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    604604    virtual void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const { }
     605#endif
     606#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    605607    virtual void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const { };
    606608#endif
  • trunk/Source/WebKit/ChangeLog

    r279476 r279477  
     12021-07-01  Antoine Quint  <graouts@webkit.org>
     2
     3        [Model] Restrict IPC calls to ARKit SPI availability and runtime flag
     4        https://bugs.webkit.org/show_bug.cgi?id=227581
     5
     6        Reviewed by Tim Horton.
     7
     8        Guard all IPC calls related to <model> by the most appropriate platform-specific flag
     9        and also ensure that those calls don't do anything unless the runtime flag is also
     10        enabled.
     11
     12        * Shared/WebProcessDataStoreParameters.h:
     13        (WebKit::WebProcessDataStoreParameters::encode const):
     14        (WebKit::WebProcessDataStoreParameters::decode):
     15        * UIProcess/Cocoa/ModelElementControllerCocoa.mm:
     16        (WebKit::ModelElementController::takeModelElementFullscreen):
     17        (WebKit::ModelElementController::modelElementDidCreatePreview):
     18        * UIProcess/ModelElementController.cpp:
     19        * UIProcess/ModelElementController.h:
     20        * UIProcess/PageClient.h:
     21        * UIProcess/WebPageProxy.cpp:
     22        (WebKit::WebPageProxy::didAttachToRunningProcess):
     23        (WebKit::WebPageProxy::resetState):
     24        (WebKit::WebPageProxy::takeModelElementFullscreen):
     25        (WebKit::WebPageProxy::modelElementDidCreatePreview):
     26        (WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):
     27        * UIProcess/WebPageProxy.h:
     28        * UIProcess/WebPageProxy.messages.in:
     29        * UIProcess/WebProcessPool.cpp:
     30        (WebKit::WebProcessPool::webProcessDataStoreParameters):
     31        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
     32        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     33        (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
     34        * UIProcess/WebsiteData/WebsiteDataStore.h:
     35        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
     36        (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
     37        (WebKit::WebsiteDataStoreConfiguration::copy const):
     38        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
     39        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     40        (WebKit::WebChromeClient::modelElementDidCreatePreview const):
     41        * WebProcess/WebCoreSupport/WebChromeClient.h:
     42        * WebProcess/WebPage/WebPage.cpp:
     43        (WebKit::WebPage::modelElementPreviewDidObtainContextId):
     44        * WebProcess/WebPage/WebPage.h:
     45        * WebProcess/WebPage/WebPage.messages.in:
     46        * WebProcess/WebProcess.cpp:
     47        (WebKit::WebProcess::setWebsiteDataStoreParameters):
     48        * WebProcess/cocoa/WebProcessCocoa.mm:
     49        (WebKit::WebProcess::platformSetWebsiteDataStoreParameters):
     50
    1512021-07-01  Per Arne  <pvollan@apple.com>
    252
  • trunk/Source/WebKit/Shared/WebProcessDataStoreParameters.h

    r279267 r279477  
    5252    HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccessQuirk;
    5353#endif
    54 #if ENABLE(MODEL_ELEMENT)
     54#if HAVE(ARKIT_INLINE_PREVIEW)
    5555    String modelElementCacheDirectory;
    5656    SandboxExtension::Handle modelElementCacheDirectoryExtensionHandle;
    … …  
    8080    encoder << domainsWithStorageAccessQuirk;
    8181#endif
    82 #if ENABLE(MODEL_ELEMENT)
     82#if HAVE(ARKIT_INLINE_PREVIEW)
    8383    encoder << modelElementCacheDirectory;
    8484    encoder << modelElementCacheDirectoryExtensionHandle;
    … …  
    151151        return std::nullopt;
    152152#endif
    153 #if ENABLE(MODEL_ELEMENT)
     153#if HAVE(ARKIT_INLINE_PREVIEW)
    154154        String modelElementCacheDirectory;
    155155        if (!decoder.decode(modelElementCacheDirectory))
    … …  
    182182        WTFMove(*domainsWithStorageAccessQuirk),
    183183#endif
    184 #if ENABLE(MODEL_ELEMENT)
     184#if HAVE(ARKIT_INLINE_PREVIEW)
    185185        WTFMove(modelElementCacheDirectory),
    186186        WTFMove(*modelElementCacheDirectoryExtensionHandle),
  • trunk/Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm

    r279451 r279477  
    2727#import "ModelElementController.h"
    2828
    29 #if ENABLE(MODEL_ELEMENT)
     29#if HAVE(ARKIT_INLINE_PREVIEW)
    3030
    3131#import "Logging.h"
    … …  
    5656void ModelElementController::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId)
    5757{
     58    if (!m_webPageProxy->preferences().modelElementEnabled())
     59        return;
     60
    5861    if (!is<RemoteLayerTreeDrawingAreaProxy>(m_webPageProxy.drawingArea()))
    5962        return;
    … …  
    124127void ModelElementController::modelElementDidCreatePreview(const WebCore::ElementContext& context, const URL& fileURL, const String& uuid, const WebCore::FloatSize& size)
    125128{
     129    if (!m_webPageProxy.preferences().modelElementEnabled())
     130        return;
     131
    126132    auto preview = adoptNS([allocASVInlinePreviewInstance() initWithFrame:CGRectMake(0, 0, size.width(), size.height()) UUID:[[NSUUID alloc] initWithUUIDString:uuid]]);
    127133
  • trunk/Source/WebKit/UIProcess/ModelElementController.cpp

    r279420 r279477  
    2727#include "ModelElementController.h"
    2828
    29 #if ENABLE(MODEL_ELEMENT)
     29#if HAVE(ARKIT_INLINE_PREVIEW)
    3030
    3131#include "WebPageProxy.h"
  • trunk/Source/WebKit/UIProcess/ModelElementController.h

    r279451 r279477  
    2626#pragma once
    2727
    28 #if ENABLE(MODEL_ELEMENT)
     28#if HAVE(ARKIT_INLINE_PREVIEW)
    2929
    3030#include <WebCore/ElementContext.h>
    … …  
    5252    void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId);
    5353#endif
    54 
    5554#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    5655    void modelElementDidCreatePreview(const WebCore::ElementContext&, const URL&, const String&, const WebCore::FloatSize&);
  • trunk/Source/WebKit/UIProcess/PageClient.h

    r279451 r279477  
    133133struct TranslationContextMenuInfo;
    134134#endif
    135 
    136 #if ENABLE(MODEL_ELEMENT)
    137 struct ElementContext;
    138 #endif
    139135}
    140136
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r279451 r279477  
    10241024#endif
    10251025
    1026 #if ENABLE(MODEL_ELEMENT)
    1027     ASSERT(!m_modelElementController);
    1028     m_modelElementController = makeUnique<ModelElementController>(*this);
     1026#if HAVE(ARKIT_INLINE_PREVIEW)
     1027    if (m_preferences->modelElementEnabled()) {
     1028        ASSERT(!m_modelElementController);
     1029        m_modelElementController = makeUnique<ModelElementController>(*this);
     1030    }
    10291031#endif
    10301032
    … …  
    77777779#endif
    77787780
    7779 #if ENABLE(MODEL_ELEMENT)
     7781#if HAVE(ARKIT_INLINE_PREVIEW)
    77807782    m_modelElementController = nullptr;
    77817783#endif
    … …  
    1068910691#endif
    1069010692
    10691 #if ENABLE(MODEL_ELEMENT)
    10692 
     10693#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    1069310694void WebPageProxy::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId)
    1069410695{
    10695 #if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    1069610696    modelElementController()->takeModelElementFullscreen(contentLayerId);
    10697 #endif
    10698 }
    10699 
     10697}
     10698#endif
     10699
     10700#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    1070010701void WebPageProxy::modelElementDidCreatePreview(const WebCore::ElementContext& context, const URL& url, const String& uuid, const FloatSize& size)
    1070110702{
    10702 #if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    1070310703    modelElementController()->modelElementDidCreatePreview(context, url, uuid, size);
    10704 #endif
    1070510704}
    1070610705
    … …  
    1071010709        send(Messages::WebPage::ModelElementPreviewDidObtainContextId(context, uuid, contextId));
    1071110710}
    10712 
    1071310711#endif
    1071410712
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r279451 r279477  
    190190#endif
    191191
    192 #if ENABLE(MODEL_ELEMENT)
     192#if HAVE(ARKIT_INLINE_PREVIEW)
    193193#include "ModelElementController.h"
    194194#endif
    … …  
    574574#endif
    575575
    576 #if ENABLE(MODEL_ELEMENT)
     576#if HAVE(ARKIT_INLINE_PREVIEW)
    577577    ModelElementController* modelElementController() { return m_modelElementController.get(); }
     578#endif
     579#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    578580    void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId);
     581#endif
     582#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    579583    void modelElementDidCreatePreview(const WebCore::ElementContext&, const URL&, const String&, const WebCore::FloatSize&);
    580584    void modelElementPreviewDidObtainContextId(const WebCore::ElementContext&, const String&, uint32_t);
    … …  
    26092613#endif
    26102614
    2611 #if ENABLE(MODEL_ELEMENT)
     2615#if HAVE(ARKIT_INLINE_PREVIEW)
    26122616    std::unique_ptr<ModelElementController> m_modelElementController;
    26132617#endif
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r279451 r279477  
    594594#endif
    595595
    596 #if ENABLE(MODEL_ELEMENT)
     596#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    597597    TakeModelElementFullscreen(uint64_t contentLayerID)
     598#endif
     599#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    598600    ModelElementDidCreatePreview(struct WebCore::ElementContext elementContext, URL url, String uuid, WebCore::FloatSize size)
    599601#endif
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r279354 r279477  
    696696        SandboxExtension::createHandleWithoutResolvingPath(javaScriptConfigurationDirectory, SandboxExtension::Type::ReadWrite, javaScriptConfigurationDirectoryExtensionHandle);
    697697
    698 #if ENABLE(MODEL_ELEMENT)
     698#if HAVE(ARKIT_INLINE_PREVIEW)
    699699    auto modelElementCacheDirectory = websiteDataStore.resolvedModelElementCacheDirectory();
    700700    SandboxExtension::Handle modelElementCacheDirectoryExtensionHandle;
    … …  
    719719        m_domainsWithCrossPageStorageAccessQuirk,
    720720#endif
    721 #if ENABLE(MODEL_ELEMENT)
     721#if HAVE(ARKIT_INLINE_PREVIEW)
    722722        WTFMove(modelElementCacheDirectory),
    723723        WTFMove(modelElementCacheDirectoryExtensionHandle),
  • trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm

    r279267 r279477  
    322322}
    323323
    324 #if ENABLE(MODEL_ELEMENT)
     324#if HAVE(ARKIT_INLINE_PREVIEW)
    325325WTF::String WebsiteDataStore::defaultModelElementCacheDirectory()
    326326{
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

    r279354 r279477  
    266266    if (!m_configuration->hstsStorageDirectory().isEmpty() && m_resolvedConfiguration->hstsStorageDirectory().isEmpty())
    267267        m_resolvedConfiguration->setHSTSStorageDirectory(resolvePathForSandboxExtension(m_configuration->hstsStorageDirectory()));
    268 #if ENABLE(MODEL_ELEMENT)
     268#if HAVE(ARKIT_INLINE_PREVIEW)
    269269    if (!m_configuration->modelElementCacheDirectory().isEmpty())
    270270        m_resolvedConfiguration->setModelElementCacheDirectory(resolveAndCreateReadWriteDirectoryForSandboxExtension(m_configuration->modelElementCacheDirectory()));
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h

    r279267 r279477  
    254254    const String& resolvedResourceLoadStatisticsDirectory() const { return m_resolvedConfiguration->resourceLoadStatisticsDirectory(); }
    255255    const String& resolvedHSTSStorageDirectory() const { return m_resolvedConfiguration->hstsStorageDirectory(); }
    256 #if ENABLE(MODEL_ELEMENT)
     256#if HAVE(ARKIT_INLINE_PREVIEW)
    257257    const String& resolvedModelElementCacheDirectory() const { return m_resolvedConfiguration->modelElementCacheDirectory(); }
    258258#endif
    … …  
    333333    static WTF::String defaultHSTSDirectory();
    334334#endif
    335 #if ENABLE(MODEL_ELEMENT)
     335#if HAVE(ARKIT_INLINE_PREVIEW)
    336336    static WTF::String defaultModelElementCacheDirectory();
    337337#endif
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp

    r279267 r279477  
    4848        setDeviceIdHashSaltsStorageDirectory(WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory());
    4949        setJavaScriptConfigurationDirectory(WebsiteDataStore::defaultJavaScriptConfigurationDirectory());
    50 #if ENABLE(MODEL_ELEMENT)
     50#if HAVE(ARKIT_INLINE_PREVIEW)
    5151        setModelElementCacheDirectory(WebsiteDataStore::defaultModelElementCacheDirectory());
    5252#endif
    … …  
    101101        copy->m_proxyConfiguration = adoptCF(CFDictionaryCreateCopy(nullptr, this->m_proxyConfiguration.get()));
    102102#endif
    103 #if ENABLE(MODEL_ELEMENT)
     103#if HAVE(ARKIT_INLINE_PREVIEW)
    104104    copy->m_modelElementCacheDirectory = this->m_modelElementCacheDirectory;
    105105#endif
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h

    r279267 r279477  
    7575    void setLocalStorageDirectory(String&& directory) { m_localStorageDirectory = WTFMove(directory); }
    7676
    77 #if ENABLE(MODEL_ELEMENT)
     77#if HAVE(ARKIT_INLINE_PREVIEW)
    7878    const String& modelElementCacheDirectory() const { return m_modelElementCacheDirectory; }
    7979    void setModelElementCacheDirectory(String&& directory) { m_modelElementCacheDirectory = WTFMove(directory); }
    … …  
    185185    String m_webSQLDatabaseDirectory;
    186186    String m_hstsStorageDirectory;
    187 #if ENABLE(MODEL_ELEMENT)
     187#if HAVE(ARKIT_INLINE_PREVIEW)
    188188    String m_modelElementCacheDirectory;
    189189#endif
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r279451 r279477  
    15161516}
    15171517
    1518 #if ENABLE(MODEL_ELEMENT)
    1519 
     1518#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    15201519void WebChromeClient::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) const
    15211520{
    15221521    m_page.takeModelElementFullscreen(contentLayerId);
    15231522}
    1524 
     1523#endif
     1524
     1525#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    15251526void WebChromeClient::modelElementDidCreatePreview(WebCore::HTMLModelElement& element, const URL& url, const String& uuid, const WebCore::FloatSize& size) const
    15261527{
    15271528    m_page.modelElementDidCreatePreview(element, url, uuid, size);
    15281529}
    1529 
    15301530#endif
    15311531
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h

    r279451 r279477  
    453453#endif
    454454
    455 #if ENABLE(MODEL_ELEMENT)
     455#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    456456    void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) const final;
     457#endif
     458#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    457459    void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const final;
    458460#endif
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r279451 r279477  
    270270#endif
    271271
    272 #if ENABLE(MODEL_ELEMENT)
     272#if HAVE(ARKIT_INLINE_PREVIEW)
    273273#include <WebCore/HTMLModelElement.h>
    274274#endif
    … …  
    76797679#endif
    76807680
    7681 #if ENABLE(MODEL_ELEMENT)
    7682 
     7681#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    76837682void WebPage::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId)
    76847683{
    76857684    send(Messages::WebPageProxy::TakeModelElementFullscreen(contentLayerId));
    76867685}
    7687 
     7686#endif
     7687
     7688#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    76887689void WebPage::modelElementDidCreatePreview(WebCore::HTMLModelElement& element, const URL& url, const String& uuid, const WebCore::FloatSize& size)
    76897690{
    … …  
    76947695void WebPage::modelElementPreviewDidObtainContextId(const WebCore::ElementContext& elementContext, const String& uuid, uint32_t contextId)
    76957696{
    7696 #if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    76977697    auto element = elementForContext(elementContext);
    76987698    if (is<WebCore::HTMLModelElement>(element))
    76997699        downcast<WebCore::HTMLModelElement>(*element).inlinePreviewDidObtainContextId(uuid, contextId);
    7700 #else
    7701     UNUSED_PARAM(elementContext);
    7702     UNUSED_PARAM(uuid);
    7703     UNUSED_PARAM(contextId);
    7704 #endif
    7705 }
    7706 
     7700}
    77077701#endif
    77087702
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r279451 r279477  
    211211class VisiblePosition;
    212212
    213 #if ENABLE(MODEL_ELEMENT)
     213#if HAVE(ARKIT_INLINE_PREVIEW)
    214214class HTMLModelElement;
    215215#endif
    … …  
    14661466#endif
    14671467
    1468 #if ENABLE(MODEL_ELEMENT)
     1468#if HAVE(ARKIT_INLINE_PREVIEW_IOS)
    14691469    void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId);
     1470#endif
     1471#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    14701472    void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&);
    14711473    void modelElementPreviewDidObtainContextId(const WebCore::ElementContext&, const String&, uint32_t);
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in

    r279451 r279477  
    645645#endif
    646646
    647 #if ENABLE(MODEL_ELEMENT)
     647#if HAVE(ARKIT_INLINE_PREVIEW_MAC)
    648648    ModelElementPreviewDidObtainContextId(struct WebCore::ElementContext elementContext, String uuid, uint32_t contextId)
    649649#endif
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r279411 r279477  
    142142#include <wtf/text/StringHash.h>
    143143
    144 #if ENABLE(MODEL_ELEMENT)
     144#if HAVE(ARKIT_INLINE_PREVIEW)
    145145#include <WebCore/HTMLModelElement.h>
    146146#endif
    … …  
    573573#endif
    574574
    575 #if ENABLE(MODEL_ELEMENT)
     575#if HAVE(ARKIT_INLINE_PREVIEW)
    576576    if (!parameters.modelElementCacheDirectory.isEmpty())
    577577        WebCore::HTMLModelElement::setModelElementCacheDirectory(parameters.modelElementCacheDirectory);
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r279342 r279477  
    482482    SandboxExtension::consumePermanently(parameters.mediaKeyStorageDirectoryExtensionHandle);
    483483    SandboxExtension::consumePermanently(parameters.javaScriptConfigurationDirectoryExtensionHandle);
    484 #if ENABLE(MODEL_ELEMENT)
     484#if HAVE(ARKIT_INLINE_PREVIEW)
    485485    SandboxExtension::consumePermanently(parameters.modelElementCacheDirectoryExtensionHandle);
    486486#endif
Note: See TracChangeset for help on using the changeset viewer.