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

Side by Side Diff: Source/core/css/resolver/SharedStyleFinder.h

Issue 22966004: Revert "Replace style sharing cousin list search with LRU" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google, Inc. 2 * Copyright (C) 2013 Google, Inc.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * 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.
10 * 10 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 , m_features(features) 44 , m_features(features)
45 , m_siblingRuleSet(siblingRuleSet) 45 , m_siblingRuleSet(siblingRuleSet)
46 , m_uncommonAttributeRuleSet(uncommonAttributeRuleSet) 46 , m_uncommonAttributeRuleSet(uncommonAttributeRuleSet)
47 , m_styleResolver(styleResolver) 47 , m_styleResolver(styleResolver)
48 { } 48 { }
49 49
50 // FIXME: It is not necessarily safe to call this method more than once. 50 // FIXME: It is not necessarily safe to call this method more than once.
51 RenderStyle* locateSharedStyle(const ElementResolveContext&, RenderStyle* ne wStyle); 51 RenderStyle* locateSharedStyle(const ElementResolveContext&, RenderStyle* ne wStyle);
52 52
53 private: 53 private:
54 Element* findElementForStyleSharing(const ElementResolveContext&) const; 54 Node* locateCousinList(Element* parent, unsigned& visitedNodeCount) const;
55 Element* findSiblingForStyleSharing(const ElementResolveContext&, Node*, uns igned& count) const;
55 56
56 // Only used when we're collecting stats on styles 57 // Only used when we're collecting stats on styles
57 Element* searchDocumentForSharedStyle(const ElementResolveContext&) const; 58 Element* searchDocumentForSharedStyle(const ElementResolveContext&) const;
58 59
59 bool classNamesAffectedByRules(const SpaceSplitString&) const; 60 bool classNamesAffectedByRules(const SpaceSplitString&) const;
60 61
61 bool canShareStyleWithElement(const ElementResolveContext&, Element*) const; 62 bool canShareStyleWithElement(const ElementResolveContext&, Element*) const;
62 bool canShareStyleWithControl(const ElementResolveContext&, Element*) const; 63 bool canShareStyleWithControl(const ElementResolveContext&, Element*) const;
63 bool sharingCandidateHasIdenticalStyleAffectingAttributes(const ElementResol veContext&, Element*) const; 64 bool sharingCandidateHasIdenticalStyleAffectingAttributes(const ElementResol veContext&, Element*) const;
64 65
65 bool m_elementAffectedByClassRules; 66 bool m_elementAffectedByClassRules;
66 const RuleFeatureSet& m_features; 67 const RuleFeatureSet& m_features;
67 RuleSet* m_siblingRuleSet; 68 RuleSet* m_siblingRuleSet;
68 RuleSet* m_uncommonAttributeRuleSet; 69 RuleSet* m_uncommonAttributeRuleSet;
69 StyleResolver* m_styleResolver; 70 StyleResolver* m_styleResolver;
70 }; 71 };
71 72
72 } // namespace WebCore 73 } // namespace WebCore
73 74
74 #endif // SharedStyleFinder_h 75 #endif // SharedStyleFinder_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698