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

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

Issue 24430002: Rename attach and detach to createRenderTree/destroyRenderTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
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 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 return false; 206 return false;
207 } 207 }
208 208
209 static void focusPostAttach(Node* element) 209 static void focusPostAttach(Node* element)
210 { 210 {
211 toElement(element)->focus(); 211 toElement(element)->focus();
212 element->deref(); 212 element->deref();
213 } 213 }
214 214
215 void HTMLFormControlElement::attach(const AttachContext& context) 215 void HTMLFormControlElement::createRenderTree(const AttachContext& context)
216 { 216 {
217 HTMLElement::attach(context); 217 HTMLElement::createRenderTree(context);
218 218
219 // The call to updateFromElement() needs to go after the call through 219 // The call to updateFromElement() needs to go after the call through
220 // to the base class's attach() because that can sometimes do a close 220 // to the base class's attach() because that can sometimes do a close
221 // on the renderer. 221 // on the renderer.
222 if (renderer()) 222 if (renderer())
223 renderer()->updateFromElement(); 223 renderer()->updateFromElement();
224 224
225 if (shouldAutofocus(this)) { 225 if (shouldAutofocus(this)) {
226 setAutofocused(); 226 setAutofocused();
227 ref(); 227 ref();
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node) 485 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node)
486 { 486 {
487 for (; node; node = node->parentNode()) { 487 for (; node; node = node->parentNode()) {
488 if (node->isElementNode() && toElement(node)->isFormControlElement()) 488 if (node->isElementNode() && toElement(node)->isFormControlElement())
489 return toHTMLFormControlElement(node); 489 return toHTMLFormControlElement(node);
490 } 490 }
491 return 0; 491 return 0;
492 } 492 }
493 493
494 } // namespace Webcore 494 } // namespace Webcore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698