| 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 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2006, 2007 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 void StyleSheetList::detachFromDocument() | 50 void StyleSheetList::detachFromDocument() |
| 51 { | 51 { |
| 52 // FIXME: Oilpan: This is safe currently because the Document is | 52 // FIXME: Oilpan: This is safe currently because the Document is |
| 53 // *not* in the oilpan heap and the style engine is alive when the | 53 // *not* in the oilpan heap and the style engine is alive when the |
| 54 // document dies. When the Document is in the oilpan heap, we need | 54 // document dies. When the Document is in the oilpan heap, we need |
| 55 // the StyleSheetList and the document to die together and get rid | 55 // the StyleSheetList and the document to die together and get rid |
| 56 // of the detachedStyleSheets. | 56 // of the detachedStyleSheets. |
| 57 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL
ist(*m_treeScope); | 57 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL
ist(*m_treeScope); |
| 58 m_treeScope = 0; | 58 m_treeScope = nullptr; |
| 59 } | 59 } |
| 60 | 60 |
| 61 unsigned StyleSheetList::length() | 61 unsigned StyleSheetList::length() |
| 62 { | 62 { |
| 63 return styleSheets().size(); | 63 return styleSheets().size(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 StyleSheet* StyleSheetList::item(unsigned index) | 66 StyleSheet* StyleSheetList::item(unsigned index) |
| 67 { | 67 { |
| 68 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& sheets = styleSheet
s(); | 68 const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& sheets = styleSheet
s(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name) | 87 CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name) |
| 88 { | 88 { |
| 89 HTMLStyleElement* item = getNamedItem(name); | 89 HTMLStyleElement* item = getNamedItem(name); |
| 90 if (!item) | 90 if (!item) |
| 91 return 0; | 91 return 0; |
| 92 return item->sheet(); | 92 return item->sheet(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void StyleSheetList::trace(Visitor* visitor) | 95 void StyleSheetList::trace(Visitor* visitor) |
| 96 { | 96 { |
| 97 visitor->trace(m_treeScope); |
| 97 visitor->trace(m_detachedStyleSheets); | 98 visitor->trace(m_detachedStyleSheets); |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace WebCore | 101 } // namespace WebCore |
| OLD | NEW |