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

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 298963003: Oilpan: Move ClickHandlingState to heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FINAL 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/forms/CheckboxInputType.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 void* HTMLInputElement::preDispatchEventHandler(Event* event) 1083 void* HTMLInputElement::preDispatchEventHandler(Event* event)
1084 { 1084 {
1085 if (event->type() == EventTypeNames::textInput && m_inputTypeView->shouldSub mitImplicitly(event)) { 1085 if (event->type() == EventTypeNames::textInput && m_inputTypeView->shouldSub mitImplicitly(event)) {
1086 event->stopPropagation(); 1086 event->stopPropagation();
1087 return 0; 1087 return 0;
1088 } 1088 }
1089 if (event->type() != EventTypeNames::click) 1089 if (event->type() != EventTypeNames::click)
1090 return 0; 1090 return 0;
1091 if (!event->isMouseEvent() || toMouseEvent(event)->button() != LeftButton) 1091 if (!event->isMouseEvent() || toMouseEvent(event)->button() != LeftButton)
1092 return 0; 1092 return 0;
1093 #if ENABLE(OILPAN)
1094 return m_inputTypeView->willDispatchClick();
1095 #else
1093 // FIXME: Check whether there are any cases where this actually ends up leak ing. 1096 // FIXME: Check whether there are any cases where this actually ends up leak ing.
1094 return m_inputTypeView->willDispatchClick().leakPtr(); 1097 return m_inputTypeView->willDispatchClick().leakPtr();
haraken 2014/05/22 10:44:50 Shall we add RawPtr::leakPtr so that we don't need
1098 #endif
1095 } 1099 }
1096 1100
1097 void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreD ispatch) 1101 void HTMLInputElement::postDispatchEventHandler(Event* event, void* dataFromPreD ispatch)
1098 { 1102 {
1099 OwnPtr<ClickHandlingState> state = adoptPtr(static_cast<ClickHandlingState*> (dataFromPreDispatch)); 1103 OwnPtrWillBeRawPtr<ClickHandlingState> state = adoptPtrWillBeNoop(static_cas t<ClickHandlingState*>(dataFromPreDispatch));
1100 if (!state) 1104 if (!state)
1101 return; 1105 return;
1102 m_inputTypeView->didDispatchClick(event, *state); 1106 m_inputTypeView->didDispatchClick(event, *state);
1103 } 1107 }
1104 1108
1105 void HTMLInputElement::defaultEventHandler(Event* evt) 1109 void HTMLInputElement::defaultEventHandler(Event* evt)
1106 { 1110 {
1107 if (evt->isMouseEvent() && evt->type() == EventTypeNames::click && toMouseEv ent(evt)->button() == LeftButton) { 1111 if (evt->isMouseEvent() && evt->type() == EventTypeNames::click && toMouseEv ent(evt)->button() == LeftButton) {
1108 m_inputTypeView->handleClickEvent(toMouseEvent(evt)); 1112 m_inputTypeView->handleClickEvent(toMouseEvent(evt));
1109 if (evt->defaultHandled()) 1113 if (evt->defaultHandled())
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1885 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1882 } 1886 }
1883 #endif 1887 #endif
1884 1888
1885 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue) 1889 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue)
1886 { 1890 {
1887 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ; 1891 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ;
1888 } 1892 }
1889 1893
1890 } // namespace 1894 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/forms/CheckboxInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698