OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2013 Opera Software ASA. All rights reserved. | |
4 * | 5 * |
5 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
9 * | 10 * |
10 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 14 * Library General Public License for more details. |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 const MatchedPropertiesCacheItem* findFromMatchedPropertiesCache(unsigned ha sh, const MatchResult&); | 395 const MatchedPropertiesCacheItem* findFromMatchedPropertiesCache(unsigned ha sh, const MatchResult&); |
395 void addToMatchedPropertiesCache(const RenderStyle*, const RenderStyle* pare ntStyle, unsigned hash, const MatchResult&); | 396 void addToMatchedPropertiesCache(const RenderStyle*, const RenderStyle* pare ntStyle, unsigned hash, const MatchResult&); |
396 | 397 |
397 // Every N additions to the matched declaration cache trigger a sweep where entries holding | 398 // Every N additions to the matched declaration cache trigger a sweep where entries holding |
398 // the last reference to a style declaration are garbage collected. | 399 // the last reference to a style declaration are garbage collected. |
399 void sweepMatchedPropertiesCache(Timer<StyleResolver>*); | 400 void sweepMatchedPropertiesCache(Timer<StyleResolver>*); |
400 | 401 |
401 bool classNamesAffectedByRules(const SpaceSplitString&) const; | 402 bool classNamesAffectedByRules(const SpaceSplitString&) const; |
402 bool sharingCandidateHasIdenticalStyleAffectingAttributes(StyledElement*) co nst; | 403 bool sharingCandidateHasIdenticalStyleAffectingAttributes(StyledElement*) co nst; |
403 | 404 |
405 typedef void (RenderStyle::*NavDirSetter)(StyleNavigationValue); | |
406 static NavDirSetter getNavDirSetterForProperty(CSSPropertyID); | |
esprehn
2013/06/20 19:45:10
I'm not a fan of this pattern. Why do you need to
Krzysztof Olczyk
2013/07/22 14:14:16
Done.
| |
407 | |
404 unsigned m_matchedPropertiesCacheAdditionsSinceLastSweep; | 408 unsigned m_matchedPropertiesCacheAdditionsSinceLastSweep; |
405 | 409 |
406 typedef HashMap<unsigned, MatchedPropertiesCacheItem> MatchedPropertiesCache ; | 410 typedef HashMap<unsigned, MatchedPropertiesCacheItem> MatchedPropertiesCache ; |
407 MatchedPropertiesCache m_matchedPropertiesCache; | 411 MatchedPropertiesCache m_matchedPropertiesCache; |
408 | 412 |
409 Timer<StyleResolver> m_matchedPropertiesCacheSweepTimer; | 413 Timer<StyleResolver> m_matchedPropertiesCacheSweepTimer; |
410 | 414 |
411 OwnPtr<MediaQueryEvaluator> m_medium; | 415 OwnPtr<MediaQueryEvaluator> m_medium; |
412 RefPtr<RenderStyle> m_rootDefaultStyle; | 416 RefPtr<RenderStyle> m_rootDefaultStyle; |
413 | 417 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 PseudoId ignoreDynamicPseudo = NOPSEUDO; | 475 PseudoId ignoreDynamicPseudo = NOPSEUDO; |
472 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) | 476 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) |
473 return true; | 477 return true; |
474 } | 478 } |
475 return false; | 479 return false; |
476 } | 480 } |
477 | 481 |
478 } // namespace WebCore | 482 } // namespace WebCore |
479 | 483 |
480 #endif // StyleResolver_h | 484 #endif // StyleResolver_h |
OLD | NEW |