| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/animation/LengthPropertyFunctions.h" | 5 #include "core/animation/LengthPropertyFunctions.h" |
| 6 | 6 |
| 7 #include "core/style/ComputedStyle.h" | 7 #include "core/style/ComputedStyle.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 result = Length(style.wordSpacing(), Fixed); | 270 result = Length(style.wordSpacing(), Fixed); |
| 271 return true; | 271 return true; |
| 272 | 272 |
| 273 case CSSPropertyBaselineShift: | 273 case CSSPropertyBaselineShift: |
| 274 if (style.baselineShift() != BS_LENGTH) | 274 if (style.baselineShift() != BS_LENGTH) |
| 275 return false; | 275 return false; |
| 276 result = style.baselineShiftValue(); | 276 result = style.baselineShiftValue(); |
| 277 return true; | 277 return true; |
| 278 case CSSPropertyLineHeight: | 278 case CSSPropertyLineHeight: |
| 279 // Percent Lengths are used to represent numbers on line-height. | 279 // Percent Lengths are used to represent numbers on line-height. |
| 280 if (style.specifiedLineHeight().hasPercent()) | 280 if (style.specifiedLineHeight().isPercentOrCalc()) |
| 281 return false; | 281 return false; |
| 282 result = style.specifiedLineHeight(); | 282 result = style.specifiedLineHeight(); |
| 283 return true; | 283 return true; |
| 284 case CSSPropertyPerspective: | 284 case CSSPropertyPerspective: |
| 285 if (!style.hasPerspective()) | 285 if (!style.hasPerspective()) |
| 286 return false; | 286 return false; |
| 287 result = Length(style.perspective(), Fixed); | 287 result = Length(style.perspective(), Fixed); |
| 288 return true; | 288 return true; |
| 289 case CSSPropertyStrokeWidth: | 289 case CSSPropertyStrokeWidth: |
| 290 DCHECK(!isZoomedLength(CSSPropertyStrokeWidth)); | 290 DCHECK(!isZoomedLength(CSSPropertyStrokeWidth)); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 return true; | 407 return true; |
| 408 case CSSPropertyX: | 408 case CSSPropertyX: |
| 409 style.setX(value); | 409 style.setX(value); |
| 410 return true; | 410 return true; |
| 411 case CSSPropertyY: | 411 case CSSPropertyY: |
| 412 style.setY(value); | 412 style.setY(value); |
| 413 return true; | 413 return true; |
| 414 | 414 |
| 415 case CSSPropertyLineHeight: | 415 case CSSPropertyLineHeight: |
| 416 // Percent Lengths are used to represent numbers on line-height. | 416 // Percent Lengths are used to represent numbers on line-height. |
| 417 if (value.hasPercent()) | 417 if (value.isPercentOrCalc()) |
| 418 return false; | 418 return false; |
| 419 style.setLineHeight(value); | 419 style.setLineHeight(value); |
| 420 return true; | 420 return true; |
| 421 | 421 |
| 422 // TODO(alancutter): Support setters that take a numeric value (need to reso
lve percentages). | 422 // TODO(alancutter): Support setters that take a numeric value (need to reso
lve percentages). |
| 423 case CSSPropertyBorderBottomWidth: | 423 case CSSPropertyBorderBottomWidth: |
| 424 case CSSPropertyBorderLeftWidth: | 424 case CSSPropertyBorderLeftWidth: |
| 425 case CSSPropertyBorderRightWidth: | 425 case CSSPropertyBorderRightWidth: |
| 426 case CSSPropertyBorderTopWidth: | 426 case CSSPropertyBorderTopWidth: |
| 427 case CSSPropertyLetterSpacing: | 427 case CSSPropertyLetterSpacing: |
| (...skipping 10 matching lines...) Expand all Loading... |
| 438 case CSSPropertyWebkitTransformOriginZ: | 438 case CSSPropertyWebkitTransformOriginZ: |
| 439 case CSSPropertyWordSpacing: | 439 case CSSPropertyWordSpacing: |
| 440 return false; | 440 return false; |
| 441 | 441 |
| 442 default: | 442 default: |
| 443 return false; | 443 return false; |
| 444 } | 444 } |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace blink | 447 } // namespace blink |
| OLD | NEW |