| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 StyleRuleImport::StyleRuleImport(const String& href, MediaQuerySet* media) | 39 StyleRuleImport::StyleRuleImport(const String& href, MediaQuerySet* media) |
| 40 : StyleRuleBase(Import), | 40 : StyleRuleBase(Import), |
| 41 m_parentStyleSheet(nullptr), | 41 m_parentStyleSheet(nullptr), |
| 42 m_styleSheetClient(new ImportedStyleSheetClient(this)), | 42 m_styleSheetClient(new ImportedStyleSheetClient(this)), |
| 43 m_strHref(href), | 43 m_strHref(href), |
| 44 m_mediaQueries(media), | 44 m_mediaQueries(media), |
| 45 m_loading(false) { | 45 m_loading(false) { |
| 46 if (!m_mediaQueries) | 46 if (!m_mediaQueries) |
| 47 m_mediaQueries = MediaQuerySet::create(String()); | 47 m_mediaQueries = MediaQuerySet::create(String()); |
| 48 | |
| 49 ThreadState::current()->registerPreFinalizer(this); | |
| 50 } | 48 } |
| 51 | 49 |
| 52 StyleRuleImport::~StyleRuleImport() {} | 50 StyleRuleImport::~StyleRuleImport() {} |
| 53 | 51 |
| 54 void StyleRuleImport::dispose() { | 52 void StyleRuleImport::dispose() { |
| 55 if (m_resource) | 53 if (m_resource) |
| 56 m_resource->removeClient(m_styleSheetClient); | 54 m_resource->removeClient(m_styleSheetClient); |
| 57 m_resource = nullptr; | 55 m_resource = nullptr; |
| 58 } | 56 } |
| 59 | 57 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // the sheet being imported is pending. | 142 // the sheet being imported is pending. |
| 145 if (m_parentStyleSheet && m_parentStyleSheet->loadCompleted() && | 143 if (m_parentStyleSheet && m_parentStyleSheet->loadCompleted() && |
| 146 rootSheet == m_parentStyleSheet) | 144 rootSheet == m_parentStyleSheet) |
| 147 m_parentStyleSheet->startLoadingDynamicSheet(); | 145 m_parentStyleSheet->startLoadingDynamicSheet(); |
| 148 m_loading = true; | 146 m_loading = true; |
| 149 m_resource->addClient(m_styleSheetClient); | 147 m_resource->addClient(m_styleSheetClient); |
| 150 } | 148 } |
| 151 } | 149 } |
| 152 | 150 |
| 153 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |