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

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

Issue 23502003: Make InputType and InputTypeView RefCounted. (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
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/HiddenInputType.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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (m_inputType->formControlType() == newTypeName) 412 if (m_inputType->formControlType() == newTypeName)
413 return; 413 return;
414 414
415 if (hadType && !InputType::canChangeFromAnotherType(newTypeName)) { 415 if (hadType && !InputType::canChangeFromAnotherType(newTypeName)) {
416 // Set the attribute back to the old value. 416 // Set the attribute back to the old value.
417 // Useful in case we were called from inside parseAttribute. 417 // Useful in case we were called from inside parseAttribute.
418 setAttribute(typeAttr, type()); 418 setAttribute(typeAttr, type());
419 return; 419 return;
420 } 420 }
421 421
422 OwnPtr<InputType> newType = InputType::create(this, newTypeName); 422 RefPtr<InputType> newType = InputType::create(this, newTypeName);
423 removeFromRadioButtonGroup(); 423 removeFromRadioButtonGroup();
424 424
425 bool didStoreValue = m_inputType->storesValueSeparateFromAttribute(); 425 bool didStoreValue = m_inputType->storesValueSeparateFromAttribute();
426 bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttr ibutes(); 426 bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttr ibutes();
427 427
428 m_inputType->destroyShadowSubtree(); 428 m_inputType->destroyShadowSubtree();
429 429
430 bool wasAttached = attached(); 430 bool wasAttached = attached();
431 if (wasAttached) 431 if (wasAttached)
432 detach(); 432 detach();
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 } 1872 }
1873 1873
1874 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1874 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1875 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1875 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1876 { 1876 {
1877 return m_inputType->customStyleForRenderer(originalStyleForRenderer()); 1877 return m_inputType->customStyleForRenderer(originalStyleForRenderer());
1878 } 1878 }
1879 #endif 1879 #endif
1880 1880
1881 } // namespace 1881 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/HiddenInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698