Chromium Code Reviews| 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) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 void attributeChangedForElement(const QualifiedName& attributeName, Element& ); | 170 void attributeChangedForElement(const QualifiedName& attributeName, Element& ); |
| 171 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&); | 171 void idChangedForElement(const AtomicString& oldId, const AtomicString& newI d, Element&); |
| 172 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&); | 172 void pseudoStateChangedForElement(CSSSelector::PseudoType, Element&); |
| 173 | 173 |
| 174 unsigned styleForElementCount() const { return m_styleForElementCount; } | 174 unsigned styleForElementCount() const { return m_styleForElementCount; } |
| 175 void incStyleForElementCount() { m_styleForElementCount++; } | 175 void incStyleForElementCount() { m_styleForElementCount++; } |
| 176 | 176 |
| 177 StyleResolverStats* stats() { return m_styleResolverStats.get(); } | 177 StyleResolverStats* stats() { return m_styleResolverStats.get(); } |
| 178 void setStatsEnabled(bool); | 178 void setStatsEnabled(bool); |
| 179 | 179 |
| 180 bool useCascadeOrderForShadowDOMV1() const { return m_useCascadeOrderForShad owDOMV1; } | |
| 181 void setUseCascadeOrderForShadowDOMV1() { m_useCascadeOrderForShadowDOMV1 = true; } | |
|
rune
2016/03/18 12:04:12
We are not recalculating style setting this flag,
kochi
2016/03/22 08:16:59
Very good point.
I've added the enum and set style
| |
| 182 | |
| 180 DECLARE_VIRTUAL_TRACE(); | 183 DECLARE_VIRTUAL_TRACE(); |
| 181 | 184 |
| 182 private: | 185 private: |
| 183 // CSSFontSelectorClient implementation. | 186 // CSSFontSelectorClient implementation. |
| 184 void fontsNeedUpdate(CSSFontSelector*) override; | 187 void fontsNeedUpdate(CSSFontSelector*) override; |
| 185 | 188 |
| 186 private: | 189 private: |
| 187 StyleEngine(Document&); | 190 StyleEngine(Document&); |
| 188 | 191 |
| 189 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); | 192 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 String m_selectedStylesheetSetName; | 247 String m_selectedStylesheetSetName; |
| 245 | 248 |
| 246 bool m_usesSiblingRules = false; | 249 bool m_usesSiblingRules = false; |
| 247 bool m_usesFirstLineRules = false; | 250 bool m_usesFirstLineRules = false; |
| 248 bool m_usesWindowInactiveSelector = false; | 251 bool m_usesWindowInactiveSelector = false; |
| 249 bool m_usesRemUnits = false; | 252 bool m_usesRemUnits = false; |
| 250 unsigned m_maxDirectAdjacentSelectors = 0; | 253 unsigned m_maxDirectAdjacentSelectors = 0; |
| 251 | 254 |
| 252 bool m_ignorePendingStylesheets = false; | 255 bool m_ignorePendingStylesheets = false; |
| 253 bool m_didCalculateResolver = false; | 256 bool m_didCalculateResolver = false; |
| 257 | |
| 258 bool m_useCascadeOrderForShadowDOMV1 = false; | |
| 259 | |
| 254 OwnPtrWillBeMember<StyleResolver> m_resolver; | 260 OwnPtrWillBeMember<StyleResolver> m_resolver; |
| 255 StyleInvalidator m_styleInvalidator; | 261 StyleInvalidator m_styleInvalidator; |
| 256 | 262 |
| 257 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; | 263 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; |
| 258 | 264 |
| 259 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache; | 265 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>> m_te xtToSheetCache; |
| 260 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; | 266 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; |
| 261 | 267 |
| 262 OwnPtr<StyleResolverStats> m_styleResolverStats; | 268 OwnPtr<StyleResolverStats> m_styleResolverStats; |
| 263 unsigned m_styleForElementCount = 0; | 269 unsigned m_styleForElementCount = 0; |
| 264 | 270 |
| 265 friend class StyleEngineTest; | 271 friend class StyleEngineTest; |
| 266 }; | 272 }; |
| 267 | 273 |
| 268 } // namespace blink | 274 } // namespace blink |
| 269 | 275 |
| 270 #endif | 276 #endif |
| OLD | NEW |