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

Side by Side Diff: sky/engine/core/css/StyleSheetList.cpp

Issue 780483002: Remove the CSSOM. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/css/StyleSheetList.h ('k') | sky/engine/core/css/StyleSheetList.idl » ('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 28 matching lines...) Expand all
39 39
40 inline const Vector<RefPtr<StyleSheet> >& StyleSheetList::styleSheets() 40 inline const Vector<RefPtr<StyleSheet> >& StyleSheetList::styleSheets()
41 { 41 {
42 #if !ENABLE(OILPAN) 42 #if !ENABLE(OILPAN)
43 if (!m_treeScope) 43 if (!m_treeScope)
44 return m_detachedStyleSheets; 44 return m_detachedStyleSheets;
45 #endif 45 #endif
46 return document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope) ; 46 return document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope) ;
47 } 47 }
48 48
49 #if !ENABLE(OILPAN)
50 void StyleSheetList::detachFromDocument() 49 void StyleSheetList::detachFromDocument()
51 { 50 {
52 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL ist(*m_treeScope); 51 m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetL ist(*m_treeScope);
53 m_treeScope = nullptr; 52 m_treeScope = nullptr;
54 } 53 }
55 #endif
56 54
57 unsigned StyleSheetList::length() 55 unsigned StyleSheetList::length()
58 { 56 {
59 return styleSheets().size(); 57 return styleSheets().size();
60 } 58 }
61 59
62 StyleSheet* StyleSheetList::item(unsigned index) 60 StyleSheet* StyleSheetList::item(unsigned index)
63 { 61 {
64 const Vector<RefPtr<StyleSheet> >& sheets = styleSheets(); 62 const Vector<RefPtr<StyleSheet> >& sheets = styleSheets();
65 return index < sheets.size() ? sheets[index].get() : 0; 63 return index < sheets.size() ? sheets[index].get() : 0;
(...skipping 18 matching lines...) Expand all
84 82
85 CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name) 83 CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
86 { 84 {
87 HTMLStyleElement* item = getNamedItem(name); 85 HTMLStyleElement* item = getNamedItem(name);
88 if (!item) 86 if (!item)
89 return 0; 87 return 0;
90 return item->sheet(); 88 return item->sheet();
91 } 89 }
92 90
93 } // namespace blink 91 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/StyleSheetList.h ('k') | sky/engine/core/css/StyleSheetList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698