Index: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
index d7c296d5ff41a0f409326dc1c4d7b1729f323c9b..20994908b8bc876374d81b8b76daa54784936cd0 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
@@ -45,6 +45,19 @@ |
namespace blink { |
+namespace { |
+WebServiceWorkerUpdateViaCache ParseUpdateViaCache(const AtomicString& value) { |
+ if (value == "imports") |
+ return WebServiceWorkerUpdateViaCache::kImports; |
+ if (value == "all") |
+ return WebServiceWorkerUpdateViaCache::kAll; |
+ if (value == "none") |
+ return WebServiceWorkerUpdateViaCache::kNone; |
+ // Default value |
+ return WebServiceWorkerUpdateViaCache::kImports; |
+} |
+} // namespace |
+ |
using namespace HTMLNames; |
inline HTMLLinkElement::HTMLLinkElement(Document& document, |
@@ -102,6 +115,9 @@ void HTMLLinkElement::ParseAttribute( |
} else if (name == scopeAttr) { |
scope_ = value; |
Process(); |
+ } else if (name == updateviacacheAttr) { |
+ update_via_cache_ = ParseUpdateViaCache(value); |
+ Process(); |
} else if (name == disabledAttr) { |
UseCounter::Count(GetDocument(), WebFeature::kHTMLLinkElementDisabled); |
if (LinkStyle* link = GetLinkStyle()) |