Changeset 279477 in webkit
- Timestamp:
- Jul 1, 2021, 12:37:13 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 31 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/PlatformHave.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Modules/model-element/HTMLModelElement.cpp (modified) (2 diffs)
-
WebCore/Modules/model-element/HTMLModelElement.h (modified) (1 diff)
-
WebCore/Modules/model-element/HTMLModelElementCocoa.mm (modified) (2 diffs)
-
WebCore/loader/EmptyClients.cpp (modified) (1 diff)
-
WebCore/loader/EmptyClients.h (modified) (2 diffs)
-
WebCore/page/ChromeClient.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/WebProcessDataStoreParameters.h (modified) (4 diffs)
-
WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm (modified) (3 diffs)
-
WebKit/UIProcess/ModelElementController.cpp (modified) (1 diff)
-
WebKit/UIProcess/ModelElementController.h (modified) (2 diffs)
-
WebKit/UIProcess/PageClient.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (4 diffs)
-
WebKit/UIProcess/WebPageProxy.h (modified) (3 diffs)
-
WebKit/UIProcess/WebPageProxy.messages.in (modified) (1 diff)
-
WebKit/UIProcess/WebProcessPool.cpp (modified) (2 diffs)
-
WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (modified) (1 diff)
-
WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (modified) (1 diff)
-
WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (modified) (2 diffs)
-
WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp (modified) (2 diffs)
-
WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h (modified) (2 diffs)
-
WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (modified) (1 diff)
-
WebKit/WebProcess/WebCoreSupport/WebChromeClient.h (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.cpp (modified) (3 diffs)
-
WebKit/WebProcess/WebPage/WebPage.h (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/WebPage.messages.in (modified) (1 diff)
-
WebKit/WebProcess/WebProcess.cpp (modified) (2 diffs)
-
WebKit/WebProcess/cocoa/WebProcessCocoa.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r279475 r279477 1 2021-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 1 12 2021-07-01 Aditya Keerthi <akeerthi@apple.com> 2 13 -
trunk/Source/WTF/wtf/PlatformHave.h
r279475 r279477 1019 1019 #define HAVE_ARKIT_INLINE_PREVIEW_MAC 1 1020 1020 #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 1021 1025 #endif 1022 1026 -
trunk/Source/WebCore/ChangeLog
r279472 r279477 1 2021-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 1 21 2021-07-01 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/Modules/model-element/HTMLModelElement.cpp
r279451 r279477 168 168 } 169 169 170 #if HAVE(ARKIT_INLINE_PREVIEW) 170 171 static String& sharedModelElementCacheDirectory() 171 172 { … … 183 184 return sharedModelElementCacheDirectory(); 184 185 } 186 #endif 185 187 186 188 // MARK: - DOM overrides. -
trunk/Source/WebCore/Modules/model-element/HTMLModelElement.h
r279451 r279477 62 62 RefPtr<Model> model() const; 63 63 64 #if HAVE(ARKIT_INLINE_PREVIEW) 64 65 WEBCORE_EXPORT static void setModelElementCacheDirectory(const String&); 65 66 WEBCORE_EXPORT static const String& modelElementCacheDirectory(); 67 #endif 66 68 67 69 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) -
trunk/Source/WebCore/Modules/model-element/HTMLModelElementCocoa.mm
r279451 r279477 35 35 #include "RenderLayer.h" 36 36 #include "RenderLayerModelObject.h" 37 #include "Settings.h" 37 38 #include <pal/spi/mac/SystemPreviewSPI.h> 38 39 #include <wtf/FileSystem.h> … … 108 109 void HTMLModelElement::inlinePreviewDidObtainContextId(const String& uuid, uint32_t contextId) 109 110 { 111 if (!document().settings().modelElementEnabled()) 112 return; 113 110 114 if (uuid != (String)[m_inlinePreview uuid].UUIDString) { 111 115 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 579 579 } 580 580 581 #if ENABLE(MODEL_ELEMENT) 582 581 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 583 582 void EmptyChromeClient::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const 584 583 { 585 584 } 586 585 #endif 586 587 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 587 588 void EmptyChromeClient::modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const 588 589 { 589 590 } 590 591 591 #endif 592 592 -
trunk/Source/WebCore/loader/EmptyClients.h
r279451 r279477 217 217 bool shouldNotifyOnFormChanges() final { return false; } 218 218 219 #if ENABLE(MODEL_ELEMENT)219 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 220 220 void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const final; 221 221 #endif … … 223 223 RefPtr<Icon> createIconForFiles(const Vector<String>& /* filenames */) final { return nullptr; } 224 224 225 #if ENABLE(MODEL_ELEMENT)225 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 226 226 void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const final; 227 227 #endif -
trunk/Source/WebCore/page/ChromeClient.h
r279451 r279477 79 79 #endif 80 80 81 #if ENABLE(MODEL_ELEMENT)81 #if HAVE(ARKIT_INLINE_PREVIEW) 82 82 class HTMLModelElement; 83 83 #endif … … 601 601 #endif 602 602 603 #if ENABLE(MODEL_ELEMENT)603 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 604 604 virtual void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID) const { } 605 #endif 606 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 605 607 virtual void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const { }; 606 608 #endif -
trunk/Source/WebKit/ChangeLog
r279476 r279477 1 2021-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 1 51 2021-07-01 Per Arne <pvollan@apple.com> 2 52 -
trunk/Source/WebKit/Shared/WebProcessDataStoreParameters.h
r279267 r279477 52 52 HashMap<TopFrameDomain, SubResourceDomain> domainsWithStorageAccessQuirk; 53 53 #endif 54 #if ENABLE(MODEL_ELEMENT)54 #if HAVE(ARKIT_INLINE_PREVIEW) 55 55 String modelElementCacheDirectory; 56 56 SandboxExtension::Handle modelElementCacheDirectoryExtensionHandle; … … 80 80 encoder << domainsWithStorageAccessQuirk; 81 81 #endif 82 #if ENABLE(MODEL_ELEMENT)82 #if HAVE(ARKIT_INLINE_PREVIEW) 83 83 encoder << modelElementCacheDirectory; 84 84 encoder << modelElementCacheDirectoryExtensionHandle; … … 151 151 return std::nullopt; 152 152 #endif 153 #if ENABLE(MODEL_ELEMENT)153 #if HAVE(ARKIT_INLINE_PREVIEW) 154 154 String modelElementCacheDirectory; 155 155 if (!decoder.decode(modelElementCacheDirectory)) … … 182 182 WTFMove(*domainsWithStorageAccessQuirk), 183 183 #endif 184 #if ENABLE(MODEL_ELEMENT)184 #if HAVE(ARKIT_INLINE_PREVIEW) 185 185 WTFMove(modelElementCacheDirectory), 186 186 WTFMove(*modelElementCacheDirectoryExtensionHandle), -
trunk/Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm
r279451 r279477 27 27 #import "ModelElementController.h" 28 28 29 #if ENABLE(MODEL_ELEMENT)29 #if HAVE(ARKIT_INLINE_PREVIEW) 30 30 31 31 #import "Logging.h" … … 56 56 void ModelElementController::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) 57 57 { 58 if (!m_webPageProxy->preferences().modelElementEnabled()) 59 return; 60 58 61 if (!is<RemoteLayerTreeDrawingAreaProxy>(m_webPageProxy.drawingArea())) 59 62 return; … … 124 127 void ModelElementController::modelElementDidCreatePreview(const WebCore::ElementContext& context, const URL& fileURL, const String& uuid, const WebCore::FloatSize& size) 125 128 { 129 if (!m_webPageProxy.preferences().modelElementEnabled()) 130 return; 131 126 132 auto preview = adoptNS([allocASVInlinePreviewInstance() initWithFrame:CGRectMake(0, 0, size.width(), size.height()) UUID:[[NSUUID alloc] initWithUUIDString:uuid]]); 127 133 -
trunk/Source/WebKit/UIProcess/ModelElementController.cpp
r279420 r279477 27 27 #include "ModelElementController.h" 28 28 29 #if ENABLE(MODEL_ELEMENT)29 #if HAVE(ARKIT_INLINE_PREVIEW) 30 30 31 31 #include "WebPageProxy.h" -
trunk/Source/WebKit/UIProcess/ModelElementController.h
r279451 r279477 26 26 #pragma once 27 27 28 #if ENABLE(MODEL_ELEMENT)28 #if HAVE(ARKIT_INLINE_PREVIEW) 29 29 30 30 #include <WebCore/ElementContext.h> … … 52 52 void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId); 53 53 #endif 54 55 54 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 56 55 void modelElementDidCreatePreview(const WebCore::ElementContext&, const URL&, const String&, const WebCore::FloatSize&); -
trunk/Source/WebKit/UIProcess/PageClient.h
r279451 r279477 133 133 struct TranslationContextMenuInfo; 134 134 #endif 135 136 #if ENABLE(MODEL_ELEMENT)137 struct ElementContext;138 #endif139 135 } 140 136 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r279451 r279477 1024 1024 #endif 1025 1025 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 } 1029 1031 #endif 1030 1032 … … 7777 7779 #endif 7778 7780 7779 #if ENABLE(MODEL_ELEMENT)7781 #if HAVE(ARKIT_INLINE_PREVIEW) 7780 7782 m_modelElementController = nullptr; 7781 7783 #endif … … 10689 10691 #endif 10690 10692 10691 #if ENABLE(MODEL_ELEMENT) 10692 10693 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 10693 10694 void WebPageProxy::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) 10694 10695 { 10695 #if HAVE(ARKIT_INLINE_PREVIEW_IOS)10696 10696 modelElementController()->takeModelElementFullscreen(contentLayerId); 10697 #endif 10698 } 10699 10697 } 10698 #endif 10699 10700 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 10700 10701 void WebPageProxy::modelElementDidCreatePreview(const WebCore::ElementContext& context, const URL& url, const String& uuid, const FloatSize& size) 10701 10702 { 10702 #if HAVE(ARKIT_INLINE_PREVIEW_MAC)10703 10703 modelElementController()->modelElementDidCreatePreview(context, url, uuid, size); 10704 #endif10705 10704 } 10706 10705 … … 10710 10709 send(Messages::WebPage::ModelElementPreviewDidObtainContextId(context, uuid, contextId)); 10711 10710 } 10712 10713 10711 #endif 10714 10712 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r279451 r279477 190 190 #endif 191 191 192 #if ENABLE(MODEL_ELEMENT)192 #if HAVE(ARKIT_INLINE_PREVIEW) 193 193 #include "ModelElementController.h" 194 194 #endif … … 574 574 #endif 575 575 576 #if ENABLE(MODEL_ELEMENT)576 #if HAVE(ARKIT_INLINE_PREVIEW) 577 577 ModelElementController* modelElementController() { return m_modelElementController.get(); } 578 #endif 579 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 578 580 void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId); 581 #endif 582 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 579 583 void modelElementDidCreatePreview(const WebCore::ElementContext&, const URL&, const String&, const WebCore::FloatSize&); 580 584 void modelElementPreviewDidObtainContextId(const WebCore::ElementContext&, const String&, uint32_t); … … 2609 2613 #endif 2610 2614 2611 #if ENABLE(MODEL_ELEMENT)2615 #if HAVE(ARKIT_INLINE_PREVIEW) 2612 2616 std::unique_ptr<ModelElementController> m_modelElementController; 2613 2617 #endif -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r279451 r279477 594 594 #endif 595 595 596 #if ENABLE(MODEL_ELEMENT)596 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 597 597 TakeModelElementFullscreen(uint64_t contentLayerID) 598 #endif 599 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 598 600 ModelElementDidCreatePreview(struct WebCore::ElementContext elementContext, URL url, String uuid, WebCore::FloatSize size) 599 601 #endif -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r279354 r279477 696 696 SandboxExtension::createHandleWithoutResolvingPath(javaScriptConfigurationDirectory, SandboxExtension::Type::ReadWrite, javaScriptConfigurationDirectoryExtensionHandle); 697 697 698 #if ENABLE(MODEL_ELEMENT)698 #if HAVE(ARKIT_INLINE_PREVIEW) 699 699 auto modelElementCacheDirectory = websiteDataStore.resolvedModelElementCacheDirectory(); 700 700 SandboxExtension::Handle modelElementCacheDirectoryExtensionHandle; … … 719 719 m_domainsWithCrossPageStorageAccessQuirk, 720 720 #endif 721 #if ENABLE(MODEL_ELEMENT)721 #if HAVE(ARKIT_INLINE_PREVIEW) 722 722 WTFMove(modelElementCacheDirectory), 723 723 WTFMove(modelElementCacheDirectoryExtensionHandle), -
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r279267 r279477 322 322 } 323 323 324 #if ENABLE(MODEL_ELEMENT)324 #if HAVE(ARKIT_INLINE_PREVIEW) 325 325 WTF::String WebsiteDataStore::defaultModelElementCacheDirectory() 326 326 { -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r279354 r279477 266 266 if (!m_configuration->hstsStorageDirectory().isEmpty() && m_resolvedConfiguration->hstsStorageDirectory().isEmpty()) 267 267 m_resolvedConfiguration->setHSTSStorageDirectory(resolvePathForSandboxExtension(m_configuration->hstsStorageDirectory())); 268 #if ENABLE(MODEL_ELEMENT)268 #if HAVE(ARKIT_INLINE_PREVIEW) 269 269 if (!m_configuration->modelElementCacheDirectory().isEmpty()) 270 270 m_resolvedConfiguration->setModelElementCacheDirectory(resolveAndCreateReadWriteDirectoryForSandboxExtension(m_configuration->modelElementCacheDirectory())); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r279267 r279477 254 254 const String& resolvedResourceLoadStatisticsDirectory() const { return m_resolvedConfiguration->resourceLoadStatisticsDirectory(); } 255 255 const String& resolvedHSTSStorageDirectory() const { return m_resolvedConfiguration->hstsStorageDirectory(); } 256 #if ENABLE(MODEL_ELEMENT)256 #if HAVE(ARKIT_INLINE_PREVIEW) 257 257 const String& resolvedModelElementCacheDirectory() const { return m_resolvedConfiguration->modelElementCacheDirectory(); } 258 258 #endif … … 333 333 static WTF::String defaultHSTSDirectory(); 334 334 #endif 335 #if ENABLE(MODEL_ELEMENT)335 #if HAVE(ARKIT_INLINE_PREVIEW) 336 336 static WTF::String defaultModelElementCacheDirectory(); 337 337 #endif -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
r279267 r279477 48 48 setDeviceIdHashSaltsStorageDirectory(WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory()); 49 49 setJavaScriptConfigurationDirectory(WebsiteDataStore::defaultJavaScriptConfigurationDirectory()); 50 #if ENABLE(MODEL_ELEMENT)50 #if HAVE(ARKIT_INLINE_PREVIEW) 51 51 setModelElementCacheDirectory(WebsiteDataStore::defaultModelElementCacheDirectory()); 52 52 #endif … … 101 101 copy->m_proxyConfiguration = adoptCF(CFDictionaryCreateCopy(nullptr, this->m_proxyConfiguration.get())); 102 102 #endif 103 #if ENABLE(MODEL_ELEMENT)103 #if HAVE(ARKIT_INLINE_PREVIEW) 104 104 copy->m_modelElementCacheDirectory = this->m_modelElementCacheDirectory; 105 105 #endif -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h
r279267 r279477 75 75 void setLocalStorageDirectory(String&& directory) { m_localStorageDirectory = WTFMove(directory); } 76 76 77 #if ENABLE(MODEL_ELEMENT)77 #if HAVE(ARKIT_INLINE_PREVIEW) 78 78 const String& modelElementCacheDirectory() const { return m_modelElementCacheDirectory; } 79 79 void setModelElementCacheDirectory(String&& directory) { m_modelElementCacheDirectory = WTFMove(directory); } … … 185 185 String m_webSQLDatabaseDirectory; 186 186 String m_hstsStorageDirectory; 187 #if ENABLE(MODEL_ELEMENT)187 #if HAVE(ARKIT_INLINE_PREVIEW) 188 188 String m_modelElementCacheDirectory; 189 189 #endif -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
r279451 r279477 1516 1516 } 1517 1517 1518 #if ENABLE(MODEL_ELEMENT) 1519 1518 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 1520 1519 void WebChromeClient::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) const 1521 1520 { 1522 1521 m_page.takeModelElementFullscreen(contentLayerId); 1523 1522 } 1524 1523 #endif 1524 1525 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 1525 1526 void WebChromeClient::modelElementDidCreatePreview(WebCore::HTMLModelElement& element, const URL& url, const String& uuid, const WebCore::FloatSize& size) const 1526 1527 { 1527 1528 m_page.modelElementDidCreatePreview(element, url, uuid, size); 1528 1529 } 1529 1530 1530 #endif 1531 1531 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
r279451 r279477 453 453 #endif 454 454 455 #if ENABLE(MODEL_ELEMENT)455 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 456 456 void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) const final; 457 #endif 458 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 457 459 void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&) const final; 458 460 #endif -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r279451 r279477 270 270 #endif 271 271 272 #if ENABLE(MODEL_ELEMENT)272 #if HAVE(ARKIT_INLINE_PREVIEW) 273 273 #include <WebCore/HTMLModelElement.h> 274 274 #endif … … 7679 7679 #endif 7680 7680 7681 #if ENABLE(MODEL_ELEMENT) 7682 7681 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 7683 7682 void WebPage::takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId) 7684 7683 { 7685 7684 send(Messages::WebPageProxy::TakeModelElementFullscreen(contentLayerId)); 7686 7685 } 7687 7686 #endif 7687 7688 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 7688 7689 void WebPage::modelElementDidCreatePreview(WebCore::HTMLModelElement& element, const URL& url, const String& uuid, const WebCore::FloatSize& size) 7689 7690 { … … 7694 7695 void WebPage::modelElementPreviewDidObtainContextId(const WebCore::ElementContext& elementContext, const String& uuid, uint32_t contextId) 7695 7696 { 7696 #if HAVE(ARKIT_INLINE_PREVIEW_MAC)7697 7697 auto element = elementForContext(elementContext); 7698 7698 if (is<WebCore::HTMLModelElement>(element)) 7699 7699 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 } 7707 7701 #endif 7708 7702 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r279451 r279477 211 211 class VisiblePosition; 212 212 213 #if ENABLE(MODEL_ELEMENT)213 #if HAVE(ARKIT_INLINE_PREVIEW) 214 214 class HTMLModelElement; 215 215 #endif … … 1466 1466 #endif 1467 1467 1468 #if ENABLE(MODEL_ELEMENT)1468 #if HAVE(ARKIT_INLINE_PREVIEW_IOS) 1469 1469 void takeModelElementFullscreen(WebCore::GraphicsLayer::PlatformLayerID contentLayerId); 1470 #endif 1471 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 1470 1472 void modelElementDidCreatePreview(WebCore::HTMLModelElement&, const URL&, const String&, const WebCore::FloatSize&); 1471 1473 void modelElementPreviewDidObtainContextId(const WebCore::ElementContext&, const String&, uint32_t); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r279451 r279477 645 645 #endif 646 646 647 #if ENABLE(MODEL_ELEMENT)647 #if HAVE(ARKIT_INLINE_PREVIEW_MAC) 648 648 ModelElementPreviewDidObtainContextId(struct WebCore::ElementContext elementContext, String uuid, uint32_t contextId) 649 649 #endif -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r279411 r279477 142 142 #include <wtf/text/StringHash.h> 143 143 144 #if ENABLE(MODEL_ELEMENT)144 #if HAVE(ARKIT_INLINE_PREVIEW) 145 145 #include <WebCore/HTMLModelElement.h> 146 146 #endif … … 573 573 #endif 574 574 575 #if ENABLE(MODEL_ELEMENT)575 #if HAVE(ARKIT_INLINE_PREVIEW) 576 576 if (!parameters.modelElementCacheDirectory.isEmpty()) 577 577 WebCore::HTMLModelElement::setModelElementCacheDirectory(parameters.modelElementCacheDirectory); -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r279342 r279477 482 482 SandboxExtension::consumePermanently(parameters.mediaKeyStorageDirectoryExtensionHandle); 483 483 SandboxExtension::consumePermanently(parameters.javaScriptConfigurationDirectoryExtensionHandle); 484 #if ENABLE(MODEL_ELEMENT)484 #if HAVE(ARKIT_INLINE_PREVIEW) 485 485 SandboxExtension::consumePermanently(parameters.modelElementCacheDirectoryExtensionHandle); 486 486 #endif
Note:
See TracChangeset
for help on using the changeset viewer.