| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 ClipPathOperation(OperationType type) | 58 ClipPathOperation(OperationType type) |
| 59 : m_type(type) | 59 : m_type(type) |
| 60 { | 60 { |
| 61 } | 61 } |
| 62 | 62 |
| 63 OperationType m_type; | 63 OperationType m_type; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 class ReferenceClipPathOperation : public ClipPathOperation { | 66 class ReferenceClipPathOperation : public ClipPathOperation { |
| 67 public: | 67 public: |
| 68 static PassRefPtr<ReferenceClipPathOperation> create(const String& url, cons
t String& fragment) | 68 static PassRefPtr<ReferenceClipPathOperation> create(const String& url, cons
t AtomicString& fragment) |
| 69 { | 69 { |
| 70 return adoptRef(new ReferenceClipPathOperation(url, fragment)); | 70 return adoptRef(new ReferenceClipPathOperation(url, fragment)); |
| 71 } | 71 } |
| 72 | 72 |
| 73 const String& url() const { return m_url; } | 73 const String& url() const { return m_url; } |
| 74 const String& fragment() const { return m_fragment; } | 74 const AtomicString& fragment() const { return m_fragment; } |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 virtual bool operator==(const ClipPathOperation& o) const OVERRIDE | 77 virtual bool operator==(const ClipPathOperation& o) const OVERRIDE |
| 78 { | 78 { |
| 79 return isSameType(o) && m_url == static_cast<const ReferenceClipPathOper
ation&>(o).m_url; | 79 return isSameType(o) && m_url == static_cast<const ReferenceClipPathOper
ation&>(o).m_url; |
| 80 } | 80 } |
| 81 | 81 |
| 82 ReferenceClipPathOperation(const String& url, const String& fragment) | 82 ReferenceClipPathOperation(const String& url, const AtomicString& fragment) |
| 83 : ClipPathOperation(REFERENCE) | 83 : ClipPathOperation(REFERENCE) |
| 84 , m_url(url) | 84 , m_url(url) |
| 85 , m_fragment(fragment) | 85 , m_fragment(fragment) |
| 86 { | 86 { |
| 87 } | 87 } |
| 88 | 88 |
| 89 String m_url; | 89 String m_url; |
| 90 String m_fragment; | 90 AtomicString m_fragment; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 DEFINE_TYPE_CASTS(ReferenceClipPathOperation, ClipPathOperation, op, op->type()
== ClipPathOperation::REFERENCE, op.type() == ClipPathOperation::REFERENCE); | 93 DEFINE_TYPE_CASTS(ReferenceClipPathOperation, ClipPathOperation, op, op->type()
== ClipPathOperation::REFERENCE, op.type() == ClipPathOperation::REFERENCE); |
| 94 | 94 |
| 95 class ShapeClipPathOperation : public ClipPathOperation { | 95 class ShapeClipPathOperation : public ClipPathOperation { |
| 96 public: | 96 public: |
| 97 static PassRefPtr<ShapeClipPathOperation> create(PassRefPtr<BasicShape> shap
e) | 97 static PassRefPtr<ShapeClipPathOperation> create(PassRefPtr<BasicShape> shap
e) |
| 98 { | 98 { |
| 99 return adoptRef(new ShapeClipPathOperation(shape)); | 99 return adoptRef(new ShapeClipPathOperation(shape)); |
| 100 } | 100 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 126 DEFINE_TYPE_CASTS(ShapeClipPathOperation, ClipPathOperation, op, op->type() == C
lipPathOperation::SHAPE, op.type() == ClipPathOperation::SHAPE); | 126 DEFINE_TYPE_CASTS(ShapeClipPathOperation, ClipPathOperation, op, op->type() == C
lipPathOperation::SHAPE, op.type() == ClipPathOperation::SHAPE); |
| 127 | 127 |
| 128 inline bool ShapeClipPathOperation::operator==(const ClipPathOperation& o) const | 128 inline bool ShapeClipPathOperation::operator==(const ClipPathOperation& o) const |
| 129 { | 129 { |
| 130 return isSameType(o) && *m_shape == *toShapeClipPathOperation(o).m_shape; | 130 return isSameType(o) && *m_shape == *toShapeClipPathOperation(o).m_shape; |
| 131 } | 131 } |
| 132 | 132 |
| 133 } | 133 } |
| 134 | 134 |
| 135 #endif // ClipPathOperation_h | 135 #endif // ClipPathOperation_h |
| OLD | NEW |