Chromium Code Reviews| 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(); |