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

Side by Side Diff: Source/core/css/StyleInvalidationAnalysis.cpp

Issue 143323014: *** DO NOT LAND *** Attempt to understand Regions complexity Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | « Source/core/css/RuntimeCSSEnabled.cpp ('k') | Source/core/css/StylePropertySet.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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 case StyleRule::Import: // Whatever we import should do its own analysis, we don't need to invalidate the document here! 116 case StyleRule::Import: // Whatever we import should do its own analysis, we don't need to invalidate the document here!
117 case StyleRule::Keyframes: // Keyframes never cause style invalidations and are handled during sheet insertion. 117 case StyleRule::Keyframes: // Keyframes never cause style invalidations and are handled during sheet insertion.
118 case StyleRule::Page: // Page rules apply only during printing, we force a f ull-recalc before printing. 118 case StyleRule::Page: // Page rules apply only during printing, we force a f ull-recalc before printing.
119 return false; 119 return false;
120 120
121 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re calc. 121 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re calc.
122 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc. 122 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc.
123 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc. 123 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc.
124 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r ecalcing. 124 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r ecalcing.
125 // FIXME: Unclear if any of the rest need to cause style recalc: 125 // FIXME: Unclear if any of the rest need to cause style recalc:
126 case StyleRule::Region:
127 case StyleRule::Filter: 126 case StyleRule::Filter:
128 return true; 127 return true;
129 128
130 // These should all be impossible to reach: 129 // These should all be impossible to reach:
131 case StyleRule::Unknown: 130 case StyleRule::Unknown:
132 case StyleRule::Charset: 131 case StyleRule::Charset:
133 case StyleRule::Keyframe: 132 case StyleRule::Keyframe:
134 case StyleRule::Style: 133 case StyleRule::Style:
135 break; 134 break;
136 } 135 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 element->setNeedsStyleRecalc(); 208 element->setNeedsStyleRecalc();
210 // The whole subtree is now invalidated, we can skip to the next sib ling. 209 // The whole subtree is now invalidated, we can skip to the next sib ling.
211 element = ElementTraversal::nextSkippingChildren(*element); 210 element = ElementTraversal::nextSkippingChildren(*element);
212 continue; 211 continue;
213 } 212 }
214 element = ElementTraversal::next(*element); 213 element = ElementTraversal::next(*element);
215 } 214 }
216 } 215 }
217 216
218 } 217 }
OLDNEW
« no previous file with comments | « Source/core/css/RuntimeCSSEnabled.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698