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

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

Issue 848483003: Simplify media query handling for stylesheets. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void StyleEngine::removeTreeScope(TreeScope& scope) 68 void StyleEngine::removeTreeScope(TreeScope& scope)
69 { 69 {
70 m_activeTreeScopes.remove(&scope); 70 m_activeTreeScopes.remove(&scope);
71 } 71 }
72 72
73 void StyleEngine::updateActiveStyleSheets() 73 void StyleEngine::updateActiveStyleSheets()
74 { 74 {
75 ASSERT(!m_document->inStyleRecalc()); 75 ASSERT(!m_document->inStyleRecalc());
76 ASSERT(m_resolver); 76 ASSERT(m_resolver);
77 77
78 m_resolver->resetMediaQueryAffectedByViewportChange();
79
80 for (TreeScope* treeScope : m_activeTreeScopes) 78 for (TreeScope* treeScope : m_activeTreeScopes)
81 treeScope->scopedStyleResolver().updateActiveStyleSheets(); 79 treeScope->scopedStyleResolver().updateActiveStyleSheets();
82 80
83 updateDocumentFonts(); 81 updateDocumentFonts();
84 } 82 }
85 83
86 void StyleEngine::resolverChanged() 84 void StyleEngine::resolverChanged()
87 { 85 {
88 if (!m_document->isActive()) 86 if (!m_document->isActive())
89 return; 87 return;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 m_sheetToTextCache.remove(contents); 156 m_sheetToTextCache.remove(contents);
159 } 157 }
160 158
161 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) 159 void StyleEngine::fontsNeedUpdate(CSSFontSelector*)
162 { 160 {
163 m_resolver->invalidateMatchedPropertiesCache(); 161 m_resolver->invalidateMatchedPropertiesCache();
164 m_document->setNeedsStyleRecalc(SubtreeStyleChange); 162 m_document->setNeedsStyleRecalc(SubtreeStyleChange);
165 } 163 }
166 164
167 } 165 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698