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

Side by Side Diff: sky/engine/core/dom/StyleEngine.cpp

Issue 807703003: Remove @media rules. (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/dom/StyleEngine.h ('k') | sky/engine/core/dom/TreeScopeStyleSheetCollection.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 * 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, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 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) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ASSERT(isHTMLStyleElement(node) || treeScope == m_document); 186 ASSERT(isHTMLStyleElement(node) || treeScope == m_document);
187 187
188 TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScop e); 188 TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScop e);
189 ASSERT(collection); 189 ASSERT(collection);
190 collection->removeStyleSheetCandidateNode(node, scopingNode); 190 collection->removeStyleSheetCandidateNode(node, scopingNode);
191 191
192 markTreeScopeDirty(treeScope); 192 markTreeScopeDirty(treeScope);
193 m_activeTreeScopes.remove(&treeScope); 193 m_activeTreeScopes.remove(&treeScope);
194 } 194 }
195 195
196 void StyleEngine::clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet tree Scopes)
197 {
198 for (TreeScopeSet::iterator it = treeScopes.begin(); it != treeScopes.end(); ++it) {
199 TreeScope& treeScope = **it;
200 ASSERT(treeScope != m_document);
201 ShadowTreeStyleSheetCollection* collection = static_cast<ShadowTreeStyle SheetCollection*>(styleSheetCollectionFor(treeScope));
202 ASSERT(collection);
203 collection->clearMediaQueryRuleSetStyleSheets();
204 }
205 }
206
207 void StyleEngine::clearMediaQueryRuleSetStyleSheets()
208 {
209 documentStyleSheetCollection()->clearMediaQueryRuleSetStyleSheets();
210 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes);
211 clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_dirtyTreeScopes);
212 }
213
214 void StyleEngine::updateActiveStyleSheets() 196 void StyleEngine::updateActiveStyleSheets()
215 { 197 {
216 ASSERT(isMaster()); 198 ASSERT(isMaster());
217 ASSERT(!document().inStyleRecalc()); 199 ASSERT(!document().inStyleRecalc());
218 200
219 if (!document().isActive()) 201 if (!document().isActive())
220 return; 202 return;
221 203
222 documentStyleSheetCollection()->updateActiveStyleSheets(this); 204 documentStyleSheetCollection()->updateActiveStyleSheets(this);
223 205
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 { 397 {
416 if (!document().isActive()) 398 if (!document().isActive())
417 return; 399 return;
418 400
419 if (m_resolver) 401 if (m_resolver)
420 m_resolver->invalidateMatchedPropertiesCache(); 402 m_resolver->invalidateMatchedPropertiesCache();
421 document().setNeedsStyleRecalc(SubtreeStyleChange); 403 document().setNeedsStyleRecalc(SubtreeStyleChange);
422 } 404 }
423 405
424 } 406 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleEngine.h ('k') | sky/engine/core/dom/TreeScopeStyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698