| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return false; | 117 return false; |
| 118 | 118 |
| 119 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re
calc. | 119 case StyleRule::Media: // If the media rule doesn't apply, we could avoid re
calc. |
| 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::Charset: |
| 127 case StyleRule::Keyframe: | 128 case StyleRule::Keyframe: |
| 128 case StyleRule::Namespace: | 129 case StyleRule::Namespace: |
| 129 case StyleRule::Style: | 130 case StyleRule::Style: |
| 130 case StyleRule::Unknown: | 131 case StyleRule::Unknown: |
| 131 break; | 132 break; |
| 132 } | 133 } |
| 133 ASSERT_NOT_REACHED(); | 134 ASSERT_NOT_REACHED(); |
| 134 return true; | 135 return true; |
| 135 } | 136 } |
| 136 | 137 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFo
rTracing::create(StyleChangeReason::StyleSheetChange)); | 210 element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFo
rTracing::create(StyleChangeReason::StyleSheetChange)); |
| 210 // The whole subtree is now invalidated, we can skip to the next sib
ling. | 211 // The whole subtree is now invalidated, we can skip to the next sib
ling. |
| 211 element = ElementTraversal::nextSkippingChildren(*element); | 212 element = ElementTraversal::nextSkippingChildren(*element); |
| 212 continue; | 213 continue; |
| 213 } | 214 } |
| 214 element = ElementTraversal::next(*element); | 215 element = ElementTraversal::next(*element); |
| 215 } | 216 } |
| 216 } | 217 } |
| 217 | 218 |
| 218 } | 219 } |
| OLD | NEW |