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

Side by Side Diff: Source/core/dom/TreeScopeStyleSheetCollection.cpp

Issue 653223002: Navigation transitions (web to native app): Revert exit transition (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fix 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 | « Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | Source/core/html/HTMLLinkElement.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, 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
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::enableExitTransitionStylesheets() 179 void TreeScopeStyleSheetCollection::setExitTransitionStyleshetsEnabled(bool enab led)
180 { 180 {
181 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); 181 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin();
182 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); 182 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end();
183 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { 183 for (DocumentOrderedList::iterator it = begin; it != end; ++it) {
184 Node* node = *it; 184 Node* node = *it;
185 if (isHTMLLinkElement(*node)) 185 if (isHTMLLinkElement(*node))
186 toHTMLLinkElement(node)->enableIfExitTransitionStyle(); 186 toHTMLLinkElement(node)->setEnabledIfExitTransitionStyle(enabled);
187 } 187 }
188 } 188 }
189 189
190 static bool styleSheetsUseRemUnits(const WillBeHeapVector<RefPtrWillBeMember<CSS StyleSheet> >& sheets) 190 static bool styleSheetsUseRemUnits(const WillBeHeapVector<RefPtrWillBeMember<CSS StyleSheet> >& sheets)
191 { 191 {
192 for (unsigned i = 0; i < sheets.size(); ++i) { 192 for (unsigned i = 0; i < sheets.size(); ++i) {
193 if (sheets[i]->contents()->usesRemUnits()) 193 if (sheets[i]->contents()->usesRemUnits())
194 return true; 194 return true;
195 } 195 }
196 return false; 196 return false;
197 } 197 }
198 198
199 void TreeScopeStyleSheetCollection::updateUsesRemUnits() 199 void TreeScopeStyleSheetCollection::updateUsesRemUnits()
200 { 200 {
201 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); 201 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets);
202 } 202 }
203 203
204 void TreeScopeStyleSheetCollection::trace(Visitor* visitor) 204 void TreeScopeStyleSheetCollection::trace(Visitor* visitor)
205 { 205 {
206 visitor->trace(m_treeScope); 206 visitor->trace(m_treeScope);
207 visitor->trace(m_styleSheetCandidateNodes); 207 visitor->trace(m_styleSheetCandidateNodes);
208 StyleSheetCollection::trace(visitor); 208 StyleSheetCollection::trace(visitor);
209 } 209 }
210 210
211 } 211 }
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698