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

Side by Side Diff: Source/core/dom/StyleSheetCollection.h

Issue 143463011: [import] support document.stylesheets in imported documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased to ToT Created 6 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 | Annotate | Revision Log
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) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef StyleSheetCollection_h 28 #ifndef StyleSheetCollection_h
29 #define StyleSheetCollection_h 29 #define StyleSheetCollection_h
30 30
31 #include "core/dom/Document.h" 31 #include "core/dom/Document.h"
32 #include "core/dom/DocumentOrderedList.h" 32 #include "core/dom/DocumentOrderedList.h"
33 #include "core/dom/DocumentStyleSheetCollector.h"
33 #include "core/dom/StyleSheetScopingNodeList.h" 34 #include "core/dom/StyleSheetScopingNodeList.h"
34 #include "core/dom/TreeScope.h" 35 #include "core/dom/TreeScope.h"
35 #include "wtf/FastAllocBase.h" 36 #include "wtf/FastAllocBase.h"
36 #include "wtf/HashMap.h" 37 #include "wtf/HashMap.h"
37 #include "wtf/ListHashSet.h" 38 #include "wtf/ListHashSet.h"
38 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
39 #include "wtf/Vector.h" 40 #include "wtf/Vector.h"
40 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
41 42
42 namespace WebCore { 43 namespace WebCore {
(...skipping 15 matching lines...) Expand all
58 public: 59 public:
59 StyleSheetCollectionBase(); 60 StyleSheetCollectionBase();
60 ~StyleSheetCollectionBase(); 61 ~StyleSheetCollectionBase();
61 62
62 Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() { return m_activeA uthorStyleSheets; } 63 Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() { return m_activeA uthorStyleSheets; }
63 Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() { return m_style SheetsForStyleSheetList; } 64 Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() { return m_style SheetsForStyleSheetList; }
64 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { retu rn m_activeAuthorStyleSheets; } 65 const Vector<RefPtr<CSSStyleSheet> >& activeAuthorStyleSheets() const { retu rn m_activeAuthorStyleSheets; }
65 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { re turn m_styleSheetsForStyleSheetList; } 66 const Vector<RefPtr<StyleSheet> >& styleSheetsForStyleSheetList() const { re turn m_styleSheetsForStyleSheetList; }
66 67
67 void swap(StyleSheetCollectionBase&); 68 void swap(StyleSheetCollectionBase&);
69 void swapSheetsForSheetList(Vector<RefPtr<StyleSheet> >&);
68 void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&); 70 void appendActiveStyleSheets(const Vector<RefPtr<CSSStyleSheet> >&);
69 void appendActiveStyleSheet(CSSStyleSheet*); 71 void appendActiveStyleSheet(CSSStyleSheet*);
70 void appendSheetForList(StyleSheet*); 72 void appendSheetForList(StyleSheet*);
71 73
74 DocumentStyleSheetCollector collector();
75
72 protected: 76 protected:
73 Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList; 77 Vector<RefPtr<StyleSheet> > m_styleSheetsForStyleSheetList;
74 Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets; 78 Vector<RefPtr<CSSStyleSheet> > m_activeAuthorStyleSheets;
75 }; 79 };
76 80
77 81
78 class StyleSheetCollection : public StyleSheetCollectionBase { 82 class StyleSheetCollection : public StyleSheetCollectionBase {
79 public: 83 public:
80 void addStyleSheetCandidateNode(Node*, bool createdByParser); 84 void addStyleSheetCandidateNode(Node*, bool createdByParser);
81 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode); 85 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 bool m_usesRemUnits; 130 bool m_usesRemUnits;
127 131
128 DocumentOrderedList m_styleSheetCandidateNodes; 132 DocumentOrderedList m_styleSheetCandidateNodes;
129 StyleSheetScopingNodeList m_scopingNodesForStyleScoped; 133 StyleSheetScopingNodeList m_scopingNodesForStyleScoped;
130 }; 134 };
131 135
132 } 136 }
133 137
134 #endif 138 #endif
135 139
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698