| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
| 32 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 33 #include "wtf/RefCounted.h" | 33 #include "wtf/RefCounted.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class ExceptionState; | 37 class ExceptionState; |
| 38 class Image; | 38 class Image; |
| 39 | 39 |
| 40 class CanvasPattern FINAL : public RefCountedWillBeGarbageCollectedFinalized<Can
vasPattern>, public ScriptWrappable { | 40 class CanvasPattern FINAL : public RefCountedWillBeGarbageCollectedFinalized<Can
vasPattern>, public ScriptWrappable { |
| 41 DEFINE_WRAPPERTYPEINFO(); |
| 41 public: | 42 public: |
| 42 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState
&); | 43 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState
&); |
| 43 | 44 |
| 44 static PassRefPtrWillBeRawPtr<CanvasPattern> create(PassRefPtr<Image> image, | 45 static PassRefPtrWillBeRawPtr<CanvasPattern> create(PassRefPtr<Image> image, |
| 45 Pattern::RepeatMode repeat, bool originClean) | 46 Pattern::RepeatMode repeat, bool originClean) |
| 46 { | 47 { |
| 47 return adoptRefWillBeNoop(new CanvasPattern(image, repeat, originClean))
; | 48 return adoptRefWillBeNoop(new CanvasPattern(image, repeat, originClean))
; |
| 48 } | 49 } |
| 49 | 50 |
| 50 Pattern* pattern() const { return m_pattern.get(); } | 51 Pattern* pattern() const { return m_pattern.get(); } |
| 51 | 52 |
| 52 bool originClean() const { return m_originClean; } | 53 bool originClean() const { return m_originClean; } |
| 53 | 54 |
| 54 void trace(Visitor*) { } | 55 void trace(Visitor*) { } |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean); | 58 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean); |
| 58 | 59 |
| 59 RefPtr<Pattern> m_pattern; | 60 RefPtr<Pattern> m_pattern; |
| 60 bool m_originClean; | 61 bool m_originClean; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace blink | 64 } // namespace blink |
| 64 | 65 |
| 65 #endif | 66 #endif // CanvasPattern_h |
| OLD | NEW |