<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[177450] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/177450">177450</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2014-12-17 11:39:16 -0800 (Wed, 17 Dec 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Purge PassRefPtr from Frame.
<https://webkit.org/b/139731>
Reviewed by Anders Carlsson.
Source/WebCore:
Remove all use of PassRefPtr from the Frame class, instead using
Ref or RefPtr as appropriate.
* WebCore.exp.in:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* page/Frame.cpp:
(WebCore::Frame::create):
(WebCore::Frame::setView):
(WebCore::Frame::setDocument):
(WebCore::Frame::rangeForPoint):
(WebCore::Frame::createView):
* page/Frame.h:
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
Source/WebKit/mac:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]):
* WebView/WebFrameInternal.h:
Source/WebKit2:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentWritercpp">trunk/Source/WebCore/loader/DocumentWriter.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameh">trunk/Source/WebCore/page/Frame.h</a></li>
<li><a href="#trunkSourceWebCorexmlXSLTProcessorcpp">trunk/Source/WebCore/xml/XSLTProcessor.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFrameInternalh">trunk/Source/WebKit/mac/WebView/WebFrameInternal.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebFramecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/ChangeLog        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-12-17 Andreas Kling <akling@apple.com>
+
+ Purge PassRefPtr from Frame.
+ <https://webkit.org/b/139731>
+
+ Reviewed by Anders Carlsson.
+
+ Remove all use of PassRefPtr from the Frame class, instead using
+ Ref or RefPtr as appropriate.
+
+ * WebCore.exp.in:
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::begin):
+ * page/Frame.cpp:
+ (WebCore::Frame::create):
+ (WebCore::Frame::setView):
+ (WebCore::Frame::setDocument):
+ (WebCore::Frame::rangeForPoint):
+ (WebCore::Frame::createView):
+ * page/Frame.h:
+ * xml/XSLTProcessor.cpp:
+ (WebCore::XSLTProcessor::createDocumentFromSource):
+
</ins><span class="cx"> 2014-12-17 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Test fix after r177444.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -1216,7 +1216,7 @@
</span><span class="cx"> __ZN7WebCore5Frame25setPageAndTextZoomFactorsEff
</span><span class="cx"> __ZN7WebCore5Frame27resizePageRectsKeepingRatioERKNS_9FloatSizeES3_
</span><span class="cx"> __ZN7WebCore5Frame6createEPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
</span><del>-__ZN7WebCore5Frame7setViewEN3WTF10PassRefPtrINS_9FrameViewEEE
</del><ins>+__ZN7WebCore5Frame7setViewEON3WTF6RefPtrINS_9FrameViewEEE
</ins><span class="cx"> __ZN7WebCore5FrameD1Ev
</span><span class="cx"> __ZN7WebCore5Image12supportsTypeERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore5Image20loadPlatformResourceEPKc
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentWritercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentWriter.cpp (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentWriter.cpp        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/loader/DocumentWriter.cpp        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> m_frame->script().updatePlatformScriptObjects();
</span><span class="cx">
</span><span class="cx"> m_frame->loader().setOutgoingReferrer(url);
</span><del>- m_frame->setDocument(document);
</del><ins>+ m_frame->setDocument(document.copyRef());
</ins><span class="cx">
</span><span class="cx"> if (m_decoder)
</span><span class="cx"> document->setDecoder(m_decoder.get());
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -204,11 +204,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Frame> Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)
</del><ins>+Ref<Frame> Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(page);
</span><span class="cx"> ASSERT(client);
</span><del>- return adoptRef(new Frame(*page, ownerElement, *client));
</del><ins>+ return adoptRef(*new Frame(*page, ownerElement, *client));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Frame::~Frame()
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> m_destructionObservers.remove(observer);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Frame::setView(PassRefPtr<FrameView> view)
</del><ins>+void Frame::setView(RefPtr<FrameView>&& view)
</ins><span class="cx"> {
</span><span class="cx"> // We the custom scroll bars as early as possible to prevent m_doc->detach()
</span><span class="cx"> // from messing with the view such that its scroll bars won't be torn down.
</span><span class="lines">@@ -260,7 +260,7 @@
</span><span class="cx">
</span><span class="cx"> eventHandler().clear();
</span><span class="cx">
</span><del>- m_view = view;
</del><ins>+ m_view = WTF::move(view);
</ins><span class="cx">
</span><span class="cx"> // Only one form submission is allowed per view of a part.
</span><span class="cx"> // Since this part may be getting reused as a result of being
</span><span class="lines">@@ -268,14 +268,14 @@
</span><span class="cx"> loader().resetMultipleFormSubmissionProtection();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Frame::setDocument(PassRefPtr<Document> newDocument)
</del><ins>+void Frame::setDocument(RefPtr<Document>&& newDocument)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!newDocument || newDocument->frame() == this);
</span><span class="cx">
</span><span class="cx"> if (m_doc && !m_doc->inPageCache())
</span><span class="cx"> m_doc->prepareForDestruction();
</span><span class="cx">
</span><del>- m_doc = newDocument.get();
</del><ins>+ m_doc = newDocument.copyRef();
</ins><span class="cx"> ASSERT(!m_doc || m_doc->domWindow());
</span><span class="cx"> ASSERT(!m_doc || m_doc->domWindow()->frame() == this);
</span><span class="cx">
</span><span class="lines">@@ -854,28 +854,28 @@
</span><span class="cx"> return result.innerNode() ? &result.innerNode()->document() : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<Range> Frame::rangeForPoint(const IntPoint& framePoint)
</del><ins>+RefPtr<Range> Frame::rangeForPoint(const IntPoint& framePoint)
</ins><span class="cx"> {
</span><span class="cx"> VisiblePosition position = visiblePositionForPoint(framePoint);
</span><span class="cx"> if (position.isNull())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> VisiblePosition previous = position.previous();
</span><span class="cx"> if (previous.isNotNull()) {
</span><span class="cx"> RefPtr<Range> previousCharacterRange = makeRange(previous, position);
</span><span class="cx"> LayoutRect rect = editor().firstRectForRange(previousCharacterRange.get());
</span><span class="cx"> if (rect.contains(framePoint))
</span><del>- return previousCharacterRange.release();
</del><ins>+ return previousCharacterRange;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> VisiblePosition next = position.next();
</span><span class="cx"> if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) {
</span><span class="cx"> LayoutRect rect = editor().firstRectForRange(nextCharacterRange.get());
</span><span class="cx"> if (rect.contains(framePoint))
</span><del>- return nextCharacterRange.release();
</del><ins>+ return nextCharacterRange;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor, bool transparent,
</span><span class="lines">@@ -908,7 +908,7 @@
</span><span class="cx">
</span><span class="cx"> frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode, horizontalLock, verticalLock);
</span><span class="cx">
</span><del>- setView(frameView);
</del><ins>+ setView(frameView.copyRef());
</ins><span class="cx">
</span><span class="cx"> if (backgroundColor.isValid())
</span><span class="cx"> frameView->updateBackgroundRecursively(backgroundColor, transparent);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.h (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.h        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/page/Frame.h        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -115,14 +115,14 @@
</span><span class="cx">
</span><span class="cx"> class Frame : public RefCounted<Frame> {
</span><span class="cx"> public:
</span><del>- WEBCORE_EXPORT static PassRefPtr<Frame> create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
</del><ins>+ WEBCORE_EXPORT static Ref<Frame> create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
</ins><span class="cx">
</span><span class="cx"> void init();
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> // Creates <html><body style="..."></body></html> doing minimal amount of work.
</span><span class="cx"> WEBCORE_EXPORT void initWithSimpleHTMLDocument(const String& style, const URL&);
</span><span class="cx"> #endif
</span><del>- WEBCORE_EXPORT void setView(PassRefPtr<FrameView>);
</del><ins>+ WEBCORE_EXPORT void setView(RefPtr<FrameView>&&);
</ins><span class="cx"> WEBCORE_EXPORT void createView(const IntSize&, const Color&, bool,
</span><span class="cx"> const IntSize& fixedLayoutSize = IntSize(), const IntRect& fixedVisibleContentRect = IntRect(),
</span><span class="cx"> bool useFixedLayout = false, ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> bool shouldUsePrintingLayout() const;
</span><span class="cx"> WEBCORE_EXPORT FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, const FloatSize& expectedSize);
</span><span class="cx">
</span><del>- void setDocument(PassRefPtr<Document>);
</del><ins>+ void setDocument(RefPtr<Document>&&);
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void setPageZoomFactor(float);
</span><span class="cx"> float pageZoomFactor() const { return m_pageZoomFactor; }
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT VisiblePosition visiblePositionForPoint(const IntPoint& framePoint);
</span><span class="cx"> Document* documentAtPoint(const IntPoint& windowPoint);
</span><del>- WEBCORE_EXPORT PassRefPtr<Range> rangeForPoint(const IntPoint& framePoint);
</del><ins>+ WEBCORE_EXPORT RefPtr<Range> rangeForPoint(const IntPoint& framePoint);
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT String searchForLabelsAboveCell(const JSC::Yarr::RegularExpression&, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
</span><span class="cx"> String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXSLTProcessorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XSLTProcessor.cpp (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XSLTProcessor.cpp        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebCore/xml/XSLTProcessor.cpp        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> result->contentSecurityPolicy()->copyStateFrom(oldDocument->contentSecurityPolicy());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- frame->setDocument(result);
</del><ins>+ frame->setDocument(result.copyRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create(sourceMIMEType);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-12-17 Andreas Kling <akling@apple.com>
+
+ Purge PassRefPtr from Frame.
+ <https://webkit.org/b/139731>
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebView/WebFrame.mm:
+ (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
+ (+[WebFrame _createSubframeWithOwnerElement:frameName:frameView:]):
+ * WebView/WebFrameInternal.h:
+
</ins><span class="cx"> 2014-12-16 Timothy Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Implement and adopt two new TextIndicator presentation animations
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -1429,9 +1429,9 @@
</span><span class="cx"> bool isMainFrame = coreFrame->isMainFrame();
</span><span class="cx"> if (isMainFrame && coreFrame->view())
</span><span class="cx"> coreFrame->view()->setParentVisible(false);
</span><del>- coreFrame->setView(0);
</del><ins>+ coreFrame->setView(nullptr);
</ins><span class="cx"> RefPtr<FrameView> coreView = FrameView::create(*coreFrame);
</span><del>- coreFrame->setView(coreView);
</del><ins>+ coreFrame->setView(coreView.copyRef());
</ins><span class="cx">
</span><span class="cx"> [m_webFrame.get() _updateBackgroundAndUpdatesWhileOffscreen];
</span><span class="cx"> [m_webFrame->_private->webFrameView _install];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -316,26 +316,26 @@
</span><span class="cx"> return kit(coreFrame->page());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-+ (PassRefPtr<Frame>)_createFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement
</del><ins>++ (Ref<WebCore::Frame>)_createFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement
</ins><span class="cx"> {
</span><span class="cx"> WebView *webView = kit(page);
</span><span class="cx">
</span><span class="cx"> WebFrame *frame = [[self alloc] _initWithWebFrameView:frameView webView:webView];
</span><del>- RefPtr<Frame> coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
</del><ins>+ Ref<WebCore::Frame> coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
</ins><span class="cx"> [frame release];
</span><del>- frame->_private->coreFrame = coreFrame.get();
</del><ins>+ frame->_private->coreFrame = coreFrame.ptr();
</ins><span class="cx">
</span><del>- coreFrame->tree().setName(name);
</del><ins>+ coreFrame.get().tree().setName(name);
</ins><span class="cx"> if (ownerElement) {
</span><span class="cx"> ASSERT(ownerElement->document().frame());
</span><del>- ownerElement->document().frame()->tree().appendChild(coreFrame.get());
</del><ins>+ ownerElement->document().frame()->tree().appendChild(coreFrame.ptr());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- coreFrame->init();
</del><ins>+ coreFrame.get().init();
</ins><span class="cx">
</span><span class="cx"> [webView _setZoomMultiplier:[webView _realZoomMultiplier] isTextOnly:[webView _realZoomMultiplierIsTextOnly]];
</span><span class="cx">
</span><del>- return coreFrame.release();
</del><ins>+ return coreFrame;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (void)_createMainFrameWithPage:(Page*)page frameName:(const String&)name frameView:(WebFrameView *)frameView
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx"> [webView _setZoomMultiplier:[webView _realZoomMultiplier] isTextOnly:[webView _realZoomMultiplierIsTextOnly]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-+ (PassRefPtr<WebCore::Frame>)_createSubframeWithOwnerElement:(HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView
</del><ins>++ (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:(HTMLFrameOwnerElement*)ownerElement frameName:(const String&)name frameView:(WebFrameView *)frameView
</ins><span class="cx"> {
</span><span class="cx"> return [self _createFrameWithPage:ownerElement->document().frame()->page() frameName:name frameView:frameView ownerElement:ownerElement];
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameInternal.h (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameInternal.h        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit/mac/WebView/WebFrameInternal.h        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> @interface WebFrame (WebInternal)
</span><span class="cx">
</span><span class="cx"> + (void)_createMainFrameWithPage:(WebCore::Page*)page frameName:(const WTF::String&)name frameView:(WebFrameView *)frameView;
</span><del>-+ (PassRefPtr<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WTF::String&)name frameView:(WebFrameView *)frameView;
</del><ins>++ (Ref<WebCore::Frame>)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WTF::String&)name frameView:(WebFrameView *)frameView;
</ins><span class="cx"> - (id)_initWithWebFrameView:(WebFrameView *)webFrameView webView:(WebView *)webView;
</span><span class="cx">
</span><span class="cx"> - (void)_clearCoreFrame;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit2/ChangeLog        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-12-17 Andreas Kling <akling@apple.com>
+
+ Purge PassRefPtr from Frame.
+ <https://webkit.org/b/139731>
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/WebPage/WebFrame.cpp:
+ (WebKit::WebFrame::createSubframe):
+
</ins><span class="cx"> 2014-12-17 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> iOS build fix
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (177449 => 177450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-12-17 18:56:59 UTC (rev 177449)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp        2014-12-17 19:39:16 UTC (rev 177450)
</span><span class="lines">@@ -123,12 +123,12 @@
</span><span class="cx"> RefPtr<WebFrame> frame = create(std::make_unique<WebFrameLoaderClient>());
</span><span class="cx"> page->send(Messages::WebPageProxy::DidCreateSubframe(frame->frameID()), page->pageID(), IPC::DispatchMessageEvenWhenWaitingForSyncReply);
</span><span class="cx">
</span><del>- RefPtr<Frame> coreFrame = Frame::create(page->corePage(), ownerElement, frame->m_frameLoaderClient.get());
- frame->m_coreFrame = coreFrame.get();
</del><ins>+ Ref<WebCore::Frame> coreFrame = Frame::create(page->corePage(), ownerElement, frame->m_frameLoaderClient.get());
+ frame->m_coreFrame = coreFrame.ptr();
</ins><span class="cx"> frame->m_coreFrame->tree().setName(frameName);
</span><span class="cx"> if (ownerElement) {
</span><span class="cx"> ASSERT(ownerElement->document().frame());
</span><del>- ownerElement->document().frame()->tree().appendChild(coreFrame.release());
</del><ins>+ ownerElement->document().frame()->tree().appendChild(WTF::move(coreFrame));
</ins><span class="cx"> }
</span><span class="cx"> frame->m_coreFrame->init();
</span><span class="cx"> return frame.release();
</span></span></pre>
</div>
</div>
</body>
</html>