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: sky/engine/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp

Issue 654693004: Remove meta viewport and @viewport CSS rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 { 76 {
77 // This funciton is conservative. We only return false when we know that 77 // This funciton is conservative. We only return false when we know that
78 // the added @rule can't require style recalcs. 78 // the added @rule can't require style recalcs.
79 switch (rule->type()) { 79 switch (rule->type()) {
80 case StyleRule::Keyframes: // Keyframes never cause style invalidations and are handled during sheet insertion. 80 case StyleRule::Keyframes: // Keyframes never cause style invalidations and are handled during sheet insertion.
81 return false; 81 return false;
82 82
83 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re calc. 83 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re calc.
84 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc. 84 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca lc.
85 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc. 85 case StyleRule::Supports: // If we evaluated the supports-clause we could av oid recalc.
86 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r ecalcing.
87 // FIXME: Unclear if any of the rest need to cause style recalc: 86 // FIXME: Unclear if any of the rest need to cause style recalc:
88 case StyleRule::Filter: 87 case StyleRule::Filter:
89 return true; 88 return true;
90 89
91 // These should all be impossible to reach: 90 // These should all be impossible to reach:
92 case StyleRule::Unknown: 91 case StyleRule::Unknown:
93 case StyleRule::Keyframe: 92 case StyleRule::Keyframe:
94 case StyleRule::Style: 93 case StyleRule::Style:
95 break; 94 break;
96 } 95 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 element->setNeedsStyleRecalc(SubtreeStyleChange); 158 element->setNeedsStyleRecalc(SubtreeStyleChange);
160 // The whole subtree is now invalidated, we can skip to the next sib ling. 159 // The whole subtree is now invalidated, we can skip to the next sib ling.
161 element = ElementTraversal::nextSkippingChildren(*element); 160 element = ElementTraversal::nextSkippingChildren(*element);
162 continue; 161 continue;
163 } 162 }
164 element = ElementTraversal::next(*element); 163 element = ElementTraversal::next(*element);
165 } 164 }
166 } 165 }
167 166
168 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698