Title: [263898] trunk/Source/WebCore
- Revision
- 263898
- Author
- wei...@apple.com
- Date
- 2020-07-03 08:01:18 -0700 (Fri, 03 Jul 2020)
Log Message
Cleanup ApplicationCacheManifestParser.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=213844
Reviewed by Alex Christensen.
Address some post review comments.
* loader/appcache/ApplicationCacheManifestParser.cpp:
(WebCore::parseApplicationCacheManifest):
Fix typos: manfest -> manifest.
* loader/appcache/ApplicationCacheManifestParser.h:
Stop including ApplicationCache.h, and only include / declare what's needed.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (263897 => 263898)
--- trunk/Source/WebCore/ChangeLog 2020-07-03 15:00:49 UTC (rev 263897)
+++ trunk/Source/WebCore/ChangeLog 2020-07-03 15:01:18 UTC (rev 263898)
@@ -1,3 +1,18 @@
+2020-07-03 Sam Weinig <wei...@apple.com>
+
+ Cleanup ApplicationCacheManifestParser.h/cpp
+ https://bugs.webkit.org/show_bug.cgi?id=213844
+
+ Reviewed by Alex Christensen.
+
+ Address some post review comments.
+
+ * loader/appcache/ApplicationCacheManifestParser.cpp:
+ (WebCore::parseApplicationCacheManifest):
+ Fix typos: manfest -> manifest.
+ * loader/appcache/ApplicationCacheManifestParser.h:
+ Stop including ApplicationCache.h, and only include / declare what's needed.
+
2020-07-03 Youenn Fablet <you...@apple.com>
Support MediaRecorder.onstart
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.cpp (263897 => 263898)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.cpp 2020-07-03 15:00:49 UTC (rev 263897)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.cpp 2020-07-03 15:01:18 UTC (rev 263898)
@@ -28,7 +28,6 @@
#include "ParsingUtilities.h"
#include "TextResourceDecoder.h"
-#include <wtf/URL.h>
#include <wtf/text/StringParsingBuffer.h>
#include <wtf/text/StringView.h>
@@ -75,7 +74,7 @@
Optional<ApplicationCacheManifest> parseApplicationCacheManifest(const URL& manifestURL, const String& manifestMIMEType, const char* data, int length)
{
static constexpr const char cacheManifestMIMEType[] = "text/cache-manifest";
- bool allowFallbackNamespaceOutsideManfestPath = equalLettersIgnoringASCIICase(manifestMIMEType, cacheManifestMIMEType);
+ bool allowFallbackNamespaceOutsideManifestPath = equalLettersIgnoringASCIICase(manifestMIMEType, cacheManifestMIMEType);
auto manifestPath = WebCore::manifestPath(manifestURL);
auto manifestString = TextResourceDecoder::create(ASCIILiteral::fromLiteralUnsafe(cacheManifestMIMEType), "UTF-8")->decodeAndFlush(data, length);
@@ -203,7 +202,7 @@
// Although <https://html.spec.whatwg.org/multipage/offline.html#parsing-cache-manifests> (07/06/2017) saids
// that we should always prefix match the manifest path we only do so if the manifest was served with a non-
// standard HTTP Content-Type header for web compatibility.
- if (!allowFallbackNamespaceOutsideManfestPath && !namespaceURL.path().startsWith(manifestPath))
+ if (!allowFallbackNamespaceOutsideManifestPath && !namespaceURL.path().startsWith(manifestPath))
continue;
// Skip whitespace separating fallback namespace from URL.
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.h (263897 => 263898)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.h 2020-07-03 15:00:49 UTC (rev 263897)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheManifestParser.h 2020-07-03 15:01:18 UTC (rev 263898)
@@ -25,11 +25,15 @@
#pragma once
-#include "ApplicationCache.h"
+#include <utility>
#include <wtf/HashSet.h>
+#include <wtf/URL.h>
+#include <wtf/Vector.h>
namespace WebCore {
+using FallbackURLVector = Vector<std::pair<URL, URL>>;
+
struct ApplicationCacheManifest {
Vector<URL> onlineAllowedURLs;
HashSet<String> explicitURLs;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes