Skip to content

Commit

Permalink
AppCache removal: remove applicationCache property
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=275312

Reviewed by Youenn Fablet.

Follows 279811@main as another small incremental step towards fully
removing AppCache.

* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/page/DOMWindow.cpp:
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/page/DOMWindow.idl:
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::applicationCache): Deleted.
* Source/WebCore/page/LocalDOMWindow.h:
* Source/WebKitLegacy/mac/WebKit.exp:
* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):
* Source/WebKitLegacy/mac/WebView/WebFramePrivate.h:

Canonical link: https://commits.webkit.org/279873@main
  • Loading branch information
annevk authored and mnutt committed Jun 30, 2024
1 parent 5b1469a commit 4080dcf
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ namespace WebCore {
macro(abortSteps) \
macro(addAbortAlgorithmToSignal) \
macro(appendFromJS) \
macro(applicationCache) \
macro(associatedReadableByteStreamController) \
macro(autoAllocateChunkSize) \
macro(backingMap) \
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/page/DOMWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,6 @@ ExceptionOr<Navigator&> DOMWindow::navigator()
return localThis->navigator();
}

ExceptionOr<DOMApplicationCache&> DOMWindow::applicationCache()
{
auto* localThis = dynamicDowncast<LocalDOMWindow>(*this);
if (!localThis)
return Exception { ExceptionCode::SecurityError };
return localThis->applicationCache();
}

ExceptionOr<bool> DOMWindow::offscreenBuffering() const
{
auto* localThis = dynamicDowncast<LocalDOMWindow>(*this);
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/page/DOMWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class CSSStyleDeclaration;
class CookieStore;
class Crypto;
class CustomElementRegistry;
class DOMApplicationCache;
class DOMSelection;
class DOMWrapperWorld;
class Document;
Expand Down Expand Up @@ -157,7 +156,6 @@ class DOMWindow : public RefCounted<DOMWindow>, public EventTarget {
ExceptionOr<int> scrollY() const;
ExceptionOr<HTMLFrameOwnerElement*> frameElement() const;
ExceptionOr<Navigator&> navigator();
ExceptionOr<DOMApplicationCache&> applicationCache();
ExceptionOr<bool> offscreenBuffering() const;
ExceptionOr<CookieStore&> cookieStore();
ExceptionOr<Screen&> screen();
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/page/DOMWindow.idl
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@
// the user agent
readonly attribute Navigator navigator;
[Replaceable, ImplementedAs=navigator] readonly attribute Navigator clientInformation;
// FIXME: This is specified to be [SecureContext]
[EnabledByQuirk=shouldEnableApplicationCache] readonly attribute DOMApplicationCache applicationCache;

// user prompts
undefined alert();
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/page/LocalDOMWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "CrossOriginOpenerPolicy.h"
#include "Crypto.h"
#include "CustomElementRegistry.h"
#include "DOMApplicationCache.h"
#include "DOMSelection.h"
#include "DOMStringList.h"
#include "DOMTimer.h"
Expand Down Expand Up @@ -754,13 +753,6 @@ BarProp& LocalDOMWindow::toolbar()
return *m_toolbar;
}

DOMApplicationCache& LocalDOMWindow::applicationCache()
{
if (!m_applicationCache)
m_applicationCache = DOMApplicationCache::create(*this);
return *m_applicationCache;
}

Navigator& LocalDOMWindow::navigator()
{
if (!m_navigator)
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/page/LocalDOMWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ class LocalDOMWindow final
Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
Storage* optionalLocalStorage() const { return m_localStorage.get(); }

DOMApplicationCache& applicationCache();
DOMApplicationCache* optionalApplicationCache() const { return m_applicationCache.get(); }

CustomElementRegistry* customElementRegistry() { return m_customElementRegistry.get(); }
CustomElementRegistry& ensureCustomElementRegistry();

Expand Down Expand Up @@ -432,7 +429,6 @@ class LocalDOMWindow final

mutable RefPtr<Storage> m_sessionStorage;
mutable RefPtr<Storage> m_localStorage;
mutable RefPtr<DOMApplicationCache> m_applicationCache;

RefPtr<CustomElementRegistry> m_customElementRegistry;

Expand Down
1 change: 0 additions & 1 deletion Source/WebKitLegacy/mac/WebKit.exp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ _WebFrameCanSuspendActiveDOMObjects
_WebFrameHasPlugins
_WebFrameHasUnloadListener
_WebFrameMainDocumentError
_WebFrameUsesApplicationCache
_WebFrameUsesDatabases
_WebFrameUsesGeolocation
_WebHistoryAllItemsRemovedNotification
Expand Down
3 changes: 0 additions & 3 deletions Source/WebKitLegacy/mac/WebView/WebFrame.mm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ Repeat load of the same URL (by any other means of navigation other than the rel
NSString *WebFrameHasUnloadListener = @"WebFrameHasUnloadListenerKey";
NSString *WebFrameUsesDatabases = @"WebFrameUsesDatabasesKey";
NSString *WebFrameUsesGeolocation = @"WebFrameUsesGeolocationKey";
NSString *WebFrameUsesApplicationCache = @"WebFrameUsesApplicationCacheKey";
NSString *WebFrameCanSuspendActiveDOMObjects = @"WebFrameCanSuspendActiveDOMObjectsKey";

// FIXME: Remove when this key becomes publicly defined
Expand Down Expand Up @@ -2040,8 +2039,6 @@ - (NSMutableDictionary *)_cacheabilityDictionary
if (auto* domWindow = _private->coreFrame->document()->domWindow()) {
if (domWindow->hasEventListeners(WebCore::eventNames().unloadEvent))
[result setObject:@YES forKey:WebFrameHasUnloadListener];
if (domWindow->optionalApplicationCache())
[result setObject:@YES forKey:WebFrameUsesApplicationCache];
}

if (auto* document = _private->coreFrame->document()) {
Expand Down
1 change: 0 additions & 1 deletion Source/WebKitLegacy/mac/WebView/WebFramePrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ extern NSString *WebFrameHasPlugins;
extern NSString *WebFrameHasUnloadListener;
extern NSString *WebFrameUsesDatabases;
extern NSString *WebFrameUsesGeolocation;
extern NSString *WebFrameUsesApplicationCache;
extern NSString *WebFrameCanSuspendActiveDOMObjects;

typedef enum {
Expand Down

0 comments on commit 4080dcf

Please sign in to comment.