| 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 #ifndef BasicShapePropertyFunctions_h | 5 #ifndef BasicShapePropertyFunctions_h |
| 6 #define BasicShapePropertyFunctions_h | 6 #define BasicShapePropertyFunctions_h |
| 7 | 7 |
| 8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
| 9 #include "core/style/BasicShapes.h" | 9 #include "core/style/BasicShapes.h" |
| 10 #include "core/style/ComputedStyle.h" | 10 #include "core/style/ComputedStyle.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 default: | 42 default: |
| 43 NOTREACHED(); | 43 NOTREACHED(); |
| 44 return nullptr; | 44 return nullptr; |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 static void setBasicShape(CSSPropertyID property, ComputedStyle& style, Pass
RefPtr<BasicShape> shape) | 48 static void setBasicShape(CSSPropertyID property, ComputedStyle& style, Pass
RefPtr<BasicShape> shape) |
| 49 { | 49 { |
| 50 switch (property) { | 50 switch (property) { |
| 51 case CSSPropertyShapeOutside: | 51 case CSSPropertyShapeOutside: |
| 52 style.setShapeOutside(ShapeValue::createShapeValue(shape, BoxMissing
)); | 52 style.setShapeOutside(ShapeValue::createShapeValue(std::move(shape),
BoxMissing)); |
| 53 break; | 53 break; |
| 54 case CSSPropertyWebkitClipPath: | 54 case CSSPropertyWebkitClipPath: |
| 55 style.setClipPath(ShapeClipPathOperation::create(shape)); | 55 style.setClipPath(ShapeClipPathOperation::create(std::move(shape))); |
| 56 break; | 56 break; |
| 57 default: | 57 default: |
| 58 NOTREACHED(); | 58 NOTREACHED(); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| 64 | 64 |
| 65 #endif // BasicShapePropertyFunctions_h | 65 #endif // BasicShapePropertyFunctions_h |
| OLD | NEW |