Skip to content

Commit

Permalink
Cherry-pick 1eb4751. rdar://problem/88406961
Browse files Browse the repository at this point in the history
    Remove WebArchiveDebugMode
    https://bugs.webkit.org/show_bug.cgi?id=245488
    <rdar://problem/88406961>

    Reviewed by Geoffrey Garen.
    Original patch by: Kate Cheney <katherine_cheney@apple.com>

    Remove use case of WebArchiveDebugMode and deprecate it now that it
    is no longer in use. Add a new temporary flag WebArchiveTestMode
    that is more aptly named and will maintain existing behavior for
    internal tests temporarily.

    In addition, for clarity annotate resource URLs in WebArchive with
    "webarchive+" prefix, but avoid breaking web content that transits the
    pasteboard. If a requested resource has that scheme prefix, then strip it.

    * LayoutTests/platform/wk2/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:
    * LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:
    * Source/WTF/Scripts/Preferences/WebPreferences.yaml:
    * Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
    (WebCore::extractMarkupAndArchive):
    * Source/WebCore/loader/DocumentLoader.cpp:
    (WebCore::DocumentLoader::isLoadingRemoteArchive const):
    (WebCore::DocumentLoader::commitData):
    (WebCore::DocumentLoader::scheduleArchiveLoad):
    * Source/WebCore/loader/DocumentLoader.h:
    * Source/WebCore/loader/ResourceLoader.cpp:
    (WebCore::ResourceLoader::start):
    * Source/WebCore/loader/archive/ArchiveResourceCollection.cpp:
    (WebCore::ArchiveResourceCollection::addResource):
    (WebCore::ArchiveResourceCollection::archiveResourceForURL):
    * Source/WebCore/loader/archive/ArchiveResourceCollection.h:
    * Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
    (WebCore::LegacyWebArchive::createResource):
    (WebCore::LegacyWebArchive::create):
    (WebCore::LegacyWebArchive::extract):
    * Source/WebCore/loader/archive/cf/LegacyWebArchive.h:
    * Source/WebCore/page/SecurityOrigin.cpp:
    (WebCore::shouldTreatAsOpaqueOrigin):
    * Source/WebKit/UIProcess/API/C/WKPreferences.cpp:
    (WKPreferencesSetWebArchiveTestingModeEnabled):
    (WKPreferencesGetWebArchiveTestingModeEnabled):
    (WKPreferencesSetWebArchiveDebugModeEnabled):
    (WKPreferencesGetWebArchiveDebugModeEnabled):
    * Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h:
    * Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
    (-[WKPreferences _setWebArchiveTestingModeEnabled:]):
    (-[WKPreferences _webArchiveTestingModeEnabled]):
    (-[WKPreferences _setWebArchiveDebugModeEnabled:]):
    (-[WKPreferences _webArchiveDebugModeEnabled]):
    * Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
    * Source/WebKitLegacy/mac/WebView/WebView.mm:
    (+[WebView _canHandleRequest:forMainFrame:]):
    * Tools/TestWebKitAPI/Tests/mac/LoadWebArchive.mm:
    (TestWebKitAPI::constructArchive):
    (TestWebKitAPI::TEST):

    Canonical link: https://commits.webkit.org/255705@main

Canonical link: https://commits.webkit.org/252432.795@safari-7614-branch
  • Loading branch information
