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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.h

Issue 2895283003: DCHECK style is cacheable in ComputedStyle::CopyNonInheritedFromCached. (Closed)
Patch Set: Address comments Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.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) 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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const MatchedPropertiesVector&); 103 const MatchedPropertiesVector&);
104 void Add(const ComputedStyle&, 104 void Add(const ComputedStyle&,
105 const ComputedStyle& parent_style, 105 const ComputedStyle& parent_style,
106 unsigned hash, 106 unsigned hash,
107 const MatchedPropertiesVector&); 107 const MatchedPropertiesVector&);
108 108
109 void Clear(); 109 void Clear();
110 void ClearViewportDependent(); 110 void ClearViewportDependent();
111 111
112 static bool IsCacheable(const StyleResolverState&); 112 static bool IsCacheable(const StyleResolverState&);
113 static bool IsStyleCacheable(const ComputedStyle&);
113 114
114 DECLARE_TRACE(); 115 DECLARE_TRACE();
115 116
116 private: 117 private:
117 using Cache = HeapHashMap<unsigned, 118 using Cache = HeapHashMap<unsigned,
118 Member<CachedMatchedProperties>, 119 Member<CachedMatchedProperties>,
119 DefaultHash<unsigned>::Hash, 120 DefaultHash<unsigned>::Hash,
120 HashTraits<unsigned>, 121 HashTraits<unsigned>,
121 CachedMatchedPropertiesHashTraits>; 122 CachedMatchedPropertiesHashTraits>;
122 Cache cache_; 123 Cache cache_;
123 }; 124 };
124 125
125 } // namespace blink 126 } // namespace blink
126 127
127 #endif 128 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698