| 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, (eventNames().lo
adEvent)); | 57 DEFINE_STATIC_LOCAL(LinkEventSender, sharedLoadEventSender, (eventNames().lo
adEvent)); |
| 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(const QualifiedName& tagName, Document&
document, bool createdByParser) |
| 62 : HTMLElement(tagName, document) | 62 : HTMLElement(tagName, 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)); | 69 ASSERT(hasTagName(linkTag)); |
| 70 ScriptWrappable::init(this); | 70 ScriptWrappable::init(this); |
| 71 } | 71 } |
| 72 | 72 |
| 73 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(const QualifiedName& tagName
, Document* document, bool createdByParser) | 73 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(const QualifiedName& tagName
, Document& document, bool createdByParser) |
| 74 { | 74 { |
| 75 return adoptRef(new HTMLLinkElement(tagName, document, createdByParser)); | 75 return adoptRef(new HTMLLinkElement(tagName, document, createdByParser)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 HTMLLinkElement::~HTMLLinkElement() | 78 HTMLLinkElement::~HTMLLinkElement() |
| 79 { | 79 { |
| 80 m_link.clear(); | 80 m_link.clear(); |
| 81 | 81 |
| 82 if (inDocument()) | 82 if (inDocument()) |
| 83 document().styleSheetCollections()->removeStyleSheetCandidateNode(this); | 83 document().styleSheetCollections()->removeStyleSheetCandidateNode(this); |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 void LinkStyle::ownerRemoved() | 639 void LinkStyle::ownerRemoved() |
| 640 { | 640 { |
| 641 if (m_sheet) | 641 if (m_sheet) |
| 642 clearSheet(); | 642 clearSheet(); |
| 643 | 643 |
| 644 if (styleSheetIsLoading()) | 644 if (styleSheetIsLoading()) |
| 645 removePendingSheet(RemovePendingSheetNotifyLater); | 645 removePendingSheet(RemovePendingSheetNotifyLater); |
| 646 } | 646 } |
| 647 | 647 |
| 648 } // namespace WebCore | 648 } // namespace WebCore |
| OLD | NEW |