Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp

Issue 1781783002: Implement support for link type serviceworker in link elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uppercase W in runtime feature name Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 875eea3a54024e0f4a9d65f4cb24f6ec3ac72b7f..8fac39c3f48f6a3fa22ad1a0b72762015aa855a7 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -193,6 +193,9 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicStri
} else if (name == mediaAttr) {
m_media = value.lower();
process();
+ } else if (name == scopeAttr) {
+ m_scope = value;
+ process();
} else if (name == disabledAttr) {
UseCounter::count(document(), UseCounter::HTMLLinkElementDisabled);
if (LinkStyle* link = linkStyle())
@@ -230,6 +233,9 @@ LinkResource* HTMLLinkElement::linkResourceToProcess()
m_link = LinkImport::create(this);
} else if (m_relAttribute.isManifest()) {
m_link = LinkManifest::create(this);
+ } else if (RuntimeEnabledFeatures::linkServiceWorkerEnabled() && m_relAttribute.isServiceWorker()) {
+ if (document().frame())
+ m_link = document().frame()->loader().client()->createServiceWorkerLinkResource(this);
} else {
OwnPtrWillBeRawPtr<LinkStyle> link = LinkStyle::create(this);
if (fastHasAttribute(disabledAttr)) {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.h ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698