OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 void TreeScopeStyleSheetCollection::clearMediaQueryRuleSetStyleSheets() | 170 void TreeScopeStyleSheetCollection::clearMediaQueryRuleSetStyleSheets() |
171 { | 171 { |
172 for (size_t i = 0; i < m_activeAuthorStyleSheets.size(); ++i) { | 172 for (size_t i = 0; i < m_activeAuthorStyleSheets.size(); ++i) { |
173 StyleSheetContents* contents = m_activeAuthorStyleSheets[i]->contents(); | 173 StyleSheetContents* contents = m_activeAuthorStyleSheets[i]->contents(); |
174 if (contents->hasMediaQueries()) | 174 if (contents->hasMediaQueries()) |
175 contents->clearRuleSet(); | 175 contents->clearRuleSet(); |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 void TreeScopeStyleSheetCollection::setExitTransitionStyleshetsEnabled(bool enab
led) | |
180 { | |
181 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); | |
182 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); | |
183 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { | |
184 Node* node = *it; | |
185 if (isHTMLLinkElement(*node)) | |
186 toHTMLLinkElement(node)->setEnabledIfExitTransitionStyle(enabled); | |
187 } | |
188 } | |
189 | |
190 static bool styleSheetsUseRemUnits(const WillBeHeapVector<RefPtrWillBeMember<CSS
StyleSheet>>& sheets) | 179 static bool styleSheetsUseRemUnits(const WillBeHeapVector<RefPtrWillBeMember<CSS
StyleSheet>>& sheets) |
191 { | 180 { |
192 for (unsigned i = 0; i < sheets.size(); ++i) { | 181 for (unsigned i = 0; i < sheets.size(); ++i) { |
193 if (sheets[i]->contents()->usesRemUnits()) | 182 if (sheets[i]->contents()->usesRemUnits()) |
194 return true; | 183 return true; |
195 } | 184 } |
196 return false; | 185 return false; |
197 } | 186 } |
198 | 187 |
199 void TreeScopeStyleSheetCollection::updateUsesRemUnits() | 188 void TreeScopeStyleSheetCollection::updateUsesRemUnits() |
200 { | 189 { |
201 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); | 190 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); |
202 } | 191 } |
203 | 192 |
204 DEFINE_TRACE(TreeScopeStyleSheetCollection) | 193 DEFINE_TRACE(TreeScopeStyleSheetCollection) |
205 { | 194 { |
206 visitor->trace(m_treeScope); | 195 visitor->trace(m_treeScope); |
207 visitor->trace(m_styleSheetCandidateNodes); | 196 visitor->trace(m_styleSheetCandidateNodes); |
208 StyleSheetCollection::trace(visitor); | 197 StyleSheetCollection::trace(visitor); |
209 } | 198 } |
210 | 199 |
211 } | 200 } |
OLD | NEW |