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

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

Issue 289273002: Oilpan: make DocumentFragment a heap allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + add WillBeGarbageCollected FIXME. Created 6 years, 7 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
« no previous file with comments | « Source/core/events/TextEvent.h ('k') | Source/core/html/HTMLElement.h » ('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 28 matching lines...) Expand all
39 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::create(PassRefPtrWillBeRawPtr<Abstr actView> view, const String& data, TextEventInputType inputType) 39 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::create(PassRefPtrWillBeRawPtr<Abstr actView> view, const String& data, TextEventInputType inputType)
40 { 40 {
41 return adoptRefWillBeNoop(new TextEvent(view, data, inputType)); 41 return adoptRefWillBeNoop(new TextEvent(view, data, inputType));
42 } 42 }
43 43
44 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtrW illBeRawPtr<AbstractView> view, const String& data, bool shouldSmartReplace) 44 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForPlainTextPaste(PassRefPtrW illBeRawPtr<AbstractView> view, const String& data, bool shouldSmartReplace)
45 { 45 {
46 return adoptRefWillBeNoop(new TextEvent(view, data, nullptr, shouldSmartRepl ace, false)); 46 return adoptRefWillBeNoop(new TextEvent(view, data, nullptr, shouldSmartRepl ace, false));
47 } 47 }
48 48
49 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForFragmentPaste(PassRefPtrWi llBeRawPtr<AbstractView> view, PassRefPtr<DocumentFragment> data, bool shouldSma rtReplace, bool shouldMatchStyle) 49 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForFragmentPaste(PassRefPtrWi llBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<DocumentFragment> data, bo ol shouldSmartReplace, bool shouldMatchStyle)
50 { 50 {
51 return adoptRefWillBeNoop(new TextEvent(view, "", data, shouldSmartReplace, shouldMatchStyle)); 51 return adoptRefWillBeNoop(new TextEvent(view, "", data, shouldSmartReplace, shouldMatchStyle));
52 } 52 }
53 53
54 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForDrop(PassRefPtrWillBeRawPt r<AbstractView> view, const String& data) 54 PassRefPtrWillBeRawPtr<TextEvent> TextEvent::createForDrop(PassRefPtrWillBeRawPt r<AbstractView> view, const String& data)
55 { 55 {
56 return adoptRefWillBeNoop(new TextEvent(view, data, TextEventInputDrop)); 56 return adoptRefWillBeNoop(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(PassRefPtrWillBeRawPtr<AbstractView> view, const String& da ta, TextEventInputType inputType) 67 TextEvent::TextEvent(PassRefPtrWillBeRawPtr<AbstractView> view, const String& da ta, TextEventInputType 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(nullptr) 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(PassRefPtrWillBeRawPtr<AbstractView> view, const String& da ta, PassRefPtr<DocumentFragment> pastingFragment, 78 TextEvent::TextEvent(PassRefPtrWillBeRawPtr<AbstractView> view, const String& da ta, PassRefPtrWillBeRawPtr<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)
82 , m_data(data) 82 , m_data(data)
83 , m_pastingFragment(pastingFragment) 83 , m_pastingFragment(pastingFragment)
84 , m_shouldSmartReplace(shouldSmartReplace) 84 , m_shouldSmartReplace(shouldSmartReplace)
85 , m_shouldMatchStyle(shouldMatchStyle) 85 , m_shouldMatchStyle(shouldMatchStyle)
86 { 86 {
87 ScriptWrappable::init(this); 87 ScriptWrappable::init(this);
88 } 88 }
(...skipping 12 matching lines...) Expand all
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 void TextEvent::trace(Visitor* visitor) 109 void TextEvent::trace(Visitor* visitor)
110 { 110 {
111 visitor->trace(m_pastingFragment);
111 UIEvent::trace(visitor); 112 UIEvent::trace(visitor);
112 } 113 }
113 114
114 } // namespace WebCore 115 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/events/TextEvent.h ('k') | Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698