diff options
Diffstat (limited to 'WebCore/loader')
-rw-r--r-- | WebCore/loader/CachedResourceClient.h | 2 | ||||
-rw-r--r-- | WebCore/loader/CrossOriginAccessControl.h | 3 | ||||
-rw-r--r-- | WebCore/loader/CrossOriginPreflightResultCache.cpp | 2 | ||||
-rw-r--r-- | WebCore/loader/DocumentLoadTiming.h | 4 | ||||
-rw-r--r-- | WebCore/loader/DocumentLoader.h | 1 | ||||
-rw-r--r-- | WebCore/loader/DocumentThreadableLoader.h | 2 | ||||
-rw-r--r-- | WebCore/loader/EmptyClients.h | 9 | ||||
-rw-r--r-- | WebCore/loader/FrameLoader.cpp | 10 | ||||
-rw-r--r-- | WebCore/loader/FrameLoaderClient.h | 1 | ||||
-rw-r--r-- | WebCore/loader/RedirectScheduler.h | 2 | ||||
-rw-r--r-- | WebCore/loader/SubframeLoader.h | 1 | ||||
-rw-r--r-- | WebCore/loader/TextResourceDecoder.cpp | 2 | ||||
-rw-r--r-- | WebCore/loader/appcache/ApplicationCacheGroup.cpp | 26 | ||||
-rw-r--r-- | WebCore/loader/appcache/ApplicationCacheStorage.cpp | 2 | ||||
-rw-r--r-- | WebCore/loader/appcache/DOMApplicationCache.h | 3 | ||||
-rw-r--r-- | WebCore/loader/archive/ArchiveFactory.h | 2 | ||||
-rw-r--r-- | WebCore/loader/icon/IconDatabaseClient.h | 3 |
17 files changed, 31 insertions, 44 deletions
diff --git a/WebCore/loader/CachedResourceClient.h b/WebCore/loader/CachedResourceClient.h index be3f87e..40a6a06 100644 --- a/WebCore/loader/CachedResourceClient.h +++ b/WebCore/loader/CachedResourceClient.h @@ -26,6 +26,7 @@ #define CachedResourceClient_h #include <wtf/FastAllocBase.h> +#include <wtf/Forward.h> #if ENABLE(XBL) namespace XBL { @@ -39,7 +40,6 @@ namespace WebCore { class CachedFont; class CachedResource; class CachedImage; - class String; class Image; class IntRect; class KURL; diff --git a/WebCore/loader/CrossOriginAccessControl.h b/WebCore/loader/CrossOriginAccessControl.h index 4a904d6..c44963b 100644 --- a/WebCore/loader/CrossOriginAccessControl.h +++ b/WebCore/loader/CrossOriginAccessControl.h @@ -24,12 +24,13 @@ * */ +#include <wtf/Forward.h> + namespace WebCore { class HTTPHeaderMap; class ResourceResponse; class SecurityOrigin; - class String; bool isSimpleCrossOriginAccessRequest(const String& method, const HTTPHeaderMap&); bool isOnAccessControlSimpleRequestMethodWhitelist(const String&); diff --git a/WebCore/loader/CrossOriginPreflightResultCache.cpp b/WebCore/loader/CrossOriginPreflightResultCache.cpp index f0211af..51874d1 100644 --- a/WebCore/loader/CrossOriginPreflightResultCache.cpp +++ b/WebCore/loader/CrossOriginPreflightResultCache.cpp @@ -128,7 +128,7 @@ bool CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders(const HTTPHea HTTPHeaderMap::const_iterator end = requestHeaders.end(); for (HTTPHeaderMap::const_iterator it = requestHeaders.begin(); it != end; ++it) { if (!m_headers.contains(it->first) && !isOnAccessControlSimpleRequestHeaderWhitelist(it->first, it->second)) { - errorDescription = "Request header field " + it->first + " is not allowed by Access-Control-Allow-Headers."; + errorDescription = "Request header field " + it->first.string() + " is not allowed by Access-Control-Allow-Headers."; return false; } } diff --git a/WebCore/loader/DocumentLoadTiming.h b/WebCore/loader/DocumentLoadTiming.h index 71a1dc4..2d4b0fa 100644 --- a/WebCore/loader/DocumentLoadTiming.h +++ b/WebCore/loader/DocumentLoadTiming.h @@ -26,11 +26,9 @@ #ifndef DocumentLoadTiming_h #define DocumentLoadTiming_h -#include <wtf/Noncopyable.h> - namespace WebCore { -struct DocumentLoadTiming : public Noncopyable { +struct DocumentLoadTiming { DocumentLoadTiming() : navigationStart(0.0) , unloadEventEnd(0.0) diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h index 2bd0761..d9e7581 100644 --- a/WebCore/loader/DocumentLoader.h +++ b/WebCore/loader/DocumentLoader.h @@ -211,6 +211,7 @@ namespace WebCore { void takeMemoryCacheLoadsForClientNotification(Vector<String>& loads); DocumentLoadTiming* timing() { return &m_documentLoadTiming; } + void resetTiming() { m_documentLoadTiming = DocumentLoadTiming(); } #if ENABLE(OFFLINE_WEB_APPLICATIONS) ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); } diff --git a/WebCore/loader/DocumentThreadableLoader.h b/WebCore/loader/DocumentThreadableLoader.h index 9800b9a..ebf3a25 100644 --- a/WebCore/loader/DocumentThreadableLoader.h +++ b/WebCore/loader/DocumentThreadableLoader.h @@ -34,6 +34,7 @@ #include "FrameLoaderTypes.h" #include "SubresourceLoaderClient.h" #include "ThreadableLoader.h" +#include <wtf/Forward.h> #include <wtf/OwnPtr.h> #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> @@ -43,7 +44,6 @@ namespace WebCore { class Document; class KURL; class ResourceRequest; - class String; class ThreadableLoaderClient; class DocumentThreadableLoader : public RefCounted<DocumentThreadableLoader>, public ThreadableLoader, private SubresourceLoaderClient { diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h index c40e3cc..0d30713 100644 --- a/WebCore/loader/EmptyClients.h +++ b/WebCore/loader/EmptyClients.h @@ -31,6 +31,7 @@ #include "ChromeClient.h" #include "Console.h" #include "ContextMenuClient.h" +#include "DeviceMotionClient.h" #include "DeviceOrientationClient.h" #include "DocumentLoader.h" #include "DragClient.h" @@ -540,6 +541,14 @@ public: virtual bool sendMessageToFrontend(const String&) { return false; } }; +class EmptyDeviceMotionClient : public DeviceMotionClient { +public: + virtual void setController(DeviceMotionController*) { } + virtual void startUpdating() { } + virtual void stopUpdating() { } + virtual DeviceMotionData* currentDeviceMotion() const { return 0; } +}; + class EmptyDeviceOrientationClient : public DeviceOrientationClient { public: virtual void setController(DeviceOrientationController*) { } diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index f36aa60..8307c15 100644 --- a/WebCore/loader/FrameLoader.cpp +++ b/WebCore/loader/FrameLoader.cpp @@ -98,9 +98,9 @@ #include "ScriptController.h" #include "ScriptSourceCode.h" #include "ScriptString.h" -#include "ScriptValue.h" #include "SecurityOrigin.h" #include "SegmentedString.h" +#include "SerializedScriptValue.h" #include "Settings.h" #include "TextResourceDecoder.h" #include "WindowFeatures.h" @@ -466,8 +466,7 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic if (m_provisionalDocumentLoader) { DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing(); ASSERT(timing->navigationStart); - // FIXME: This fails in Safari (https://bugs.webkit.org/show_bug.cgi?id=42772). Understand why. - // ASSERT(!timing->unloadEventEnd); + ASSERT(!timing->unloadEventEnd); timing->unloadEventEnd = currentTime(); ASSERT(timing->unloadEventEnd >= timing->navigationStart); } @@ -3189,6 +3188,11 @@ void FrameLoader::loadProvisionalItemFromCachedPage() provisionalLoader->prepareForLoadStart(); m_loadingFromCachedPage = true; + + // Should have timing data from previous time(s) the page was shown. + ASSERT(provisionalLoader->timing()->navigationStart); + provisionalLoader->resetTiming(); + provisionalLoader->timing()->navigationStart = currentTime(); provisionalLoader->setCommitted(true); commitProvisionalLoad(); diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h index c7bd456..26a1259 100644 --- a/WebCore/loader/FrameLoaderClient.h +++ b/WebCore/loader/FrameLoaderClient.h @@ -75,7 +75,6 @@ namespace WebCore { class SecurityOrigin; class SharedBuffer; class SubstituteData; - class String; class Widget; typedef void (PolicyChecker::*FramePolicyFunction)(PolicyAction); diff --git a/WebCore/loader/RedirectScheduler.h b/WebCore/loader/RedirectScheduler.h index e9d04dc..0203e08 100644 --- a/WebCore/loader/RedirectScheduler.h +++ b/WebCore/loader/RedirectScheduler.h @@ -33,6 +33,7 @@ #include "Event.h" #include "Timer.h" +#include <wtf/Forward.h> #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> @@ -42,7 +43,6 @@ namespace WebCore { class FormState; class FormSubmission; class Frame; -class String; struct FrameLoadRequest; class ScheduledNavigation; diff --git a/WebCore/loader/SubframeLoader.h b/WebCore/loader/SubframeLoader.h index 4bdb787..df08870 100644 --- a/WebCore/loader/SubframeLoader.h +++ b/WebCore/loader/SubframeLoader.h @@ -40,7 +40,6 @@ namespace WebCore { -class AtomicString; class Frame; class FrameLoaderClient; class HTMLAppletElement; diff --git a/WebCore/loader/TextResourceDecoder.cpp b/WebCore/loader/TextResourceDecoder.cpp index 6d43d77..4002b38 100644 --- a/WebCore/loader/TextResourceDecoder.cpp +++ b/WebCore/loader/TextResourceDecoder.cpp @@ -488,7 +488,7 @@ bool TextResourceDecoder::checkForCSSCharset(const char* data, size_t len, bool& if (pos == dataEnd) return false; - int encodingNameLength = pos - dataStart + 1; + int encodingNameLength = pos - dataStart; ++pos; if (!skipWhitespace(pos, dataEnd)) diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp index 395d9ad..3ae8d9f 100644 --- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp +++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp @@ -1079,25 +1079,6 @@ private: ApplicationCacheGroup* m_cacheGroup; }; -class OriginQuotaReachedCallbackTimer: public TimerBase { -public: - OriginQuotaReachedCallbackTimer(ApplicationCacheGroup* cacheGroup, Frame* frame) - : m_cacheGroup(cacheGroup) - , m_frame(frame) - { - } - -private: - virtual void fired() - { - m_cacheGroup->didReachOriginQuota(m_frame.release()); - delete this; - } - - ApplicationCacheGroup* m_cacheGroup; - RefPtr<Frame> m_frame; -}; - void ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback() { ASSERT(isMainThread()); @@ -1108,11 +1089,8 @@ void ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback() void ApplicationCacheGroup::scheduleReachedOriginQuotaCallback() { - ASSERT(isMainThread()); - RefPtr<Frame> frameProtector = m_frame; - OriginQuotaReachedCallbackTimer* timer = new OriginQuotaReachedCallbackTimer(this, frameProtector.get()); - timer->startOneShot(0); - // The timer will delete itself once it fires. + // FIXME: it might be nice to run this asynchronously, because there is no return value to wait for. + didReachOriginQuota(m_frame); } class CallCacheListenerTask : public ScriptExecutionContext::Task { diff --git a/WebCore/loader/appcache/ApplicationCacheStorage.cpp b/WebCore/loader/appcache/ApplicationCacheStorage.cpp index ec83911..5624809 100644 --- a/WebCore/loader/appcache/ApplicationCacheStorage.cpp +++ b/WebCore/loader/appcache/ApplicationCacheStorage.cpp @@ -518,7 +518,7 @@ bool ApplicationCacheStorage::remainingSizeForOriginExcludingCache(const Securit bool ApplicationCacheStorage::storeUpdatedQuotaForOrigin(const SecurityOrigin* origin, int64_t quota) { - openDatabase(false); + openDatabase(true); if (!m_database.isOpen()) return false; diff --git a/WebCore/loader/appcache/DOMApplicationCache.h b/WebCore/loader/appcache/DOMApplicationCache.h index b398756..de0614a 100644 --- a/WebCore/loader/appcache/DOMApplicationCache.h +++ b/WebCore/loader/appcache/DOMApplicationCache.h @@ -33,6 +33,7 @@ #include "EventListener.h" #include "EventNames.h" #include "EventTarget.h" +#include <wtf/Forward.h> #include <wtf/HashMap.h> #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> @@ -40,10 +41,8 @@ namespace WebCore { -class AtomicStringImpl; class Frame; class KURL; -class String; class DOMApplicationCache : public RefCounted<DOMApplicationCache>, public EventTarget { public: diff --git a/WebCore/loader/archive/ArchiveFactory.h b/WebCore/loader/archive/ArchiveFactory.h index bf1d5c6..c3b9464 100644 --- a/WebCore/loader/archive/ArchiveFactory.h +++ b/WebCore/loader/archive/ArchiveFactory.h @@ -31,12 +31,12 @@ #include "Archive.h" +#include <wtf/Forward.h> #include <wtf/PassRefPtr.h> namespace WebCore { class SharedBuffer; -class String; class ArchiveFactory { public: diff --git a/WebCore/loader/icon/IconDatabaseClient.h b/WebCore/loader/icon/IconDatabaseClient.h index 1811214..c210d7d 100644 --- a/WebCore/loader/icon/IconDatabaseClient.h +++ b/WebCore/loader/icon/IconDatabaseClient.h @@ -29,6 +29,7 @@ #ifndef IconDatabaseClient_h #define IconDatabaseClient_h +#include <wtf/Forward.h> #include <wtf/Noncopyable.h> // All of these client methods will be called from a non-main thread @@ -36,8 +37,6 @@ namespace WebCore { -class String; - class IconDatabaseClient : public Noncopyable { public: virtual ~IconDatabaseClient() { } |