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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 1769903002: Move preferred stylesheet logic into StyleEngine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void modifiedStyleSheetCandidateNode(Node*); 92 void modifiedStyleSheetCandidateNode(Node*);
93 93
94 void injectAuthorSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> authorShee t); 94 void injectAuthorSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> authorShee t);
95 95
96 void clearMediaQueryRuleSetStyleSheets(); 96 void clearMediaQueryRuleSetStyleSheets();
97 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ; 97 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector) ;
98 void updateActiveStyleSheets(StyleResolverUpdateMode); 98 void updateActiveStyleSheets(StyleResolverUpdateMode);
99 99
100 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; } 100 String preferredStylesheetSetName() const { return m_preferredStylesheetSetN ame; }
101 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; } 101 String selectedStylesheetSetName() const { return m_selectedStylesheetSetNam e; }
102 void setPreferredStylesheetSetName(const String& name) { m_preferredStyleshe etSetName = name; } 102 void setPreferredStylesheetSetNameIfNotSet(const String&);
103 void setSelectedStylesheetSetName(const String& name) { m_selectedStylesheet SetName = name; } 103 void setSelectedStylesheetSetName(const String&);
104 104 void setHttpDefaultStyle(const String&);
105 void selectStylesheetSetName(const String& name)
106 {
107 setPreferredStylesheetSetName(name);
108 setSelectedStylesheetSetName(name);
109 }
110 105
111 void addPendingSheet(); 106 void addPendingSheet();
112 void removePendingSheet(Node* styleSheetCandidateNode); 107 void removePendingSheet(Node* styleSheetCandidateNode);
113 108
114 bool hasPendingSheets() const { return m_pendingStylesheets > 0; } 109 bool hasPendingSheets() const { return m_pendingStylesheets > 0; }
115 bool haveStylesheetsLoaded() const { return !hasPendingSheets() || m_ignoreP endingStylesheets; } 110 bool haveStylesheetsLoaded() const { return !hasPendingSheets() || m_ignoreP endingStylesheets; }
116 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; } 111 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; }
117 112
118 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; } 113 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; }
119 bool usesSiblingRules() const { return m_usesSiblingRules; } 114 bool usesSiblingRules() const { return m_usesSiblingRules; }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 260
266 OwnPtr<StyleResolverStats> m_styleResolverStats; 261 OwnPtr<StyleResolverStats> m_styleResolverStats;
267 unsigned m_styleForElementCount = 0; 262 unsigned m_styleForElementCount = 0;
268 263
269 friend class StyleEngineTest; 264 friend class StyleEngineTest;
270 }; 265 };
271 266
272 } // namespace blink 267 } // namespace blink
273 268
274 #endif 269 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698