| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // clearOwnerNode() when moved out of document. | 66 // clearOwnerNode() when moved out of document. |
| 67 // Destruction of the style sheet counts as being "moved out of the | 67 // Destruction of the style sheet counts as being "moved out of the |
| 68 // document", but only in the non-oilpan version of blink. I.e. don't call | 68 // document", but only in the non-oilpan version of blink. I.e. don't call |
| 69 // clearOwnerNode() in the owner's destructor in oilpan. | 69 // clearOwnerNode() in the owner's destructor in oilpan. |
| 70 return !parentNode | 70 return !parentNode |
| 71 || parentNode->isDocumentNode() | 71 || parentNode->isDocumentNode() |
| 72 || isHTMLStyleElement(*parentNode); | 72 || isHTMLStyleElement(*parentNode); |
| 73 } | 73 } |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> s
heet) | |
| 77 { | |
| 78 return adoptRef(new CSSStyleSheet(sheet)); | |
| 79 } | |
| 80 | |
| 81 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtr<StyleSheetConte
nts> sheet, Node* ownerNode, const TextPosition& startPosition) | 76 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtr<StyleSheetConte
nts> sheet, Node* ownerNode, const TextPosition& startPosition) |
| 82 { | 77 { |
| 83 ASSERT(sheet); | 78 ASSERT(sheet); |
| 84 return adoptRef(new CSSStyleSheet(sheet, ownerNode, true, startPosition)); | 79 return adoptRef(new CSSStyleSheet(sheet, ownerNode, true, startPosition)); |
| 85 } | 80 } |
| 86 | 81 |
| 87 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node* ownerNode, const KUR
L& baseURL, const TextPosition& startPosition) | 82 PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node* ownerNode, const KUR
L& baseURL, const TextPosition& startPosition) |
| 88 { | 83 { |
| 89 CSSParserContext parserContext(ownerNode->document(), 0, baseURL); | 84 CSSParserContext parserContext(ownerNode->document(), 0, baseURL); |
| 90 RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string
(), parserContext); | 85 RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string
(), parserContext); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 { | 330 { |
| 336 return ownerNode() ? &ownerNode()->document() : 0; | 331 return ownerNode() ? &ownerNode()->document() : 0; |
| 337 } | 332 } |
| 338 | 333 |
| 339 void CSSStyleSheet::clearChildRuleCSSOMWrappers() | 334 void CSSStyleSheet::clearChildRuleCSSOMWrappers() |
| 340 { | 335 { |
| 341 m_childRuleCSSOMWrappers.clear(); | 336 m_childRuleCSSOMWrappers.clear(); |
| 342 } | 337 } |
| 343 | 338 |
| 344 } // namespace blink | 339 } // namespace blink |
| OLD | NEW |