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

Unified Diff: Source/core/html/parser/HTMLConstructionSite.cpp

Issue 270483003: Oilpan: Prepare to move HTMLFormElement, HTMLFormElement::PastNamesMap, FormKeyGenerator, and FormS… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/parser/HTMLConstructionSite.h ('k') | Source/core/loader/FormState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLConstructionSite.cpp
diff --git a/Source/core/html/parser/HTMLConstructionSite.cpp b/Source/core/html/parser/HTMLConstructionSite.cpp
index 1b72f22007d7514eb69bba9c634091c306c93fc9..c6d58767625662aa54b7719526074ac98c41e866 100644
--- a/Source/core/html/parser/HTMLConstructionSite.cpp
+++ b/Source/core/html/parser/HTMLConstructionSite.cpp
@@ -596,12 +596,12 @@ void HTMLConstructionSite::insertHTMLBodyElement(AtomicHTMLToken* token)
void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, bool isDemoted)
{
- RefPtr<Element> element = createHTMLElement(token);
+ RefPtrWillBeRawPtr<Element> element = createHTMLElement(token);
ASSERT(isHTMLFormElement(element));
m_form = static_pointer_cast<HTMLFormElement>(element.release());
m_form->setDemoted(isDemoted);
- attachLater(currentNode(), m_form);
- m_openElements.push(HTMLStackItem::create(m_form, token));
+ attachLater(currentNode(), m_form.get());
+ m_openElements.push(HTMLStackItem::create(m_form.get(), token));
}
void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken* token)
@@ -731,7 +731,7 @@ inline Document& HTMLConstructionSite::ownerDocumentForCurrentNode()
return currentNode()->document();
}
-PassRefPtr<Element> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
+PassRefPtrWillBeRawPtr<Element> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
{
Document& document = ownerDocumentForCurrentNode();
// Only associate the element with the current form if we're creating the new element
@@ -740,7 +740,12 @@ PassRefPtr<Element> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* tok
// FIXME: This can't use HTMLConstructionSite::createElement because we
// have to pass the current form element. We should rework form association
// to occur after construction to allow better code sharing here.
+#if ENABLE(OILPAN)
+ // FIXME: HTMLElementFactory::createHTMLElement should return a raw pointer.
haraken 2014/05/09 09:27:34 FIXME: Oilpan:
zerny-chromium 2014/05/09 09:37:59 Yes. Or just leave the RefPtr which we will change
tkent 2014/05/09 09:46:31 Added Oilpan:. I'd like to remove RefPtr<> as muc
+ RawPtr<Element> element = HTMLElementFactory::createHTMLElement(token->name(), document, form, true).get();
+#else
RefPtr<Element> element = HTMLElementFactory::createHTMLElement(token->name(), document, form, true);
+#endif
setAttributes(element.get(), token, m_parserContentPolicy);
ASSERT(element->isHTMLElement());
return element.release();
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.h ('k') | Source/core/loader/FormState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698