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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |