Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Side by Side Diff: Source/core/events/TextEvent.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/events/PopStateEvent.cpp ('k') | Source/core/events/UIEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 return adoptRef(new TextEvent); 36 return adoptRef(new TextEvent);
37 } 37 }
38 38
39 PassRefPtr<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const Str ing& data, TextEventInputType inputType) 39 PassRefPtr<TextEvent> TextEvent::create(PassRefPtr<AbstractView> view, const Str ing& data, TextEventInputType inputType)
40 { 40 {
41 return adoptRef(new TextEvent(view, data, inputType)); 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, 0, 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));
52 } 52 }
53 53
54 PassRefPtr<TextEvent> TextEvent::createForDrop(PassRefPtr<AbstractView> view, co nst String& data) 54 PassRefPtr<TextEvent> TextEvent::createForDrop(PassRefPtr<AbstractView> view, co nst String& data)
55 { 55 {
56 return adoptRef(new TextEvent(view, data, TextEventInputDrop)); 56 return adoptRef(new TextEvent(view, data, TextEventInputDrop));
57 } 57 }
58 58
59 TextEvent::TextEvent() 59 TextEvent::TextEvent()
60 : m_inputType(TextEventInputKeyboard) 60 : m_inputType(TextEventInputKeyboard)
61 , m_shouldSmartReplace(false) 61 , m_shouldSmartReplace(false)
62 , m_shouldMatchStyle(false) 62 , m_shouldMatchStyle(false)
63 { 63 {
64 ScriptWrappable::init(this); 64 ScriptWrappable::init(this);
65 } 65 }
66 66
67 TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, TextEven tInputType inputType) 67 TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, TextEven tInputType inputType)
68 : UIEvent(EventTypeNames::textInput, true, true, view, 0) 68 : UIEvent(EventTypeNames::textInput, true, true, view, 0)
69 , m_inputType(inputType) 69 , m_inputType(inputType)
70 , m_data(data) 70 , m_data(data)
71 , m_pastingFragment(0) 71 , m_pastingFragment(nullptr)
72 , m_shouldSmartReplace(false) 72 , m_shouldSmartReplace(false)
73 , m_shouldMatchStyle(false) 73 , m_shouldMatchStyle(false)
74 { 74 {
75 ScriptWrappable::init(this); 75 ScriptWrappable::init(this);
76 } 76 }
77 77
78 TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, PassRefP tr<DocumentFragment> pastingFragment, 78 TextEvent::TextEvent(PassRefPtr<AbstractView> view, const String& data, PassRefP tr<DocumentFragment> pastingFragment,
79 bool shouldSmartReplace, bool shouldMatchStyle) 79 bool shouldSmartReplace, bool shouldMatchStyle)
80 : UIEvent(EventTypeNames::textInput, true, true, view, 0) 80 : UIEvent(EventTypeNames::textInput, true, true, view, 0)
81 , m_inputType(TextEventInputPaste) 81 , m_inputType(TextEventInputPaste)
(...skipping 18 matching lines...) Expand all
100 100
101 m_data = data; 101 m_data = data;
102 } 102 }
103 103
104 const AtomicString& TextEvent::interfaceName() const 104 const AtomicString& TextEvent::interfaceName() const
105 { 105 {
106 return EventNames::TextEvent; 106 return EventNames::TextEvent;
107 } 107 }
108 108
109 } // namespace WebCore 109 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/PopStateEvent.cpp ('k') | Source/core/events/UIEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698