sysrqb authored and alancoon committed Nov 10, 2022
1 parent e1530d9 commit cd66843
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ frame "<!--frame1-->" - didStartProvisionalLoadForFrame
resources/subresource-null-mimetype.webarchive - willSendRequest <NSURLRequest URL resources/subresource-null-mimetype.webarchive, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)
resources/subresource-null-mimetype.webarchive - didReceiveResponse <NSURLResponse resources/subresource-null-mimetype.webarchive, http status code 0>
frame "<!--frame1-->" - didCommitLoadForFrame
test.png - willSendRequest <NSURLRequest URL test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)
webarchive+file:///test.png - willSendRequest <NSURLRequest URL webarchive+file:///test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)
frame "<!--frame1-->" - didFinishDocumentLoadForFrame
resources/subresource-null-mimetype.webarchive - didFinishLoading
test.png - didReceiveResponse <NSURLResponse test.png, http status code 0>
test.png - didFinishLoading
webarchive+file:///test.png - didReceiveResponse <NSURLResponse webarchive+file:///test.png, http status code 0>
webarchive+file:///test.png - didFinishLoading
frame "<!--frame1-->" - didHandleOnloadEventsForFrame
main frame - didHandleOnloadEventsForFrame
frame "<!--frame1-->" - didFinishLoadForFrame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ main frame - didFinishDocumentLoadForFrame
test-loading-archive-subresource-null-mimetype.html - didFinishLoading
resources/subresource-null-mimetype.webarchive - didReceiveResponse <NSURLResponse resources/subresource-null-mimetype.webarchive, http status code 0>
frame "<!--frame1-->" - didCommitLoadForFrame
test.png - willSendRequest <NSURLRequest URL test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)
webarchive+file:///test.png - willSendRequest <NSURLRequest URL webarchive+file:///test.png, main document URL test-loading-archive-subresource-null-mimetype.html, http method GET> redirectResponse (null)
frame "<!--frame1-->" - didFinishDocumentLoadForFrame
resources/subresource-null-mimetype.webarchive - didFinishLoading
test.png - didReceiveResponse <NSURLResponse test.png, http status code 0>
test.png - didFinishLoading
webarchive+file:///test.png - didReceiveResponse <NSURLResponse webarchive+file:///test.png, http status code 0>
webarchive+file:///test.png - didFinishLoading
frame "<!--frame1-->" - didHandleOnloadEventsForFrame
main frame - didHandleOnloadEventsForFrame
frame "<!--frame1-->" - didFinishLoadForFrame
Expand Down
11 changes: 11 additions & 0 deletions Source/WTF/Scripts/Preferences/WebPreferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2481,6 +2481,17 @@ WebArchiveDebugModeEnabled:
WebCore:
default: false

WebArchiveTestingModeEnabled:
type: bool
condition: ENABLE(WEB_ARCHIVE)
defaultValue:
WebKitLegacy:
default: false
WebKit:
default: false
WebCore:
default: false

