| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/css/CSSPropertyEquality.h" | 5 #include "core/css/CSSPropertyEquality.h" |
| 6 | 6 |
| 7 #include "core/css/CSSValue.h" | 7 #include "core/css/CSSValue.h" |
| 8 #include "core/style/ComputedStyle.h" | 8 #include "core/style/ComputedStyle.h" |
| 9 #include "core/style/DataEquivalency.h" | 9 #include "core/style/DataEquivalency.h" |
| 10 #include "core/style/ShadowList.h" | 10 #include "core/style/ShadowList.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // Autosizing is enabled, but a computed size if text zoom is enabled (if | 154 // Autosizing is enabled, but a computed size if text zoom is enabled (if |
| 155 // neither is enabled it's irrelevant as they're probably the same). | 155 // neither is enabled it's irrelevant as they're probably the same). |
| 156 // FIXME: Should we introduce an option to pass the computed font size | 156 // FIXME: Should we introduce an option to pass the computed font size |
| 157 // here, allowing consumers to enable text zoom rather than Text | 157 // here, allowing consumers to enable text zoom rather than Text |
| 158 // Autosizing? See http://crbug.com/227545. | 158 // Autosizing? See http://crbug.com/227545. |
| 159 return a.SpecifiedFontSize() == b.SpecifiedFontSize(); | 159 return a.SpecifiedFontSize() == b.SpecifiedFontSize(); |
| 160 case CSSPropertyFontSizeAdjust: | 160 case CSSPropertyFontSizeAdjust: |
| 161 return a.FontSizeAdjust() == b.FontSizeAdjust(); | 161 return a.FontSizeAdjust() == b.FontSizeAdjust(); |
| 162 case CSSPropertyFontStretch: | 162 case CSSPropertyFontStretch: |
| 163 return a.GetFontStretch() == b.GetFontStretch(); | 163 return a.GetFontStretch() == b.GetFontStretch(); |
| 164 case CSSPropertyFontVariationSettings: |
| 165 return DataEquivalent(a.GetFontDescription().VariationSettings(), |
| 166 b.GetFontDescription().VariationSettings()); |
| 164 case CSSPropertyFontWeight: | 167 case CSSPropertyFontWeight: |
| 165 return a.GetFontWeight() == b.GetFontWeight(); | 168 return a.GetFontWeight() == b.GetFontWeight(); |
| 166 case CSSPropertyHeight: | 169 case CSSPropertyHeight: |
| 167 return a.Height() == b.Height(); | 170 return a.Height() == b.Height(); |
| 168 case CSSPropertyLeft: | 171 case CSSPropertyLeft: |
| 169 return a.Left() == b.Left(); | 172 return a.Left() == b.Left(); |
| 170 case CSSPropertyLetterSpacing: | 173 case CSSPropertyLetterSpacing: |
| 171 return a.LetterSpacing() == b.LetterSpacing(); | 174 return a.LetterSpacing() == b.LetterSpacing(); |
| 172 case CSSPropertyLightingColor: | 175 case CSSPropertyLightingColor: |
| 173 return a.LightingColor() == b.LightingColor(); | 176 return a.LightingColor() == b.LightingColor(); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 380 |
| 378 bool CSSPropertyEquality::RegisteredCustomPropertiesEqual( | 381 bool CSSPropertyEquality::RegisteredCustomPropertiesEqual( |
| 379 const AtomicString& property_name, | 382 const AtomicString& property_name, |
| 380 const ComputedStyle& a, | 383 const ComputedStyle& a, |
| 381 const ComputedStyle& b) { | 384 const ComputedStyle& b) { |
| 382 return DataEquivalent(a.GetRegisteredVariable(property_name), | 385 return DataEquivalent(a.GetRegisteredVariable(property_name), |
| 383 b.GetRegisteredVariable(property_name)); | 386 b.GetRegisteredVariable(property_name)); |
| 384 } | 387 } |
| 385 | 388 |
| 386 } // namespace blink | 389 } // namespace blink |
| OLD | NEW |