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

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

Issue 202633009: Add Element::subResourceAttributeName() virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use nullQName() Created 6 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
« no previous file with comments | « Source/core/html/HTMLLinkElement.h ('k') | Source/core/html/HTMLModElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLLinkElement.cpp
diff --git a/Source/core/html/HTMLLinkElement.cpp b/Source/core/html/HTMLLinkElement.cpp
index 199e4cf1b923d1e1b79c4d48ec1ed929c1a4382f..09d7978407ba205c56c5fc7c533bda8ad0a8d7ac 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -405,6 +405,17 @@ bool HTMLLinkElement::hasLegalLinkAttribute(const QualifiedName& name) const
return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name);
}
+const QualifiedName& HTMLLinkElement::subResourceAttributeName() const
+{
+ // If the link element is not css, ignore it.
+ if (equalIgnoringCase(getAttribute(typeAttr), "text/css")) {
+ // FIXME: Add support for extracting links of sub-resources which
+ // are inside style-sheet such as @import, @font-face, url(), etc.
+ return hrefAttr;
+ }
+ return HTMLElement::subResourceAttributeName();
+}
+
KURL HTMLLinkElement::href() const
{
return document().completeURL(getAttribute(hrefAttr));
« no previous file with comments | « Source/core/html/HTMLLinkElement.h ('k') | Source/core/html/HTMLModElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698