| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(const QualifiedName& tagName
, Document* document, bool createdByParser) | 75 PassRefPtr<HTMLLinkElement> HTMLLinkElement::create(const QualifiedName& tagName
, Document* document, bool createdByParser) |
| 76 { | 76 { |
| 77 return adoptRef(new HTMLLinkElement(tagName, document, createdByParser)); | 77 return adoptRef(new HTMLLinkElement(tagName, document, createdByParser)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 HTMLLinkElement::~HTMLLinkElement() | 80 HTMLLinkElement::~HTMLLinkElement() |
| 81 { | 81 { |
| 82 if (m_sheet) | 82 if (m_sheet) |
| 83 m_sheet->clearOwnerNode(); | 83 m_sheet->clearOwnerNode(); |
| 84 | 84 |
| 85 if (m_cachedSheet) { | 85 if (m_cachedSheet) |
| 86 m_cachedSheet->removeClient(this); | 86 m_cachedSheet->removeClient(this); |
| 87 removePendingSheet(); | |
| 88 } | |
| 89 | 87 |
| 90 if (inDocument()) | 88 if (inDocument()) |
| 91 document()->removeStyleSheetCandidateNode(this); | 89 document()->removeStyleSheetCandidateNode(this); |
| 92 | 90 |
| 93 linkLoadEventSender().cancelEvent(this); | 91 linkLoadEventSender().cancelEvent(this); |
| 94 } | 92 } |
| 95 | 93 |
| 96 void HTMLLinkElement::setDisabledState(bool disabled) | 94 void HTMLLinkElement::setDisabledState(bool disabled) |
| 97 { | 95 { |
| 98 DisabledState oldDisabledState = m_disabledState; | 96 DisabledState oldDisabledState = m_disabledState; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 return; | 257 return; |
| 260 } | 258 } |
| 261 document()->removeStyleSheetCandidateNode(this); | 259 document()->removeStyleSheetCandidateNode(this); |
| 262 | 260 |
| 263 if (m_sheet) { | 261 if (m_sheet) { |
| 264 ASSERT(m_sheet->ownerNode() == this); | 262 ASSERT(m_sheet->ownerNode() == this); |
| 265 m_sheet->clearOwnerNode(); | 263 m_sheet->clearOwnerNode(); |
| 266 m_sheet = 0; | 264 m_sheet = 0; |
| 267 } | 265 } |
| 268 | 266 |
| 267 if (styleSheetIsLoading()) |
| 268 removePendingSheet(); |
| 269 |
| 269 if (document()->renderer()) | 270 if (document()->renderer()) |
| 270 document()->styleSelectorChanged(DeferRecalcStyle); | 271 document()->styleSelectorChanged(DeferRecalcStyle); |
| 271 } | 272 } |
| 272 | 273 |
| 273 void HTMLLinkElement::finishParsingChildren() | 274 void HTMLLinkElement::finishParsingChildren() |
| 274 { | 275 { |
| 275 m_createdByParser = false; | 276 m_createdByParser = false; |
| 276 HTMLElement::finishParsingChildren(); | 277 HTMLElement::finishParsingChildren(); |
| 277 } | 278 } |
| 278 | 279 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 return getURLAttribute(hrefAttr); | 487 return getURLAttribute(hrefAttr); |
| 487 } | 488 } |
| 488 | 489 |
| 489 void HTMLLinkElement::setItemValueText(const String& value, ExceptionCode&) | 490 void HTMLLinkElement::setItemValueText(const String& value, ExceptionCode&) |
| 490 { | 491 { |
| 491 setAttribute(hrefAttr, value); | 492 setAttribute(hrefAttr, value); |
| 492 } | 493 } |
| 493 #endif | 494 #endif |
| 494 | 495 |
| 495 } // namespace WebCore | 496 } // namespace WebCore |
| OLD | NEW |