Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: Source/core/css/StyleSheetList.cpp

Issue 196513007: Oilpan: Reapply: Remove all the RefPtrs and most of the raw pointers to style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix assertion for global persistents Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/StyleSheet.idl ('k') | Source/core/css/resolver/MatchRequest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 inline const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleSheetList:: styleSheets() 43 inline const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleSheetList:: styleSheets()
44 { 44 {
45 if (!m_treeScope) 45 if (!m_treeScope)
46 return m_detachedStyleSheets; 46 return m_detachedStyleSheets;
47 return document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope) ; 47 return document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope) ;
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
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
55 // the StyleSheetList and the document to die together and get rid
56 // of the detachedStyleSheets.
52 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL ist(*m_treeScope); 57 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL ist(*m_treeScope);
53 m_treeScope = 0; 58 m_treeScope = 0;
54 } 59 }
55 60
56 unsigned StyleSheetList::length() 61 unsigned StyleSheetList::length()
57 { 62 {
58 return styleSheets().size(); 63 return styleSheets().size();
59 } 64 }
60 65
61 StyleSheet* StyleSheetList::item(unsigned index) 66 StyleSheet* StyleSheetList::item(unsigned index)
(...skipping 24 matching lines...) Expand all
86 return 0; 91 return 0;
87 return item->sheet(); 92 return item->sheet();
88 } 93 }
89 94
90 void StyleSheetList::trace(Visitor* visitor) 95 void StyleSheetList::trace(Visitor* visitor)
91 { 96 {
92 visitor->trace(m_detachedStyleSheets); 97 visitor->trace(m_detachedStyleSheets);
93 } 98 }
94 99
95 } // namespace WebCore 100 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheet.idl ('k') | Source/core/css/resolver/MatchRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698