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

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

Issue 715633005: Rename HTMLInputElement::imageLoader() to ensureImageLoader() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing part Created 6 years, 1 month 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/html/HTMLInputElement.h ('k') | Source/core/html/forms/ImageInputType.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) 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 void HTMLInputElement::trace(Visitor* visitor) 143 void HTMLInputElement::trace(Visitor* visitor)
144 { 144 {
145 visitor->trace(m_inputType); 145 visitor->trace(m_inputType);
146 visitor->trace(m_inputTypeView); 146 visitor->trace(m_inputTypeView);
147 visitor->trace(m_listAttributeTargetObserver); 147 visitor->trace(m_listAttributeTargetObserver);
148 visitor->trace(m_imageLoader); 148 visitor->trace(m_imageLoader);
149 HTMLTextFormControlElement::trace(visitor); 149 HTMLTextFormControlElement::trace(visitor);
150 } 150 }
151 151
152 HTMLImageLoader* HTMLInputElement::imageLoader() 152 HTMLImageLoader& HTMLInputElement::ensureImageLoader()
153 { 153 {
154 if (!m_imageLoader) 154 if (!m_imageLoader)
155 m_imageLoader = HTMLImageLoader::create(this); 155 m_imageLoader = HTMLImageLoader::create(this);
156 return m_imageLoader.get(); 156 return *m_imageLoader;
157 } 157 }
158 158
159 void HTMLInputElement::didAddUserAgentShadowRoot(ShadowRoot&) 159 void HTMLInputElement::didAddUserAgentShadowRoot(ShadowRoot&)
160 { 160 {
161 m_inputTypeView->createShadowSubtree(); 161 m_inputTypeView->createShadowSubtree();
162 } 162 }
163 163
164 void HTMLInputElement::willAddFirstAuthorShadowRoot() 164 void HTMLInputElement::willAddFirstAuthorShadowRoot()
165 { 165 {
166 m_inputTypeView->destroyShadowSubtree(); 166 m_inputTypeView->destroyShadowSubtree();
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 { 1475 {
1476 if (insertionPoint->inDocument() && !form()) 1476 if (insertionPoint->inDocument() && !form())
1477 removeFromRadioButtonGroup(); 1477 removeFromRadioButtonGroup();
1478 HTMLTextFormControlElement::removedFrom(insertionPoint); 1478 HTMLTextFormControlElement::removedFrom(insertionPoint);
1479 ASSERT(!inDocument()); 1479 ASSERT(!inDocument());
1480 resetListAttributeTargetObserver(); 1480 resetListAttributeTargetObserver();
1481 } 1481 }
1482 1482
1483 void HTMLInputElement::didMoveToNewDocument(Document& oldDocument) 1483 void HTMLInputElement::didMoveToNewDocument(Document& oldDocument)
1484 { 1484 {
1485 if (hasImageLoader()) 1485 if (imageLoader())
1486 imageLoader()->elementDidMoveToNewDocument(); 1486 imageLoader()->elementDidMoveToNewDocument();
1487 1487
1488 // FIXME: Remove type check. 1488 // FIXME: Remove type check.
1489 if (type() == InputTypeNames::radio) 1489 if (type() == InputTypeNames::radio)
1490 oldDocument.formController().radioButtonGroupScope().removeButton(this); 1490 oldDocument.formController().radioButtonGroupScope().removeButton(this);
1491 1491
1492 HTMLTextFormControlElement::didMoveToNewDocument(oldDocument); 1492 HTMLTextFormControlElement::didMoveToNewDocument(oldDocument);
1493 } 1493 }
1494 1494
1495 void HTMLInputElement::removeAllEventListeners() 1495 void HTMLInputElement::removeAllEventListeners()
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1847 { 1847 {
1848 listAttributeTargetChanged(); 1848 listAttributeTargetChanged();
1849 } 1849 }
1850 1850
1851 AXObject* HTMLInputElement::popupRootAXObject() 1851 AXObject* HTMLInputElement::popupRootAXObject()
1852 { 1852 {
1853 return m_inputTypeView->popupRootAXObject(); 1853 return m_inputTypeView->popupRootAXObject();
1854 } 1854 }
1855 1855
1856 } // namespace 1856 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/forms/ImageInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698