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

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

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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/html/SearchInputType.cpp ('k') | Source/core/html/shadow/DetailsMarkerControl.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 element()->endEditing(); 204 element()->endEditing();
205 } 205 }
206 206
207 bool TextFieldInputType::shouldSubmitImplicitly(Event* event) 207 bool TextFieldInputType::shouldSubmitImplicitly(Event* event)
208 { 208 {
209 return (event->type() == eventNames().textInputEvent && event->hasInterface( eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() == "\n") || InputType::shouldSubmitImplicitly(event); 209 return (event->type() == eventNames().textInputEvent && event->hasInterface( eventNames().interfaceForTextEvent) && static_cast<TextEvent*>(event)->data() == "\n") || InputType::shouldSubmitImplicitly(event);
210 } 210 }
211 211
212 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const 212 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const
213 { 213 {
214 return new (element()->document()->renderArena()) RenderTextControlSingleLin e(element()); 214 return new RenderTextControlSingleLine(element());
215 } 215 }
216 216
217 bool TextFieldInputType::needsContainer() const 217 bool TextFieldInputType::needsContainer() const
218 { 218 {
219 #if ENABLE(INPUT_SPEECH) 219 #if ENABLE(INPUT_SPEECH)
220 return element()->isSpeechEnabled(); 220 return element()->isSpeechEnabled();
221 #else 221 #else
222 return false; 222 return false;
223 #endif 223 #endif
224 } 224 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 { 516 {
517 return !element()->isDisabledOrReadOnly(); 517 return !element()->isDisabledOrReadOnly();
518 } 518 }
519 519
520 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 520 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
521 { 521 {
522 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); 522 return shouldSpinButtonRespondToMouseEvents() && element()->focused();
523 } 523 }
524 524
525 } // namespace WebCore 525 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/SearchInputType.cpp ('k') | Source/core/html/shadow/DetailsMarkerControl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698