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

Unified Diff: Source/core/html/HTMLInputElement.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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index cc4e4cfbef9127d91301cf05ba146505c758ca86..13de529817f8d89e8a2153aa587f06a119f267b6 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -428,7 +428,7 @@ void HTMLInputElement::updateType()
bool wasAttached = attached();
if (wasAttached)
- detach();
+ destroyRenderTree();
m_inputType = newType.release();
if (hasAuthorShadowRoot())
@@ -477,7 +477,7 @@ void HTMLInputElement::updateType()
}
if (wasAttached) {
- lazyAttach();
+ scheduleRenderTreeCreation();
if (document().focusedElement() == this)
document().updateFocusAppearanceSoon(true /* restore selection */);
}
@@ -699,7 +699,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
// FIXME: Detaching just for maxResults change is not ideal. We should figure out the right
// time to relayout for this change.
if (m_maxResults != oldResults && (m_maxResults <= 0 || oldResults <= 0))
- lazyReattachIfAttached();
+ scheduleRenderTreeRecreationIfAttached();
setNeedsStyleRecalc();
UseCounter::count(&document(), UseCounter::ResultsAttribute);
} else if (name == incrementalAttr) {
@@ -749,7 +749,7 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
// not. So we reset the whole thing and recreate to get the right
// styles and layout.
m_inputType->destroyShadowSubtree();
- lazyReattachIfAttached();
+ scheduleRenderTreeRecreationIfAttached();
m_inputType->createShadowSubtree();
setFormControlValueMatchesRenderer(false);
}
@@ -788,12 +788,12 @@ RenderObject* HTMLInputElement::createRenderer(RenderStyle* style)
return m_inputTypeView->createRenderer(style);
}
-void HTMLInputElement::attach(const AttachContext& context)
+void HTMLInputElement::createRenderTree(const AttachContext& context)
{
if (!m_hasType)
updateType();
- HTMLTextFormControlElement::attach(context);
+ HTMLTextFormControlElement::createRenderTree(context);
m_inputTypeView->attach();
m_inputType->countUsage();
@@ -802,9 +802,9 @@ void HTMLInputElement::attach(const AttachContext& context)
document().updateFocusAppearanceSoon(true /* restore selection */);
}
-void HTMLInputElement::detach(const AttachContext& context)
+void HTMLInputElement::destroyRenderTree(const AttachContext& context)
{
- HTMLTextFormControlElement::detach(context);
+ HTMLTextFormControlElement::destroyRenderTree(context);
setFormControlValueMatchesRenderer(false);
m_inputType->detach();
}

Powered by Google App Engine
This is Rietveld 408576698