| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 namespace WebCore { | 51 namespace WebCore { |
| 52 | 52 |
| 53 using namespace HTMLNames; | 53 using namespace HTMLNames; |
| 54 | 54 |
| 55 static LinkEventSender& linkLoadEventSender() | 55 static LinkEventSender& linkLoadEventSender() |
| 56 { | 56 { |
| 57 DEFINE_STATIC_LOCAL(LinkEventSender, sharedLoadEventSender, (EventTypeNames:
:load)); | 57 DEFINE_STATIC_LOCAL(LinkEventSender, sharedLoadEventSender, (EventTypeNames:
:load)); |
| 58 return sharedLoadEventSender; | 58 return sharedLoadEventSender; |
| 59 } | 59 } |
| 60 | 60 |
| 61 inline HTMLLinkElement::HTMLLinkElement(const QualifiedName& tagName, Document&
document, bool createdByParser) | 61 inline HTMLLinkElement::HTMLLinkElement(Document& document, bool createdByParser
) |
| 62 : HTMLElement(tagName, document) | 62 : HTMLElement(linkTag, document) |
| 63 , m_linkLoader(this) | 63 , m_linkLoader(this) |
| 64 , m_sizes(DOMSettableTokenList::create()) | 64 , m_sizes(DOMSettableTokenList::create()) |
| 65 , m_createdByParser(createdByParser) | 65 , m_createdByParser(createdByParser) |
| 66 , m_isInShadowTree(false) | 66 , m_isInShadowTree(false) |
| 67 , m_beforeLoadRecurseCount(0) | 67 , m_beforeLoadRecurseCount(0) |
| 68 { | 68 { |
| 69 ASSERT(hasTagName(linkTag)); | |
| 70 ScriptWrappable::init(this); | 69 ScriptWrappable::init(this); |
| 71 } | 70 } |
| 72 | 71 |
| 73 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(const QualifiedName& tagName
, Document& document, bool createdByParser) | 72 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(Document& document, bool cre
atedByParser) |
| 74 { | 73 { |
| 75 return adoptRef(new HTMLLinkElement(tagName, document, createdByParser)); | 74 return adoptRef(new HTMLLinkElement(document, createdByParser)); |
| 76 } | 75 } |
| 77 | 76 |
| 78 HTMLLinkElement::~HTMLLinkElement() | 77 HTMLLinkElement::~HTMLLinkElement() |
| 79 { | 78 { |
| 80 m_link.clear(); | 79 m_link.clear(); |
| 81 | 80 |
| 82 if (inDocument()) | 81 if (inDocument()) |
| 83 document().styleEngine()->removeStyleSheetCandidateNode(this); | 82 document().styleEngine()->removeStyleSheetCandidateNode(this); |
| 84 | 83 |
| 85 linkLoadEventSender().cancelEvent(this); | 84 linkLoadEventSender().cancelEvent(this); |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 void LinkStyle::ownerRemoved() | 632 void LinkStyle::ownerRemoved() |
| 634 { | 633 { |
| 635 if (m_sheet) | 634 if (m_sheet) |
| 636 clearSheet(); | 635 clearSheet(); |
| 637 | 636 |
| 638 if (styleSheetIsLoading()) | 637 if (styleSheetIsLoading()) |
| 639 removePendingSheet(RemovePendingSheetNotifyLater); | 638 removePendingSheet(RemovePendingSheetNotifyLater); |
| 640 } | 639 } |
| 641 | 640 |
| 642 } // namespace WebCore | 641 } // namespace WebCore |
| OLD | NEW |