| 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 30 matching lines...) Expand all Loading... |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 if (activeSheet) | 136 if (activeSheet) |
| 137 activeSheets.append(activeSheet); | 137 activeSheets.append(activeSheet); |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 static void collectActiveCSSStyleSheetsFromSeamlessParents(Vector<RefPtr<CSSStyl
eSheet> >& sheets, Document* document) | 141 static void collectActiveCSSStyleSheetsFromSeamlessParents(Vector<RefPtr<CSSStyl
eSheet> >& sheets, Document* document) |
| 142 { | 142 { |
| 143 HTMLIFrameElement* seamlessParentIFrame = document->seamlessParentIFrame(); | 143 HTMLIFrameElement* seamlessParentIFrame = document->seamlessParentIFrame(); |
| 144 if (!seamlessParentIFrame) | 144 if (!seamlessParentIFrame) |
| 145 return; | 145 return; |
| 146 sheets.append(seamlessParentIFrame->document()->styleSheetCollections()->act
iveAuthorStyleSheets()); | 146 sheets.append(seamlessParentIFrame->document().styleSheetCollections()->acti
veAuthorStyleSheets()); |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleSheetCollections
* collections, StyleResolverUpdateMode updateMode) | 149 bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleSheetCollections
* collections, StyleResolverUpdateMode updateMode) |
| 150 { | 150 { |
| 151 Vector<RefPtr<StyleSheet> > styleSheets; | 151 Vector<RefPtr<StyleSheet> > styleSheets; |
| 152 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets; | 152 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets; |
| 153 activeCSSStyleSheets.append(collections->injectedAuthorStyleSheets()); | 153 activeCSSStyleSheets.append(collections->injectedAuthorStyleSheets()); |
| 154 activeCSSStyleSheets.append(collections->documentAuthorStyleSheets()); | 154 activeCSSStyleSheets.append(collections->documentAuthorStyleSheets()); |
| 155 collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, documen
t()); | 155 collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, documen
t()); |
| 156 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets); | 156 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 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 } |
| OLD | NEW |