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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBackgroundPositi
on(const Length& length, bool originIsSet, BackgroundEdgeOrigin origin, const La
youtStyle& style) | 193 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromBackgroundPositi
on(const Length& length, bool originIsSet, BackgroundEdgeOrigin origin, const La
youtStyle& style) |
194 { | 194 { |
195 if (!originIsSet || origin == LeftEdge || origin == TopEdge) | 195 if (!originIsSet || origin == LeftEdge || origin == TopEdge) |
196 return createFromLength(length, style); | 196 return createFromLength(length, style); |
197 return createFromLength(length.subtractFromOneHundredPercent(), style); | 197 return createFromLength(length.subtractFromOneHundredPercent(), style); |
198 } | 198 } |
199 | 199 |
200 template<CSSPropertyID property> | 200 template<CSSPropertyID property> |
201 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const
FillLayer& fillLayers, const LayoutStyle& style) | 201 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillLayers(const
FillLayer& fillLayers, const LayoutStyle& style) |
202 { | 202 { |
203 WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> > values; | 203 WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> values; |
204 for (const FillLayer* fillLayer = &fillLayers; fillLayer; fillLayer = fillLa
yer->next()) { | 204 for (const FillLayer* fillLayer = &fillLayers; fillLayer; fillLayer = fillLa
yer->next()) { |
205 if (property == CSSPropertyBackgroundImage || property == CSSPropertyWeb
kitMaskImage) { | 205 if (property == CSSPropertyBackgroundImage || property == CSSPropertyWeb
kitMaskImage) { |
206 if (!fillLayer->isImageSet()) | 206 if (!fillLayer->isImageSet()) |
207 break; | 207 break; |
208 values.append(createFromStyleImage(fillLayer->image())); | 208 values.append(createFromStyleImage(fillLayer->image())); |
209 } else if (property == CSSPropertyBackgroundPositionX || property == CSS
PropertyWebkitMaskPositionX) { | 209 } else if (property == CSSPropertyBackgroundPositionX || property == CSS
PropertyWebkitMaskPositionX) { |
210 if (!fillLayer->isXPositionSet()) | 210 if (!fillLayer->isXPositionSet()) |
211 break; | 211 break; |
212 values.append(createFromBackgroundPosition(fillLayer->xPosition(), f
illLayer->isBackgroundXOriginSet(), fillLayer->backgroundXOrigin(), style)); | 212 values.append(createFromBackgroundPosition(fillLayer->xPosition(), f
illLayer->isBackgroundXOriginSet(), fillLayer->backgroundXOrigin(), style)); |
213 } else if (property == CSSPropertyBackgroundPositionY || property == CSS
PropertyWebkitMaskPositionY) { | 213 } else if (property == CSSPropertyBackgroundPositionY || property == CSS
PropertyWebkitMaskPositionY) { |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 case CSSPropertyZIndex: | 539 case CSSPropertyZIndex: |
540 return createFromDouble(style.zIndex()); | 540 return createFromDouble(style.zIndex()); |
541 default: | 541 default: |
542 ASSERT_NOT_REACHED(); | 542 ASSERT_NOT_REACHED(); |
543 // This return value is to avoid a release crash if possible. | 543 // This return value is to avoid a release crash if possible. |
544 return AnimatableUnknown::create(nullptr); | 544 return AnimatableUnknown::create(nullptr); |
545 } | 545 } |
546 } | 546 } |
547 | 547 |
548 } // namespace blink | 548 } // namespace blink |
OLD | NEW |