| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 8 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3531 return valueForScrollSnapPoints(style.scrollSnapPointsX(), style); | 3531 return valueForScrollSnapPoints(style.scrollSnapPointsX(), style); |
| 3532 case CSSPropertyScrollSnapPointsY: | 3532 case CSSPropertyScrollSnapPointsY: |
| 3533 return valueForScrollSnapPoints(style.scrollSnapPointsY(), style); | 3533 return valueForScrollSnapPoints(style.scrollSnapPointsY(), style); |
| 3534 case CSSPropertyScrollSnapCoordinate: | 3534 case CSSPropertyScrollSnapCoordinate: |
| 3535 return valueForScrollSnapCoordinate(style.scrollSnapCoordinate(), style); | 3535 return valueForScrollSnapCoordinate(style.scrollSnapCoordinate(), style); |
| 3536 case CSSPropertyScrollSnapDestination: | 3536 case CSSPropertyScrollSnapDestination: |
| 3537 return valueForScrollSnapDestination(style.scrollSnapDestination(), | 3537 return valueForScrollSnapDestination(style.scrollSnapDestination(), |
| 3538 style); | 3538 style); |
| 3539 case CSSPropertyTranslate: { | 3539 case CSSPropertyTranslate: { |
| 3540 if (!style.translate()) | 3540 if (!style.translate()) |
| 3541 return CSSPrimitiveValue::create(0, | 3541 return CSSIdentifierValue::create(CSSValueNone); |
| 3542 CSSPrimitiveValue::UnitType::Pixels); | |
| 3543 | 3542 |
| 3544 CSSValueList* list = CSSValueList::createSpaceSeparated(); | 3543 CSSValueList* list = CSSValueList::createSpaceSeparated(); |
| 3545 if (layoutObject && layoutObject->isBox()) { | 3544 if (layoutObject && layoutObject->isBox()) { |
| 3546 LayoutRect box = toLayoutBox(layoutObject)->borderBoxRect(); | 3545 LayoutRect box = toLayoutBox(layoutObject)->borderBoxRect(); |
| 3547 list->append(*zoomAdjustedPixelValue( | 3546 list->append(*zoomAdjustedPixelValue( |
| 3548 floatValueForLength(style.translate()->x(), box.width().toFloat()), | 3547 floatValueForLength(style.translate()->x(), box.width().toFloat()), |
| 3549 style)); | 3548 style)); |
| 3550 | 3549 |
| 3551 if (!style.translate()->y().isZero() || style.translate()->z() != 0) | 3550 if (!style.translate()->y().isZero() || style.translate()->z() != 0) |
| 3552 list->append(*zoomAdjustedPixelValue( | 3551 list->append(*zoomAdjustedPixelValue( |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3642 case CSSPropertyAll: | 3641 case CSSPropertyAll: |
| 3643 return nullptr; | 3642 return nullptr; |
| 3644 default: | 3643 default: |
| 3645 break; | 3644 break; |
| 3646 } | 3645 } |
| 3647 ASSERT_NOT_REACHED(); | 3646 ASSERT_NOT_REACHED(); |
| 3648 return nullptr; | 3647 return nullptr; |
| 3649 } | 3648 } |
| 3650 | 3649 |
| 3651 } // namespace blink | 3650 } // namespace blink |
| OLD | NEW |