<!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.
&lt;https://webkit.org/b/139731&gt;

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  &lt;akling@apple.com&gt;
+
+        Purge PassRefPtr from Frame.
+        &lt;https://webkit.org/b/139731&gt;
+
+        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  &lt;mmaxfield@apple.com&gt;
</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-&gt;script().updatePlatformScriptObjects();
</span><span class="cx"> 
</span><span class="cx">     m_frame-&gt;loader().setOutgoingReferrer(url);
</span><del>-    m_frame-&gt;setDocument(document);
</del><ins>+    m_frame-&gt;setDocument(document.copyRef());
</ins><span class="cx"> 
</span><span class="cx">     if (m_decoder)
</span><span class="cx">         document-&gt;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&lt;Frame&gt; Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)
</del><ins>+Ref&lt;Frame&gt; 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&lt;FrameView&gt; view)
</del><ins>+void Frame::setView(RefPtr&lt;FrameView&gt;&amp;&amp; view)
</ins><span class="cx"> {
</span><span class="cx">     // We the custom scroll bars as early as possible to prevent m_doc-&gt;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&lt;Document&gt; newDocument)
</del><ins>+void Frame::setDocument(RefPtr&lt;Document&gt;&amp;&amp; newDocument)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!newDocument || newDocument-&gt;frame() == this);
</span><span class="cx"> 
</span><span class="cx">     if (m_doc &amp;&amp; !m_doc-&gt;inPageCache())
</span><span class="cx">         m_doc-&gt;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-&gt;domWindow());
</span><span class="cx">     ASSERT(!m_doc || m_doc-&gt;domWindow()-&gt;frame() == this);
</span><span class="cx"> 
</span><span class="lines">@@ -854,28 +854,28 @@
</span><span class="cx">     return result.innerNode() ? &amp;result.innerNode()-&gt;document() : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Range&gt; Frame::rangeForPoint(const IntPoint&amp; framePoint)
</del><ins>+RefPtr&lt;Range&gt; Frame::rangeForPoint(const IntPoint&amp; 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&lt;Range&gt; 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&lt;Range&gt; 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&amp; viewportSize, const Color&amp; backgroundColor, bool transparent,
</span><span class="lines">@@ -908,7 +908,7 @@
</span><span class="cx"> 
</span><span class="cx">     frameView-&gt;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-&gt;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&lt;Frame&gt; {
</span><span class="cx">     public:
</span><del>-        WEBCORE_EXPORT static PassRefPtr&lt;Frame&gt; create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
</del><ins>+        WEBCORE_EXPORT static Ref&lt;Frame&gt; 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 &lt;html&gt;&lt;body style=&quot;...&quot;&gt;&lt;/body&gt;&lt;/html&gt; doing minimal amount of work.
</span><span class="cx">         WEBCORE_EXPORT void initWithSimpleHTMLDocument(const String&amp; style, const URL&amp;);
</span><span class="cx"> #endif
</span><del>-        WEBCORE_EXPORT void setView(PassRefPtr&lt;FrameView&gt;);
</del><ins>+        WEBCORE_EXPORT void setView(RefPtr&lt;FrameView&gt;&amp;&amp;);
</ins><span class="cx">         WEBCORE_EXPORT void createView(const IntSize&amp;, const Color&amp;, bool,
</span><span class="cx">             const IntSize&amp; fixedLayoutSize = IntSize(), const IntRect&amp; 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&amp; originalSize, const FloatSize&amp; expectedSize);
</span><span class="cx"> 
</span><del>-        void setDocument(PassRefPtr&lt;Document&gt;);
</del><ins>+        void setDocument(RefPtr&lt;Document&gt;&amp;&amp;);
</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&amp; framePoint);
</span><span class="cx">         Document* documentAtPoint(const IntPoint&amp; windowPoint);
</span><del>-        WEBCORE_EXPORT PassRefPtr&lt;Range&gt; rangeForPoint(const IntPoint&amp; framePoint);
</del><ins>+        WEBCORE_EXPORT RefPtr&lt;Range&gt; rangeForPoint(const IntPoint&amp; framePoint);
</ins><span class="cx"> 
</span><span class="cx">         WEBCORE_EXPORT String searchForLabelsAboveCell(const JSC::Yarr::RegularExpression&amp;, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
</span><span class="cx">         String searchForLabelsBeforeElement(const Vector&lt;String&gt;&amp; 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-&gt;contentSecurityPolicy()-&gt;copyStateFrom(oldDocument-&gt;contentSecurityPolicy());
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        frame-&gt;setDocument(result);
</del><ins>+        frame-&gt;setDocument(result.copyRef());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;TextResourceDecoder&gt; 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  &lt;akling@apple.com&gt;
+
+        Purge PassRefPtr from Frame.
+        &lt;https://webkit.org/b/139731&gt;
+
+        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  &lt;timothy_horton@apple.com&gt;
</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-&gt;isMainFrame();
</span><span class="cx">     if (isMainFrame &amp;&amp; coreFrame-&gt;view())
</span><span class="cx">         coreFrame-&gt;view()-&gt;setParentVisible(false);
</span><del>-    coreFrame-&gt;setView(0);
</del><ins>+    coreFrame-&gt;setView(nullptr);
</ins><span class="cx">     RefPtr&lt;FrameView&gt; coreView = FrameView::create(*coreFrame);
</span><del>-    coreFrame-&gt;setView(coreView);
</del><ins>+    coreFrame-&gt;setView(coreView.copyRef());
</ins><span class="cx"> 
</span><span class="cx">     [m_webFrame.get() _updateBackgroundAndUpdatesWhileOffscreen];
</span><span class="cx">     [m_webFrame-&gt;_private-&gt;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-&gt;page());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-+ (PassRefPtr&lt;Frame&gt;)_createFrameWithPage:(Page*)page frameName:(const String&amp;)name frameView:(WebFrameView *)frameView ownerElement:(HTMLFrameOwnerElement*)ownerElement
</del><ins>++ (Ref&lt;WebCore::Frame&gt;)_createFrameWithPage:(Page*)page frameName:(const String&amp;)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&lt;Frame&gt; coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
</del><ins>+    Ref&lt;WebCore::Frame&gt; coreFrame = Frame::create(page, ownerElement, new WebFrameLoaderClient(frame));
</ins><span class="cx">     [frame release];
</span><del>-    frame-&gt;_private-&gt;coreFrame = coreFrame.get();
</del><ins>+    frame-&gt;_private-&gt;coreFrame = coreFrame.ptr();
</ins><span class="cx"> 
</span><del>-    coreFrame-&gt;tree().setName(name);
</del><ins>+    coreFrame.get().tree().setName(name);
</ins><span class="cx">     if (ownerElement) {
</span><span class="cx">         ASSERT(ownerElement-&gt;document().frame());
</span><del>-        ownerElement-&gt;document().frame()-&gt;tree().appendChild(coreFrame.get());
</del><ins>+        ownerElement-&gt;document().frame()-&gt;tree().appendChild(coreFrame.ptr());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    coreFrame-&gt;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&amp;)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&lt;WebCore::Frame&gt;)_createSubframeWithOwnerElement:(HTMLFrameOwnerElement*)ownerElement frameName:(const String&amp;)name frameView:(WebFrameView *)frameView
</del><ins>++ (Ref&lt;WebCore::Frame&gt;)_createSubframeWithOwnerElement:(HTMLFrameOwnerElement*)ownerElement frameName:(const String&amp;)name frameView:(WebFrameView *)frameView
</ins><span class="cx"> {
</span><span class="cx">     return [self _createFrameWithPage:ownerElement-&gt;document().frame()-&gt;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&amp;)name frameView:(WebFrameView *)frameView;
</span><del>-+ (PassRefPtr&lt;WebCore::Frame&gt;)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WTF::String&amp;)name frameView:(WebFrameView *)frameView;
</del><ins>++ (Ref&lt;WebCore::Frame&gt;)_createSubframeWithOwnerElement:(WebCore::HTMLFrameOwnerElement*)ownerElement frameName:(const WTF::String&amp;)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  &lt;akling@apple.com&gt;
+
+        Purge PassRefPtr from Frame.
+        &lt;https://webkit.org/b/139731&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::createSubframe):
+
</ins><span class="cx"> 2014-12-17  Dan Bernstein  &lt;mitz@apple.com&gt;
</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&lt;WebFrame&gt; frame = create(std::make_unique&lt;WebFrameLoaderClient&gt;());
</span><span class="cx">     page-&gt;send(Messages::WebPageProxy::DidCreateSubframe(frame-&gt;frameID()), page-&gt;pageID(), IPC::DispatchMessageEvenWhenWaitingForSyncReply);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Frame&gt; coreFrame = Frame::create(page-&gt;corePage(), ownerElement, frame-&gt;m_frameLoaderClient.get());
-    frame-&gt;m_coreFrame = coreFrame.get();
</del><ins>+    Ref&lt;WebCore::Frame&gt; coreFrame = Frame::create(page-&gt;corePage(), ownerElement, frame-&gt;m_frameLoaderClient.get());
+    frame-&gt;m_coreFrame = coreFrame.ptr();
</ins><span class="cx">     frame-&gt;m_coreFrame-&gt;tree().setName(frameName);
</span><span class="cx">     if (ownerElement) {
</span><span class="cx">         ASSERT(ownerElement-&gt;document().frame());
</span><del>-        ownerElement-&gt;document().frame()-&gt;tree().appendChild(coreFrame.release());
</del><ins>+        ownerElement-&gt;document().frame()-&gt;tree().appendChild(WTF::move(coreFrame));
</ins><span class="cx">     }
</span><span class="cx">     frame-&gt;m_coreFrame-&gt;init();
</span><span class="cx">     return frame.release();
</span></span></pre>
</div>
</div>

</body>
</html>