OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 13 matching lines...) Expand all Loading... |
24 * | 24 * |
25 */ | 25 */ |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/events/TextEvent.h" | 28 #include "core/events/TextEvent.h" |
29 | 29 |
30 #include "core/dom/DocumentFragment.h" | 30 #include "core/dom/DocumentFragment.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::create() | 34 PassRefPtr<TextEvent> TextEvent::create() |
35 { | 35 { |
36 return adoptRefWillBeRefCountedGarbageCollected(new TextEvent); | 36 return adoptRef(new TextEvent); |
37 } | 37 } |
38 | 38 |
39 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::create(PassRefPtr<AbstractView> vie
w, const String& data, TextEventInputType inputType) | 39 PassRefPtr<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const Str
ing& data, TextEventInputType inputType) |
40 { | 40 { |
41 return adoptRefWillBeRefCountedGarbageCollected(new TextEvent(view, data, in
putType)); | 41 return adoptRef(new TextEvent(view, data, inputType)); |
42 } | 42 } |
43 | 43 |
44 PassRefPtr<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtr<AbstractView
> view, const String& data, bool shouldSmartReplace) | 44 PassRefPtr<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtr<AbstractView
> view, const String& data, bool shouldSmartReplace) |
45 { | 45 { |
46 return adoptRef(new TextEvent(view, data, nullptr, shouldSmartReplace, false
)); | 46 return adoptRef(new TextEvent(view, data, nullptr, shouldSmartReplace, false
)); |
47 } | 47 } |
48 | 48 |
49 PassRefPtr<TextEvent> TextEvent::createForFragmentPaste(PassRefPtr<AbstractView>
view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMa
tchStyle) | 49 PassRefPtr<TextEvent> TextEvent::createForFragmentPaste(PassRefPtr<AbstractView>
view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMa
tchStyle) |
50 { | 50 { |
51 return adoptRef(new TextEvent(view, "", data, shouldSmartReplace, shouldMatc
hStyle)); | 51 return adoptRef(new TextEvent(view, "", data, shouldSmartReplace, shouldMatc
hStyle)); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 { | 105 { |
106 return EventNames::TextEvent; | 106 return EventNames::TextEvent; |
107 } | 107 } |
108 | 108 |
109 void TextEvent::trace(Visitor* visitor) | 109 void TextEvent::trace(Visitor* visitor) |
110 { | 110 { |
111 UIEvent::trace(visitor); | 111 UIEvent::trace(visitor); |
112 } | 112 } |
113 | 113 |
114 } // namespace WebCore | 114 } // namespace WebCore |
OLD | NEW |