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

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

Issue 23851003: Have StyleSheetCollections constructor take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Have StyleSheetCollection constructor take a Document reference as well Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.h ('k') | Source/core/dom/Node.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 27 matching lines...) Expand all
38 #include "core/html/HTMLIFrameElement.h" 38 #include "core/html/HTMLIFrameElement.h"
39 #include "core/html/HTMLLinkElement.h" 39 #include "core/html/HTMLLinkElement.h"
40 #include "core/html/HTMLStyleElement.h" 40 #include "core/html/HTMLStyleElement.h"
41 #include "core/page/Settings.h" 41 #include "core/page/Settings.h"
42 #include "core/svg/SVGStyleElement.h" 42 #include "core/svg/SVGStyleElement.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 using namespace HTMLNames; 46 using namespace HTMLNames;
47 47
48 DocumentStyleSheetCollection::DocumentStyleSheetCollection(TreeScope* treeScope) 48 DocumentStyleSheetCollection::DocumentStyleSheetCollection(TreeScope& treeScope)
49 : StyleSheetCollection(treeScope) 49 : StyleSheetCollection(treeScope)
50 { 50 {
51 ASSERT(treeScope->rootNode() == &treeScope->rootNode()->document()); 51 ASSERT(treeScope.rootNode() == &treeScope.rootNode()->document());
52 } 52 }
53 53
54 void DocumentStyleSheetCollection::collectStyleSheets(StyleSheetCollections* col lections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets) 54 void DocumentStyleSheetCollection::collectStyleSheets(StyleSheetCollections* col lections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& activeSheets)
55 { 55 {
56 if (document()->settings() && !document()->settings()->authorAndUserStylesEn abled()) 56 if (document()->settings() && !document()->settings()->authorAndUserStylesEn abled())
57 return; 57 return;
58 58
59 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); 59 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin();
60 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); 60 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end();
61 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { 61 for (DocumentOrderedList::iterator it = begin; it != end; ++it) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); 178 m_scopingNodesForStyleScoped.didRemoveScopingNodes();
179 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); 179 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets);
180 m_styleSheetsForStyleSheetList.swap(styleSheets); 180 m_styleSheetsForStyleSheetList.swap(styleSheets);
181 updateUsesRemUnits(); 181 updateUsesRemUnits();
182 182
183 return requiresFullStyleRecalc; 183 return requiresFullStyleRecalc;
184 } 184 }
185 185
186 } 186 }
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698