| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 static bool isAcceptableCSSStyleSheetParent(const Node& parentNode) { | 73 static bool isAcceptableCSSStyleSheetParent(const Node& parentNode) { |
| 74 // Only these nodes can be parents of StyleSheets, and they need to call | 74 // Only these nodes can be parents of StyleSheets, and they need to call |
| 75 // clearOwnerNode() when moved out of document. Note that destructor of | 75 // clearOwnerNode() when moved out of document. Note that destructor of |
| 76 // the nodes don't call clearOwnerNode() with Oilpan. | 76 // the nodes don't call clearOwnerNode() with Oilpan. |
| 77 return parentNode.isDocumentNode() || isHTMLLinkElement(parentNode) || | 77 return parentNode.isDocumentNode() || isHTMLLinkElement(parentNode) || |
| 78 isHTMLStyleElement(parentNode) || isSVGStyleElement(parentNode) || | 78 isHTMLStyleElement(parentNode) || isSVGStyleElement(parentNode) || |
| 79 parentNode.getNodeType() == Node::kProcessingInstructionNode; | 79 parentNode.getNodeType() == Node::kProcessingInstructionNode; |
| 80 } | 80 } |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 // static |
| 84 const Document* CSSStyleSheet::singleOwnerDocument( |
| 85 const CSSStyleSheet* styleSheet) { |
| 86 if (styleSheet) |
| 87 return StyleSheetContents::singleOwnerDocument(styleSheet->contents()); |
| 88 return nullptr; |
| 89 } |
| 90 |
| 83 CSSStyleSheet* CSSStyleSheet::create(StyleSheetContents* sheet, | 91 CSSStyleSheet* CSSStyleSheet::create(StyleSheetContents* sheet, |
| 84 CSSImportRule* ownerRule) { | 92 CSSImportRule* ownerRule) { |
| 85 return new CSSStyleSheet(sheet, ownerRule); | 93 return new CSSStyleSheet(sheet, ownerRule); |
| 86 } | 94 } |
| 87 | 95 |
| 88 CSSStyleSheet* CSSStyleSheet::create(StyleSheetContents* sheet, | 96 CSSStyleSheet* CSSStyleSheet::create(StyleSheetContents* sheet, |
| 89 Node& ownerNode) { | 97 Node& ownerNode) { |
| 90 return new CSSStyleSheet(sheet, ownerNode, false, | 98 return new CSSStyleSheet(sheet, ownerNode, false, |
| 91 TextPosition::minimumPosition()); | 99 TextPosition::minimumPosition()); |
| 92 } | 100 } |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 visitor->trace(m_deviceDependentMediaQueryResults); | 449 visitor->trace(m_deviceDependentMediaQueryResults); |
| 442 visitor->trace(m_ownerNode); | 450 visitor->trace(m_ownerNode); |
| 443 visitor->trace(m_ownerRule); | 451 visitor->trace(m_ownerRule); |
| 444 visitor->trace(m_mediaCSSOMWrapper); | 452 visitor->trace(m_mediaCSSOMWrapper); |
| 445 visitor->trace(m_childRuleCSSOMWrappers); | 453 visitor->trace(m_childRuleCSSOMWrappers); |
| 446 visitor->trace(m_ruleListCSSOMWrapper); | 454 visitor->trace(m_ruleListCSSOMWrapper); |
| 447 StyleSheet::trace(visitor); | 455 StyleSheet::trace(visitor); |
| 448 } | 456 } |
| 449 | 457 |
| 450 } // namespace blink | 458 } // namespace blink |
| OLD | NEW |