| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #if ENABLE(ASSERT) | 70 #if ENABLE(ASSERT) |
| 71 static bool isAcceptableCSSStyleSheetParent(Node* parentNode) | 71 static bool isAcceptableCSSStyleSheetParent(Node* parentNode) |
| 72 { | 72 { |
| 73 // Only these nodes can be parents of StyleSheets, and they need to call | 73 // Only these nodes can be parents of StyleSheets, and they need to call |
| 74 // clearOwnerNode() when moved out of document. | 74 // clearOwnerNode() when moved out of document. |
| 75 // Destruction of the style sheet counts as being "moved out of the | 75 // Destruction of the style sheet counts as being "moved out of the |
| 76 // document", but only in the non-oilpan version of blink. I.e. don't call | 76 // document", but only in the non-oilpan version of blink. I.e. don't call |
| 77 // clearOwnerNode() in the owner's destructor in oilpan. | 77 // clearOwnerNode() in the owner's destructor in oilpan. |
| 78 return !parentNode | 78 return !parentNode |
| 79 || parentNode->isDocumentNode() | 79 || parentNode->isDocumentNode() |
| 80 || isHTMLLinkElement(*parentNode) | |
| 81 || isHTMLStyleElement(*parentNode); | 80 || isHTMLStyleElement(*parentNode); |
| 82 } | 81 } |
| 83 #endif | 82 #endif |
| 84 | 83 |
| 85 PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> s
heet) | 84 PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> s
heet) |
| 86 { | 85 { |
| 87 return adoptRef(new CSSStyleSheet(sheet)); | 86 return adoptRef(new CSSStyleSheet(sheet)); |
| 88 } | 87 } |
| 89 | 88 |
| 90 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtr<StyleSheetConte
nts> sheet, Node* ownerNode, const TextPosition& startPosition) | 89 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtr<StyleSheetConte
nts> sheet, Node* ownerNode, const TextPosition& startPosition) |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 visitor->trace(m_contents); | 358 visitor->trace(m_contents); |
| 360 visitor->trace(m_mediaQueries); | 359 visitor->trace(m_mediaQueries); |
| 361 visitor->trace(m_ownerNode); | 360 visitor->trace(m_ownerNode); |
| 362 visitor->trace(m_mediaCSSOMWrapper); | 361 visitor->trace(m_mediaCSSOMWrapper); |
| 363 visitor->trace(m_childRuleCSSOMWrappers); | 362 visitor->trace(m_childRuleCSSOMWrappers); |
| 364 visitor->trace(m_ruleListCSSOMWrapper); | 363 visitor->trace(m_ruleListCSSOMWrapper); |
| 365 StyleSheet::trace(visitor); | 364 StyleSheet::trace(visitor); |
| 366 } | 365 } |
| 367 | 366 |
| 368 } // namespace blink | 367 } // namespace blink |
| OLD | NEW |