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

Side by Side Diff: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp

Issue 951213004: Make CSSRuleSourceData use the CSSRule Type enum (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use StyleRule::Type Created 5 years, 10 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 | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/parser/BisonCSSParser.h » ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc. 120 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc.
121 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc. 121 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc.
122 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r ecalcing. 122 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r ecalcing.
123 case StyleRule::Keyframes: // If the animation doesn't match an element, we could avoid recalc. 123 case StyleRule::Keyframes: // If the animation doesn't match an element, we could avoid recalc.
124 return true; 124 return true;
125 125
126 // These should all be impossible to reach: 126 // These should all be impossible to reach:
127 case StyleRule::Keyframe: 127 case StyleRule::Keyframe:
128 case StyleRule::Namespace: 128 case StyleRule::Namespace:
129 case StyleRule::Style: 129 case StyleRule::Style:
130 case StyleRule::Unknown:
130 break; 131 break;
131 } 132 }
132 ASSERT_NOT_REACHED(); 133 ASSERT_NOT_REACHED();
133 return true; 134 return true;
134 } 135 }
135 136
136 void StyleSheetInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* style SheetContents) 137 void StyleSheetInvalidationAnalysis::analyzeStyleSheet(StyleSheetContents* style SheetContents)
137 { 138 {
138 // Updating the style on the shadow DOM for image fallback content can bring us here when imports 139 // Updating the style on the shadow DOM for image fallback content can bring us here when imports
139 // are still getting loaded in the main document. Just need to exit early as we will return here 140 // are still getting loaded in the main document. Just need to exit early as we will return here
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFo rTracing::create(StyleChangeReason::StyleSheetChange)); 209 element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFo rTracing::create(StyleChangeReason::StyleSheetChange));
209 // The whole subtree is now invalidated, we can skip to the next sib ling. 210 // The whole subtree is now invalidated, we can skip to the next sib ling.
210 element = ElementTraversal::nextSkippingChildren(*element); 211 element = ElementTraversal::nextSkippingChildren(*element);
211 continue; 212 continue;
212 } 213 }
213 element = ElementTraversal::next(*element); 214 element = ElementTraversal::next(*element);
214 } 215 }
215 } 216 }
216 217
217 } 218 }
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698