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

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: 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
Index: Source/core/html/HTMLLinkElement.cpp
diff --git a/Source/core/html/HTMLLinkElement.cpp b/Source/core/html/HTMLLinkElement.cpp
index 4133430de7a4392f05fbb38ca441b7d5ccec9d20..d0b7baf57dbcfab5c833a3d18bdb01a1261061c9 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));

Powered by Google App Engine
This is Rietveld 408576698