OLD | NEW |
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 Loading... |
120 case StyleRule::Import: // Whatever we import should do its own analysis, we
don't need to invalidate the document here! | 120 case StyleRule::Import: // Whatever we import should do its own analysis, we
don't need to invalidate the document here! |
121 case StyleRule::Keyframes: // Keyframes never cause style invalidations and
are handled during sheet insertion. | 121 case StyleRule::Keyframes: // Keyframes never cause style invalidations and
are handled during sheet insertion. |
122 case StyleRule::Page: // Page rules apply only during printing, we force a f
ull-recalc before printing. | 122 case StyleRule::Page: // Page rules apply only during printing, we force a f
ull-recalc before printing. |
123 return false; | 123 return false; |
124 | 124 |
125 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re
calc. | 125 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re
calc. |
126 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca
lc. | 126 case StyleRule::FontFace: // If the fonts aren't in use, we could avoid reca
lc. |
127 case StyleRule::Supports: // If we evaluated the supports-clause we could av
oid recalc. | 127 case StyleRule::Supports: // If we evaluated the supports-clause we could av
oid recalc. |
128 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r
ecalcing. | 128 case StyleRule::Viewport: // If the viewport doesn't match, we could avoid r
ecalcing. |
129 // FIXME: Unclear if any of the rest need to cause style recalc: | 129 // FIXME: Unclear if any of the rest need to cause style recalc: |
130 case StyleRule::Region: | |
131 case StyleRule::Filter: | 130 case StyleRule::Filter: |
132 return true; | 131 return true; |
133 | 132 |
134 // These should all be impossible to reach: | 133 // These should all be impossible to reach: |
135 case StyleRule::Unknown: | 134 case StyleRule::Unknown: |
136 case StyleRule::Charset: | 135 case StyleRule::Charset: |
137 case StyleRule::Keyframe: | 136 case StyleRule::Keyframe: |
138 case StyleRule::Style: | 137 case StyleRule::Style: |
139 break; | 138 break; |
140 } | 139 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 element->setNeedsStyleRecalc(SubtreeStyleChange); | 212 element->setNeedsStyleRecalc(SubtreeStyleChange); |
214 // The whole subtree is now invalidated, we can skip to the next sib
ling. | 213 // The whole subtree is now invalidated, we can skip to the next sib
ling. |
215 element = ElementTraversal::nextSkippingChildren(*element); | 214 element = ElementTraversal::nextSkippingChildren(*element); |
216 continue; | 215 continue; |
217 } | 216 } |
218 element = ElementTraversal::next(*element); | 217 element = ElementTraversal::next(*element); |
219 } | 218 } |
220 } | 219 } |
221 | 220 |
222 } | 221 } |
OLD | NEW |