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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLLinkElement.h ('k') | Source/core/html/HTMLModElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const 398 bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const
399 { 399 {
400 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute); 400 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute);
401 } 401 }
402 402
403 bool HTMLLinkElement::hasLegalLinkAttribute(const QualifiedName& name) const 403 bool HTMLLinkElement::hasLegalLinkAttribute(const QualifiedName& name) const
404 { 404 {
405 return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name); 405 return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name);
406 } 406 }
407 407
408 const QualifiedName& HTMLLinkElement::subResourceAttributeName() const
409 {
410 // If the link element is not css, ignore it.
411 if (equalIgnoringCase(getAttribute(typeAttr), "text/css")) {
412 // FIXME: Add support for extracting links of sub-resources which
413 // are inside style-sheet such as @import, @font-face, url(), etc.
414 return hrefAttr;
415 }
416 return HTMLElement::subResourceAttributeName();
417 }
418
408 KURL HTMLLinkElement::href() const 419 KURL HTMLLinkElement::href() const
409 { 420 {
410 return document().completeURL(getAttribute(hrefAttr)); 421 return document().completeURL(getAttribute(hrefAttr));
411 } 422 }
412 423
413 const AtomicString& HTMLLinkElement::rel() const 424 const AtomicString& HTMLLinkElement::rel() const
414 { 425 {
415 return getAttribute(relAttr); 426 return getAttribute(relAttr);
416 } 427 }
417 428
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 void LinkStyle::ownerRemoved() 720 void LinkStyle::ownerRemoved()
710 { 721 {
711 if (m_sheet) 722 if (m_sheet)
712 clearSheet(); 723 clearSheet();
713 724
714 if (styleSheetIsLoading()) 725 if (styleSheetIsLoading())
715 removePendingSheet(RemovePendingSheetNotifyLater); 726 removePendingSheet(RemovePendingSheetNotifyLater);
716 } 727 }
717 728
718 } // namespace WebCore 729 } // namespace WebCore
OLDNEW
« 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