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

Side by Side Diff: Source/core/css/resolver/MatchedPropertiesCache.cpp

Issue 758073003: Always propagate direction and writing-mode from <body>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added XML and overconstraining tests. Created 6 years 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 } 168 }
169 } 169 }
170 m_cache.removeAll(toRemove); 170 m_cache.removeAll(toRemove);
171 m_additionsSinceLastSweep = 0; 171 m_additionsSinceLastSweep = 0;
172 } 172 }
173 #endif 173 #endif
174 174
175 bool MatchedPropertiesCache::isCacheable(const Element* element, const RenderSty le* style, const RenderStyle* parentStyle) 175 bool MatchedPropertiesCache::isCacheable(const Element* element, const RenderSty le* style, const RenderStyle* parentStyle)
176 { 176 {
177 // FIXME: CSSPropertyWebkitWritingMode modifies state when applying to docum ent element. We can't skip the applying by caching.
178 if (element == element->document().documentElement() && element->document(). writingModeSetOnDocumentElement())
179 return false;
180 if (style->unique() || (style->styleType() != NOPSEUDO && parentStyle->uniqu e())) 177 if (style->unique() || (style->styleType() != NOPSEUDO && parentStyle->uniqu e()))
181 return false; 178 return false;
182 if (style->hasAppearance()) 179 if (style->hasAppearance())
183 return false; 180 return false;
184 if (style->zoom() != RenderStyle::initialZoom()) 181 if (style->zoom() != RenderStyle::initialZoom())
185 return false; 182 return false;
186 if (style->writingMode() != RenderStyle::initialWritingMode()) 183 if (style->writingMode() != RenderStyle::initialWritingMode())
187 return false; 184 return false;
188 // The cache assumes static knowledge about which properties are inherited. 185 // The cache assumes static knowledge about which properties are inherited.
189 if (parentStyle->hasExplicitlyInheritedProperties()) 186 if (parentStyle->hasExplicitlyInheritedProperties())
190 return false; 187 return false;
191 return true; 188 return true;
192 } 189 }
193 190
194 void MatchedPropertiesCache::trace(Visitor* visitor) 191 void MatchedPropertiesCache::trace(Visitor* visitor)
195 { 192 {
196 #if ENABLE(OILPAN) 193 #if ENABLE(OILPAN)
197 visitor->trace(m_cache); 194 visitor->trace(m_cache);
198 #endif 195 #endif
199 } 196 }
200 197
201 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698