WebAudioEnabled:
type: bool
condition: ENABLE(WEB_AUDIO)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static void replaceRichContentWithAttachments(Frame& frame, DocumentFragment& fr

static std::optional<MarkupAndArchive> extractMarkupAndArchive(SharedBuffer& buffer, const std::function<bool(const String)>& canShowMIMETypeAsHTML)
{
auto archive = LegacyWebArchive::create(URL(), buffer);
auto archive = LegacyWebArchive::create(buffer);
if (!archive)
return std::nullopt;

Expand Down
40 changes: 31 additions & 9 deletions Source/WebCore/loader/DocumentLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,21 @@ static inline bool shouldUseActiveServiceWorkerFromParent(const Document& docume
}
#endif

#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
bool DocumentLoader::isLoadingRemoteArchive() const
{
#if ENABLE(MHTML)
return m_archive && m_archive->shouldOverrideBaseURL();
#else
bool isQuickLookPreview = false;
#if USE(QUICK_LOOK)
isQuickLookPreview = isQuickLookPreviewURL(m_response.url());
#endif // QUICK_LOOK
return m_archive && !m_frame->settings().webArchiveTestingModeEnabled() && !isQuickLookPreview;
#endif // !MHTML
}
#endif // WEBARCHIVE || MHTML

void DocumentLoader::commitData(const SharedBuffer& data)
{
if (!m_gotFirstByte) {
Expand Down Expand Up @@ -1239,9 +1254,21 @@ void DocumentLoader::commitData(const SharedBuffer& data)
return;

#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
if (m_archive && m_archive->shouldOverrideBaseURL())
document.setBaseURLOverride(m_archive->mainResource()->url());
#endif
if (isLoadingRemoteArchive()) {
auto& url { m_archive->mainResource()->url() };
if (m_archive->shouldOverrideBaseURL())
document.setBaseURLOverride(url);
#if ENABLE(WEB_ARCHIVE)
constexpr auto webArchivePrefix { "webarchive+"_s };
if (url.protocol().startsWith(webArchivePrefix)) {
auto unprefixedScheme { url.protocol().substring(webArchivePrefix.length()) };
if (LegacySchemeRegistry::shouldTreatURLSchemeAsLocal(unprefixedScheme.toStringWithoutCopying()))
document.securityOrigin().grantLoadLocalResources();
}
#endif // WEB_ARCHIVE
}
#endif // WEB_ARCHIVE || MHTML

#if ENABLE(SERVICE_WORKER)
if (m_canUseServiceWorkers) {
if (!document.securityOrigin().isUnique()) {
Expand Down Expand Up @@ -1792,12 +1819,7 @@ bool DocumentLoader::scheduleArchiveLoad(ResourceLoader& loader, const ResourceR
if (!m_archive)
return false;

#if ENABLE(WEB_ARCHIVE)
// The idea of WebArchiveDebugMode is that we should fail instead of trying to fetch from the network.
// Returning true ensures the caller will not try to fetch from the network.
if (m_frame->settings().webArchiveDebugModeEnabled() && responseMIMEType() == "application/x-webarchive"_s)
return true;
#endif
DOCUMENTLOADER_RELEASE_LOG("scheduleArchiveLoad: Failed to unarchive subresource");

// If we want to load from the archive only, then we should always return true so that the caller
// does not try to fetch from the network.
Expand Down
4 changes: 4 additions & 0 deletions Source/WebCore/loader/DocumentLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ class DocumentLoader
void clearArchiveResources();
#endif

#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
bool isLoadingRemoteArchive() const;
#endif

void willSendRequest(ResourceRequest&&, const ResourceResponse&, CompletionHandler<void(ResourceRequest&&)>&&);
void finishedLoading();
void mainReceivedError(const ResourceError&);
Expand Down
10 changes: 10 additions & 0 deletions Source/WebCore/loader/ResourceLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ void ResourceLoader::start()
#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
if (m_documentLoader && m_documentLoader->scheduleArchiveLoad(*this, m_request))
return;

#if ENABLE(WEB_ARCHIVE)
constexpr auto webArchivePrefix { "webarchive+"_s };
if (m_request.url().protocol().startsWith(webArchivePrefix)) {
auto url { m_request.url() };
const auto unprefixedScheme { url.protocol().substring(webArchivePrefix.length()) };
url.setProtocol(unprefixedScheme);
m_request.setURL(url);
}
#endif
#endif

if (m_documentLoader && m_documentLoader->applicationCacheHost().maybeLoadResource(*this, m_request, m_request.url()))
Expand Down
33 changes: 26 additions & 7 deletions Source/WebCore/loader/archive/ArchiveResourceCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@

namespace WebCore {

#if ENABLE(WEB_ARCHIVE) && USE(CF)
constexpr auto webArchivePrefix { "webarchive+"_s };
#endif

void ArchiveResourceCollection::addAllResources(Archive& archive)
{
for (auto& subresource : archive.subresources())
Expand All @@ -53,19 +57,34 @@ void ArchiveResourceCollection::addAllResources(Archive& archive)
// Can we change the design in a manner that will let us deprecate that API without reducing functionality of those apps?
void ArchiveResourceCollection::addResource(Ref<ArchiveResource>&& resource)
{
auto& url = resource->url();
m_subresources.set(url.string(), WTFMove(resource));
#if ENABLE(WEB_ARCHIVE) && USE(CF)
const bool addPrefix = !resource->url().protocol().startsWith(webArchivePrefix);
const auto prefix { addPrefix ? webArchivePrefix : ""_s };
const auto subresourceKey { String { prefix + resource->url().string() } };
#else
const auto& subresourceKey = resource->url().string();
#endif
m_subresources.set(subresourceKey, WTFMove(resource));
}

ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const URL& url)
ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(URL url)
{
#if ENABLE(WEB_ARCHIVE) && USE(CF)
const auto httpsScheme = String { webArchivePrefix + "https"_str };
const auto httpScheme = String { webArchivePrefix + "http"_str };
if (!url.protocol().startsWith(webArchivePrefix))
url.setProtocol(String { webArchivePrefix + url.protocol() });
#else
constexpr auto httpsScheme = "https"_s;
constexpr auto httpScheme = "http"_s;
#endif

if (auto* resource = m_subresources.get(url.string()))
return resource;
if (!url.protocolIs("https"_s))
if (!url.protocolIs(httpsScheme))
return nullptr;
URL httpURL = url;
httpURL.setProtocol("http"_s);
return m_subresources.get(httpURL.string());
url.setProtocol(httpScheme);
return m_subresources.get(url.string());
}

RefPtr<Archive> ArchiveResourceCollection::popSubframeArchive(const String& frameName, const URL& url)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/loader/archive/ArchiveResourceCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ArchiveResourceCollection {
void addResource(Ref<ArchiveResource>&&);
void addAllResources(Archive&);

WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(const URL&);
WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(URL);
RefPtr<Archive> popSubframeArchive(const String& frameName, const URL&);

private:
Expand Down
29 changes: 19 additions & 10 deletions Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ ResourceResponse LegacyWebArchive::createResourceResponseFromPropertyListData(CF
return ResourceResponse();
}

RefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef dictionary)
RefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef dictionary, const UsePrefixedScheme usePrefixedScheme)
{
ASSERT(dictionary);
if (!dictionary)
Expand All @@ -196,12 +196,16 @@ RefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef diction
return nullptr;
}

auto url = static_cast<CFStringRef>(CFDictionaryGetValue(dictionary, LegacyWebArchiveResourceURLKey));
if (url && CFGetTypeID(url) != CFStringGetTypeID()) {
const auto cfURL = static_cast<CFStringRef>(CFDictionaryGetValue(dictionary, LegacyWebArchiveResourceURLKey));
if (cfURL && CFGetTypeID(cfURL) != CFStringGetTypeID()) {
LOG(Archives, "LegacyWebArchive - URL is not of type CFString, cannot create invalid resource");
return nullptr;
}

const String stringURL { cfURL };
const auto schemePrefix = usePrefixedScheme == UsePrefixedScheme::Yes ? "webarchive+"_s : ""_s;
const URL url { schemePrefix + stringURL };

auto textEncoding = static_cast<CFStringRef>(CFDictionaryGetValue(dictionary, LegacyWebArchiveResourceTextEncodingNameKey));
if (textEncoding && CFGetTypeID(textEncoding) != CFStringGetTypeID()) {
LOG(Archives, "LegacyWebArchive - Text encoding is not of type CFString, cannot create invalid resource");
Expand All @@ -225,7 +229,7 @@ RefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef diction
response = createResourceResponseFromPropertyListData(resourceResponseData, resourceResponseVersion);
}

return ArchiveResource::create(SharedBuffer::create(resourceData), URL { url }, mimeType, textEncoding, frameName, response);
return ArchiveResource::create(SharedBuffer::create(resourceData), url, mimeType, textEncoding, frameName, response);
}

Ref<LegacyWebArchive> LegacyWebArchive::create()
Expand All @@ -250,10 +254,15 @@ Ref<LegacyWebArchive> LegacyWebArchive::create(Ref<ArchiveResource>&& mainResour

RefPtr<LegacyWebArchive> LegacyWebArchive::create(FragmentedSharedBuffer& data)
{
return create(URL(), data);
return create(URL(), data, UsePrefixedScheme::No);
}

RefPtr<LegacyWebArchive> LegacyWebArchive::create(const URL&, FragmentedSharedBuffer& data)
{
return create(URL(), data, UsePrefixedScheme::Yes);
}

RefPtr<LegacyWebArchive> LegacyWebArchive::create(const URL&, FragmentedSharedBuffer& data, const UsePrefixedScheme usePrefixedScheme)
{
LOG(Archives, "LegacyWebArchive - Creating from raw data");

Expand Down Expand Up @@ -282,13 +291,13 @@ RefPtr<LegacyWebArchive> LegacyWebArchive::create(const URL&, FragmentedSharedBu
return nullptr;
}

if (!archive->extract(plist.get()))
if (!archive->extract(plist.get(), usePrefixedScheme))
return nullptr;

return WTFMove(archive);
}

bool LegacyWebArchive::extract(CFDictionaryRef dictionary)
bool LegacyWebArchive::extract(CFDictionaryRef dictionary, const UsePrefixedScheme usePrefixedScheme)
{
ASSERT(dictionary);
if (!dictionary) {
Expand All @@ -306,7 +315,7 @@ bool LegacyWebArchive::extract(CFDictionaryRef dictionary)
return false;
}

auto mainResource = createResource(mainResourceDict);
auto mainResource = createResource(mainResourceDict, usePrefixedScheme);
if (!mainResource) {
LOG(Archives, "LegacyWebArchive - Failed to parse main resource from CFDictionary or main resource does not exist, aborting invalid WebArchive");
return false;
Expand Down Expand Up @@ -334,7 +343,7 @@ bool LegacyWebArchive::extract(CFDictionaryRef dictionary)
return false;
}

if (auto subresource = createResource(subresourceDict))
if (auto subresource = createResource(subresourceDict, usePrefixedScheme))
addSubresource(subresource.releaseNonNull());
}
}
Expand All @@ -355,7 +364,7 @@ bool LegacyWebArchive::extract(CFDictionaryRef dictionary)
}

auto subframeArchive = create();
if (subframeArchive->extract(subframeDict))
if (subframeArchive->extract(subframeDict, usePrefixedScheme))
addSubframeArchive(WTFMove(subframeArchive));
else
LOG(Archives, "LegacyWebArchive - Invalid subframe archive skipped");
Expand Down
7 changes: 5 additions & 2 deletions Source/WebCore/loader/archive/cf/LegacyWebArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class LegacyWebArchive final : public Archive {
WEBCORE_EXPORT RetainPtr<CFDataRef> rawDataRepresentation();

private:
enum class UsePrefixedScheme : bool { No, Yes };

LegacyWebArchive() = default;

bool shouldLoadFromArchiveOnly() const final { return false; }
Expand All @@ -61,15 +63,16 @@ class LegacyWebArchive final : public Archive {

enum MainResourceStatus { Subresource, MainResource };

static RefPtr<LegacyWebArchive> create(const URL&, FragmentedSharedBuffer&, const UsePrefixedScheme);
static RefPtr<LegacyWebArchive> create(const String& markupString, Frame&, const Vector<Node*>& nodes, Function<bool(Frame&)>&& frameFilter);
static RefPtr<ArchiveResource> createResource(CFDictionaryRef);
static RefPtr<ArchiveResource> createResource(CFDictionaryRef, const UsePrefixedScheme);
static ResourceResponse createResourceResponseFromMacArchivedData(CFDataRef);
static ResourceResponse createResourceResponseFromPropertyListData(CFDataRef, CFStringRef responseDataType);
static RetainPtr<CFDataRef> createPropertyListRepresentation(const ResourceResponse&);
static RetainPtr<CFDictionaryRef> createPropertyListRepresentation(Archive&);
static RetainPtr<CFDictionaryRef> createPropertyListRepresentation(ArchiveResource*, MainResourceStatus);

bool extract(CFDictionaryRef);
bool extract(CFDictionaryRef, const UsePrefixedScheme);
};

} // namespace WebCore
5 changes: 5 additions & 0 deletions Source/WebCore/page/SecurityOrigin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ static bool shouldTreatAsUniqueOrigin(const URL& url)
|| url.protocolIs("x-apple-ql-id2"_s)
|| url.protocolIs("x-apple-ql-magic"_s)
#endif
#if ENABLE(WEB_ARCHIVE) && USE(CF)
|| url.protocolIs("webarchive+http"_s)
|| url.protocolIs("webarchive+https"_s)
|| url.protocolIs("webarchive+ftp"_s)
#endif
#if PLATFORM(GTK) || PLATFORM(WPE)
|| url.protocolIs("resource"_s)
#if ENABLE(PDFJS)
Expand Down
17 changes: 13 additions & 4 deletions Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,14 @@ bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferencesRef)
return toImpl(preferencesRef)->domTimersThrottlingEnabled();
}

void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
void WKPreferencesSetWebArchiveTestingModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
{
toImpl(preferencesRef)->setWebArchiveDebugModeEnabled(enabled);
toImpl(preferencesRef)->setWebArchiveTestingModeEnabled(enabled);
}

bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
bool WKPreferencesGetWebArchiveTestingModeEnabled(WKPreferencesRef preferencesRef)
{
return toImpl(preferencesRef)->webArchiveDebugModeEnabled();
return toImpl(preferencesRef)->webArchiveTestingModeEnabled();
}

void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferencesRef, bool enabled)
Expand Down Expand Up @@ -2143,6 +2143,15 @@ bool WKPreferencesGetXSSAuditorEnabled(WKPreferencesRef)
return false;
}

void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
{
}

bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferencesRef)
{
return false;
}

void WKPreferencesSetJavaEnabled(WKPreferencesRef, bool)
{
}
Expand Down
6 changes: 4 additions & 2 deletions Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ WK_EXPORT void WKPreferencesSetDOMTimersThrottlingEnabled(WKPreferencesRef prefe
WK_EXPORT bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferences);

// Defaults to false.
WK_EXPORT void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferences, bool enabled);
WK_EXPORT bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferences);
WK_EXPORT void WKPreferencesSetWebArchiveTestingModeEnabled(WKPreferencesRef preferences, bool enabled);
WK_EXPORT bool WKPreferencesGetWebArchiveTestingModeEnabled(WKPreferencesRef preferences);

// Defaults to false.
WK_EXPORT void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferences, bool enabled);
Expand Down Expand Up @@ -563,6 +563,8 @@ WK_EXPORT void WKPreferencesSetResourceTimingEnabled(WKPreferencesRef, bool) WK_
WK_EXPORT bool WKPreferencesGetResourceTimingEnabled(WKPreferencesRef) WK_C_API_DEPRECATED;
WK_EXPORT void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef, bool) WK_C_API_DEPRECATED;
WK_EXPORT bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef) WK_C_API_DEPRECATED;
WK_EXPORT void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferences, bool enabled) WK_C_API_DEPRECATED;
WK_EXPORT bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferences) WK_C_API_DEPRECATED;

#ifdef __cplusplus
}
Expand Down

0 comments on commit cd66843

Please sign in to comment.