| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 double destinationZoom = style->effectiveZoom(); | 742 double destinationZoom = style->effectiveZoom(); |
| 743 style->setTransform(sourceZoom == destinationZoom | 743 style->setTransform(sourceZoom == destinationZoom |
| 744 ? operations | 744 ? operations |
| 745 : operations.zoom(destinationZoom / sourceZoom)); | 745 : operations.zoom(destinationZoom / sourceZoom)); |
| 746 return; | 746 return; |
| 747 } | 747 } |
| 748 case CSSPropertyTranslate: { | 748 case CSSPropertyTranslate: { |
| 749 TranslateTransformOperation* translate = | 749 TranslateTransformOperation* translate = |
| 750 toTranslateTransformOperation(animatableValueToTransformOperation( | 750 toTranslateTransformOperation(animatableValueToTransformOperation( |
| 751 value, TransformOperation::Translate3D)); | 751 value, TransformOperation::Translate3D)); |
| 752 if (!translate) { |
| 753 style->setTranslate(nullptr); |
| 754 return; |
| 755 } |
| 752 double sourceZoom = toAnimatableTransform(value)->zoom(); | 756 double sourceZoom = toAnimatableTransform(value)->zoom(); |
| 753 double destinationZoom = style->effectiveZoom(); | 757 double destinationZoom = style->effectiveZoom(); |
| 754 style->setTranslate( | 758 style->setTranslate( |
| 755 sourceZoom == destinationZoom | 759 sourceZoom == destinationZoom |
| 756 ? translate | 760 ? translate |
| 757 : translate->zoomTranslate(destinationZoom / sourceZoom)); | 761 : translate->zoomTranslate(destinationZoom / sourceZoom)); |
| 758 return; | 762 return; |
| 759 } | 763 } |
| 760 case CSSPropertyRotate: { | 764 case CSSPropertyRotate: { |
| 761 style->setRotate( | 765 style->setRotate( |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 style->setRy( | 855 style->setRy( |
| 852 animatableValueToLength(value, state, ValueRangeNonNegative)); | 856 animatableValueToLength(value, state, ValueRangeNonNegative)); |
| 853 return; | 857 return; |
| 854 | 858 |
| 855 default: | 859 default: |
| 856 ASSERT_NOT_REACHED(); | 860 ASSERT_NOT_REACHED(); |
| 857 } | 861 } |
| 858 } | 862 } |
| 859 | 863 |
| 860 } // namespace blink | 864 } // namespace blink |
| OLD | NEW |