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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 270483003: Oilpan: Prepare to move HTMLFormElement, HTMLFormElement::PastNamesMap, FormKeyGenerator, and FormS… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: FIXME: Oilpan: Created 6 years, 7 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
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 69b2e0028a8d284b142f67c1762eec588ab6706d..f8bf106daec85b2ace0562fb5f59bda6c2f2cbeb 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -94,6 +94,7 @@ HTMLFormElement::~HTMLFormElement()
void HTMLFormElement::trace(Visitor* visitor)
{
#if ENABLE(OILPAN)
+ visitor->trace(m_pastNamesMap);
visitor->trace(m_associatedElements);
#endif
HTMLElement::trace(visitor);
@@ -269,7 +270,7 @@ bool HTMLFormElement::validateInteractively(Event* event)
// has !renderer()->needsLayout() assertion.
document().updateLayoutIgnorePendingStylesheets();
- RefPtr<HTMLFormElement> protector(this);
+ RefPtrWillBeRawPtr<HTMLFormElement> protector(this);
// Focus on the first focusable control and show a validation message.
for (unsigned i = 0; i < unhandledInvalidControls.size(); ++i) {
FormAssociatedElement* unhandledAssociatedElement = unhandledInvalidControls[i].get();
@@ -299,7 +300,7 @@ bool HTMLFormElement::validateInteractively(Event* event)
void HTMLFormElement::prepareForSubmission(Event* event)
{
- RefPtr<HTMLFormElement> protector(this);
+ RefPtrWillBeRawPtr<HTMLFormElement> protector(this);
LocalFrame* frame = document().frame();
if (!frame)
return;
@@ -655,7 +656,7 @@ bool HTMLFormElement::checkValidity()
bool HTMLFormElement::checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement> >* unhandledInvalidControls)
{
- RefPtr<HTMLFormElement> protector(this);
+ RefPtrWillBeRawPtr<HTMLFormElement> protector(this);
// Copy associatedElements because event handlers called from
// HTMLFormControlElement::checkValidity() might change associatedElements.
const FormAssociatedElement::List& associatedElements = this->associatedElements();
@@ -699,7 +700,7 @@ void HTMLFormElement::addToPastNamesMap(Element* element, const AtomicString& pa
if (pastName.isEmpty())
return;
if (!m_pastNamesMap)
- m_pastNamesMap = adoptPtr(new PastNamesMap);
+ m_pastNamesMap = adoptPtrWillBeNoop(new PastNamesMap);
m_pastNamesMap->set(pastName, element);
}
@@ -709,8 +710,8 @@ void HTMLFormElement::removeFromPastNamesMap(HTMLElement& element)
return;
PastNamesMap::iterator end = m_pastNamesMap->end();
for (PastNamesMap::iterator it = m_pastNamesMap->begin(); it != end; ++it) {
- if (it->value == &element) {
- it->value = 0;
+ if (it->value.get() == &element) {
+ it->value = nullptr;
// Keep looping. Single element can have multiple names.
}
}
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698