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 058fa55d1ca65e46813fab36f259e1bc5ea7c8c0..ebeaefb836070ba17bcf6d967b15f77db0adeda0 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
@@ -46,6 +46,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, |
@@ -103,6 +116,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()) |