| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 return; | 223 return; |
| 224 | 224 |
| 225 m_linkLoader.released(); | 225 m_linkLoader.released(); |
| 226 | 226 |
| 227 if (m_isInShadowTree) { | 227 if (m_isInShadowTree) { |
| 228 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); | 228 ASSERT(!linkStyle() || !linkStyle()->hasSheet()); |
| 229 return; | 229 return; |
| 230 } | 230 } |
| 231 document().styleEngine()->removeStyleSheetCandidateNode(this); | 231 document().styleEngine()->removeStyleSheetCandidateNode(this); |
| 232 | 232 |
| 233 RefPtr<StyleSheet> removedSheet = sheet(); | 233 RefPtrWillBeRawPtr<StyleSheet> removedSheet = sheet(); |
| 234 | 234 |
| 235 if (m_link) | 235 if (m_link) |
| 236 m_link->ownerRemoved(); | 236 m_link->ownerRemoved(); |
| 237 | 237 |
| 238 document().removedStyleSheet(removedSheet.get()); | 238 document().removedStyleSheet(removedSheet.get()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void HTMLLinkElement::finishParsingChildren() | 241 void HTMLLinkElement::finishParsingChildren() |
| 242 { | 242 { |
| 243 m_createdByParser = false; | 243 m_createdByParser = false; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 } | 609 } |
| 610 setResource(document().fetcher()->fetchCSSStyleSheet(request)); | 610 setResource(document().fetcher()->fetchCSSStyleSheet(request)); |
| 611 | 611 |
| 612 if (!resource()) { | 612 if (!resource()) { |
| 613 // The request may have been denied if (for example) the stylesheet
is local and the document is remote. | 613 // The request may have been denied if (for example) the stylesheet
is local and the document is remote. |
| 614 m_loading = false; | 614 m_loading = false; |
| 615 removePendingSheet(); | 615 removePendingSheet(); |
| 616 } | 616 } |
| 617 } else if (m_sheet) { | 617 } else if (m_sheet) { |
| 618 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang
ed | 618 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang
ed |
| 619 RefPtr<StyleSheet> removedSheet = m_sheet; | 619 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); |
| 620 clearSheet(); | 620 clearSheet(); |
| 621 document().removedStyleSheet(removedSheet.get()); | 621 document().removedStyleSheet(removedSheet.get()); |
| 622 } | 622 } |
| 623 } | 623 } |
| 624 | 624 |
| 625 void LinkStyle::setSheetTitle(const String& title) | 625 void LinkStyle::setSheetTitle(const String& title) |
| 626 { | 626 { |
| 627 if (m_sheet) | 627 if (m_sheet) |
| 628 m_sheet->setTitle(title); | 628 m_sheet->setTitle(title); |
| 629 } | 629 } |
| 630 | 630 |
| 631 void LinkStyle::ownerRemoved() | 631 void LinkStyle::ownerRemoved() |
| 632 { | 632 { |
| 633 if (m_sheet) | 633 if (m_sheet) |
| 634 clearSheet(); | 634 clearSheet(); |
| 635 | 635 |
| 636 if (styleSheetIsLoading()) | 636 if (styleSheetIsLoading()) |
| 637 removePendingSheet(RemovePendingSheetNotifyLater); | 637 removePendingSheet(RemovePendingSheetNotifyLater); |
| 638 } | 638 } |
| 639 | 639 |
| 640 } // namespace WebCore | 640 } // namespace WebCore |
| OLD | NEW |