<!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>[183169] 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/183169">183169</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2015-04-22 22:20:23 -0700 (Wed, 22 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
https://bugs.webkit.org/show_bug.cgi?id=143949

Reviewed by Andreas Kling.

Source/WebCore:

* dom/ContainerNode.h: Removed unneeded includes and forward declarations.
* dom/Document.h: Ditto.

* dom/DocumentParser.h: Fixed comment to not mention PassOwnPtr.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::create): Return a Ref instead of a PassRefPtr.
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Pass a reference
rather than a pointer to TextTrackRepresentation::create.
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Return a
RefPtr instead of a PassRefPtr.

* html/shadow/MediaControlElements.h: Use unique_ptr for m_textTrackRepresentation.
Also fix a couple uses of PassRefPtr.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader): Use make_unique.
(WebCore::DocumentLoader::addAllArchiveResources): Ditto.
(WebCore::DocumentLoader::addArchiveResource): Ditto.
(WebCore::DocumentLoader::clearArchiveResources): Set to nullptr instead of calling clear.
(WebCore::DocumentLoader::startLoadingMainResource): Use make_unique.
* loader/DocumentLoader.h: Made m_archiveResourceCollection and
m_applicationCacheHost use unique_ptr.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Use delete here instead
of using OwnPtr to do the deletion. Matches the other code nearby.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Handle case where the host is
null; this happens during the DocumentLoader destruction process since unique_ptr sets itself
to null before it destroys the object it points to and OwnPtr does not.

* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Use delete instead of adoptPtr
to delete a raw pointer.
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Use unique_ptr instead of OwnPtr.

* page/DragController.h: Removed some unneeded forward declarations and changed the
create function to return unique_ptr.

* platform/LayoutUnit.h: Removed wtf_ceil workaround hack here. Not sure why we ever did it
this way!

* platform/graphics/FontCascade.cpp:
(WTF::deleteOwnedPtr&lt;WebCore::TextLayout&gt;): Deleted.
(WebCore::FontCascade::createLayout): Changed to return a unique_ptr.
(WebCore::FontCascade::deleteLayout): Deleted.
* platform/graphics/FontCascade.h: Made the above changes.

* platform/graphics/ImageBuffer.h: Changed copyImage to return a RefPtr instead of a PassRefPtr.

* platform/graphics/TextTrackRepresentation.cpp:
(WebCore::TextTrackRepresentation::create): Use make_unique and return a unique_ptr.
* platform/graphics/TextTrackRepresentation.h: Removed unneeded includes and forward declarations
and made create return a unique_ptr.
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.

* platform/graphics/ios/TextTrackRepresentationIOS.h: Use reference instead of pointer,
made more things private.
* platform/graphics/ios/TextTrackRepresentationIOS.mm:
(TextTrackRepresentation::create): Use make_unique.
(TextTrackRepresentationIOS::TextTrackRepresentationIOS): Take a reference.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::FontCascade::createLayout): Return a unique_ptr with a custom destruction function.
The custom destruction function eliminates the need to put TextLayout in a visible header.
(WebCore::FontCascade::deleteLayout): Deleted. Use a lambda instead.
(WebCore::roundCGFloat): Deleted. Old fashioned way to deal with multiple floating point sizes.
Just use std::round instead.
(WebCore::ceilCGFloat): Deleted. Same as above. Just use std::ceil instead.
(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Use std::round and std::ceil.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderTextInfo::RenderTextInfo): Deleted. Can compile constructor and destructor
now thanks to use of unique_ptr with a custom deleter.
(WebCore::RenderTextInfo::~RenderTextInfo): Deleted. Ditto.
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Updated for RenderTextInfo data member
name change.

* rendering/RenderView.h: Removed unneeded include.

* rendering/line/BreakingContext.h: Removed unneeded include.
(WebCore::BreakingContext::handleOutOfFlowPositioned): Updated for RenderTextInfo data member
name change.
(WebCore::BreakingContext::handleFloat): Ditto.
(WebCore::BreakingContext::handleReplaced): Ditto.
(WebCore::BreakingContext::handleText): Ditto.
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Ditto.

* rendering/line/LineBreaker.h: Made the RenderTextInfo struct more like a struct by taking
off all the m_ prefixes from the data member names. Initialized all the values in the struct
to defaults so we don't need an explicit constructor. We also don't need an explicit destructor
any more due to use of a unique_ptr with a deleter.

Source/WTF:

* wtf/MathExtras.h:
(wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
fixed in Snow Leopard &lt;rdar://problem/6286405&gt;, so we don't need the workaround any more.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfMathExtrash">trunk/Source/WTF/wtf/MathExtras.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeh">trunk/Source/WebCore/dom/ContainerNode.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentParserh">trunk/Source/WebCore/dom/DocumentParser.h</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlElementscpp">trunk/Source/WebCore/html/shadow/MediaControlElements.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlElementsh">trunk/Source/WebCore/html/shadow/MediaControlElements.h</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderWorkerThreadableLoadercpp">trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercocoaDiskCacheMonitorCocoamm">trunk/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm</a></li>
<li><a href="#trunkSourceWebCorepageDragControllerh">trunk/Source/WebCore/page/DragController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformLayoutUnith">trunk/Source/WebCore/platform/LayoutUnit.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadecpp">trunk/Source/WebCore/platform/graphics/FontCascade.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFontCascadeh">trunk/Source/WebCore/platform/graphics/FontCascade.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBufferh">trunk/Source/WebCore/platform/graphics/ImageBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTextTrackRepresentationcpp">trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTextTrackRepresentationh">trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp">trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosTextTrackRepresentationIOSh">trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsiosTextTrackRepresentationIOSmm">trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp">trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineBreakingContexth">trunk/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineBreakerh">trunk/Source/WebCore/rendering/line/LineBreaker.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WTF/ChangeLog        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-04-22  Darin Adler  &lt;darin@apple.com&gt;
+
+        Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
+        https://bugs.webkit.org/show_bug.cgi?id=143949
+
+        Reviewed by Andreas Kling.
+
+        * wtf/MathExtras.h:
+        (wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
+        fixed in Snow Leopard &lt;rdar://problem/6286405&gt;, so we don't need the workaround any more.
+
</ins><span class="cx"> 2015-04-22  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
</span></span></pre></div>
<a id="trunkSourceWTFwtfMathExtrash"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MathExtras.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MathExtras.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WTF/wtf/MathExtras.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -75,15 +75,6 @@
</span><span class="cx"> const float sqrtOfTwoFloat = static_cast&lt;float&gt;(M_SQRT2);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if OS(DARWIN)
-
-// Work around a bug in the Mac OS X libc where ceil(-0.1) return +0.
-inline double wtf_ceil(double x) { return copysign(ceil(x), x); }
-
-#define ceil(x) wtf_ceil(x)
-
-#endif
-
</del><span class="cx"> #if OS(SOLARIS)
</span><span class="cx"> 
</span><span class="cx"> namespace std {
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/ChangeLog        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -1,3 +1,108 @@
</span><ins>+2015-04-22  Darin Adler  &lt;darin@apple.com&gt;
+
+        Eliminate remaining uses of OwnPtr and PassOwnPtr in WebCore outside the editing and platform directories
+        https://bugs.webkit.org/show_bug.cgi?id=143949
+
+        Reviewed by Andreas Kling.
+
+        * dom/ContainerNode.h: Removed unneeded includes and forward declarations.
+        * dom/Document.h: Ditto.
+
+        * dom/DocumentParser.h: Fixed comment to not mention PassOwnPtr.
+
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlTextTrackContainerElement::create): Return a Ref instead of a PassRefPtr.
+        (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): Pass a reference
+        rather than a pointer to TextTrackRepresentation::create.
+        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Return a
+        RefPtr instead of a PassRefPtr.
+
+        * html/shadow/MediaControlElements.h: Use unique_ptr for m_textTrackRepresentation.
+        Also fix a couple uses of PassRefPtr.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::DocumentLoader): Use make_unique.
+        (WebCore::DocumentLoader::addAllArchiveResources): Ditto.
+        (WebCore::DocumentLoader::addArchiveResource): Ditto.
+        (WebCore::DocumentLoader::clearArchiveResources): Set to nullptr instead of calling clear.
+        (WebCore::DocumentLoader::startLoadingMainResource): Use make_unique.
+        * loader/DocumentLoader.h: Made m_archiveResourceCollection and
+        m_applicationCacheHost use unique_ptr.
+
+        * loader/WorkerThreadableLoader.cpp:
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Use delete here instead
+        of using OwnPtr to do the deletion. Matches the other code nearby.
+
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Handle case where the host is
+        null; this happens during the DocumentLoader destruction process since unique_ptr sets itself
+        to null before it destroys the object it points to and OwnPtr does not.
+
+        * loader/cocoa/DiskCacheMonitorCocoa.mm:
+        (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Use delete instead of adoptPtr
+        to delete a raw pointer.
+        (WebCore::DiskCacheMonitor::DiskCacheMonitor): Use unique_ptr instead of OwnPtr.
+
+        * page/DragController.h: Removed some unneeded forward declarations and changed the
+        create function to return unique_ptr.
+
+        * platform/LayoutUnit.h: Removed wtf_ceil workaround hack here. Not sure why we ever did it
+        this way!
+
+        * platform/graphics/FontCascade.cpp:
+        (WTF::deleteOwnedPtr&lt;WebCore::TextLayout&gt;): Deleted.
+        (WebCore::FontCascade::createLayout): Changed to return a unique_ptr.
+        (WebCore::FontCascade::deleteLayout): Deleted.
+        * platform/graphics/FontCascade.h: Made the above changes.
+
+        * platform/graphics/ImageBuffer.h: Changed copyImage to return a RefPtr instead of a PassRefPtr.
+
+        * platform/graphics/TextTrackRepresentation.cpp:
+        (WebCore::TextTrackRepresentation::create): Use make_unique and return a unique_ptr.
+        * platform/graphics/TextTrackRepresentation.h: Removed unneeded includes and forward declarations
+        and made create return a unique_ptr.
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::copyImage): Changed to return a RefPtr.
+
+        * platform/graphics/ios/TextTrackRepresentationIOS.h: Use reference instead of pointer,
+        made more things private.
+        * platform/graphics/ios/TextTrackRepresentationIOS.mm:
+        (TextTrackRepresentation::create): Use make_unique.
+        (TextTrackRepresentationIOS::TextTrackRepresentationIOS): Take a reference.
+
+        * platform/graphics/mac/ComplexTextController.cpp:
+        (WebCore::FontCascade::createLayout): Return a unique_ptr with a custom destruction function.
+        The custom destruction function eliminates the need to put TextLayout in a visible header.
+        (WebCore::FontCascade::deleteLayout): Deleted. Use a lambda instead.
+        (WebCore::roundCGFloat): Deleted. Old fashioned way to deal with multiple floating point sizes.
+        Just use std::round instead.
+        (WebCore::ceilCGFloat): Deleted. Same as above. Just use std::ceil instead.
+        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Use std::round and std::ceil.
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderTextInfo::RenderTextInfo): Deleted. Can compile constructor and destructor
+        now thanks to use of unique_ptr with a custom deleter.
+        (WebCore::RenderTextInfo::~RenderTextInfo): Deleted. Ditto.
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Updated for RenderTextInfo data member
+        name change.
+
+        * rendering/RenderView.h: Removed unneeded include.
+
+        * rendering/line/BreakingContext.h: Removed unneeded include.
+        (WebCore::BreakingContext::handleOutOfFlowPositioned): Updated for RenderTextInfo data member
+        name change.
+        (WebCore::BreakingContext::handleFloat): Ditto.
+        (WebCore::BreakingContext::handleReplaced): Ditto.
+        (WebCore::BreakingContext::handleText): Ditto.
+        (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Ditto.
+
+        * rendering/line/LineBreaker.h: Made the RenderTextInfo struct more like a struct by taking
+        off all the m_ prefixes from the data member names. Initialized all the values in the struct
+        to defaults so we don't need an explicit constructor. We also don't need an explicit destructor
+        any more due to use of a unique_ptr with a deleter.
+
</ins><span class="cx"> 2015-04-22  Roger Fong  &lt;roger_fong@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Volume slider appears/doesn't appear at the wrong times.
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/dom/ContainerNode.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -27,12 +27,8 @@
</span><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><span class="cx"> #include &quot;Node.h&quot;
</span><span class="cx"> 
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class FloatPoint;
</del><span class="cx"> class QualifiedName;
</span><span class="cx"> class RenderElement;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/dom/Document.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -55,7 +55,6 @@
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/WeakPtr.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentParser.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentParser.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/dom/DocumentParser.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     virtual void flush(DocumentWriter&amp;) = 0;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: append() should be private, but DocumentWriter::replaceDocument uses it for now.
</span><del>-    // FIXME: This really should take a PassOwnPtr to signify that it expects to take
</del><ins>+    // FIXME: This really should take a std::unique_ptr to signify that it expects to take
</ins><span class="cx">     // ownership of the buffer. The parser expects the PassRefPtr to hold the only ref of the StringImpl.
</span><span class="cx">     virtual void append(PassRefPtr&lt;StringImpl&gt;) = 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -1081,11 +1081,11 @@
</span><span class="cx">     setPseudo(AtomicString(&quot;-webkit-media-text-track-container&quot;, AtomicString::ConstructFromLiteral));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;MediaControlTextTrackContainerElement&gt; MediaControlTextTrackContainerElement::create(Document&amp; document)
</del><ins>+Ref&lt;MediaControlTextTrackContainerElement&gt; MediaControlTextTrackContainerElement::create(Document&amp; document)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;MediaControlTextTrackContainerElement&gt; element = adoptRef(new MediaControlTextTrackContainerElement(document));
</del><ins>+    auto element = adoptRef(*new MediaControlTextTrackContainerElement(document));
</ins><span class="cx">     element-&gt;hide();
</span><del>-    return element.release();
</del><ins>+    return element;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderPtr&lt;RenderElement&gt; MediaControlTextTrackContainerElement::createElementRenderer(Ref&lt;RenderStyle&gt;&amp;&amp; style, const RenderTreePosition&amp;)
</span><span class="lines">@@ -1265,7 +1265,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!m_textTrackRepresentation) {
</span><del>-        m_textTrackRepresentation = TextTrackRepresentation::create(this);
</del><ins>+        m_textTrackRepresentation = TextTrackRepresentation::create(*this);
</ins><span class="cx">         m_updateTextTrackRepresentationStyle = true;
</span><span class="cx">         mediaElement-&gt;setTextTrackRepresentation(m_textTrackRepresentation.get());
</span><span class="cx">     }
</span><span class="lines">@@ -1352,7 +1352,7 @@
</span><span class="cx">     m_updateTimer.startOneShot(0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Image&gt; MediaControlTextTrackContainerElement::createTextTrackRepresentationImage()
</del><ins>+RefPtr&lt;Image&gt; MediaControlTextTrackContainerElement::createTextTrackRepresentationImage()
</ins><span class="cx"> {
</span><span class="cx">     if (!hasChildNodes())
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlElementsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlElements.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -443,7 +443,7 @@
</span><span class="cx"> 
</span><span class="cx"> class MediaControlTextTrackContainerElement final : public MediaControlDivElement, public TextTrackRepresentationClient {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;MediaControlTextTrackContainerElement&gt; create(Document&amp;);
</del><ins>+    static Ref&lt;MediaControlTextTrackContainerElement&gt; create(Document&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void updateDisplay();
</span><span class="cx">     void updateSizes(bool forceUpdate = false);
</span><span class="lines">@@ -458,12 +458,12 @@
</span><span class="cx"> 
</span><span class="cx">     virtual RenderPtr&lt;RenderElement&gt; createElementRenderer(Ref&lt;RenderStyle&gt;&amp;&amp;, const RenderTreePosition&amp;) override;
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;Image&gt; createTextTrackRepresentationImage() override;
</del><ins>+    virtual RefPtr&lt;Image&gt; createTextTrackRepresentationImage() override;
</ins><span class="cx">     virtual void textTrackRepresentationBoundsChanged(const IntRect&amp;) override;
</span><span class="cx">     void updateTextTrackRepresentation();
</span><span class="cx">     void clearTextTrackRepresentation();
</span><span class="cx">     void updateStyleForTextTrackRepresentation();
</span><del>-    OwnPtr&lt;TextTrackRepresentation&gt; m_textTrackRepresentation;
</del><ins>+    std::unique_ptr&lt;TextTrackRepresentation&gt; m_textTrackRepresentation;
</ins><span class="cx"> 
</span><span class="cx">     Timer m_updateTimer;
</span><span class="cx">     IntRect m_videoDisplaySize;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">     , m_dataLoadTimer(*this, &amp;DocumentLoader::handleSubstituteDataLoadNow)
</span><span class="cx">     , m_waitingForContentPolicy(false)
</span><span class="cx">     , m_subresourceLoadersArePageCacheAcceptable(false)
</span><del>-    , m_applicationCacheHost(adoptPtr(new ApplicationCacheHost(*this)))
</del><ins>+    , m_applicationCacheHost(std::make_unique&lt;ApplicationCacheHost&gt;(*this))
</ins><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">     , m_contentFilter(!substituteData.isValid() ? ContentFilter::createIfNeeded(std::bind(&amp;DocumentLoader::contentFilterDidDecide, this)) : nullptr)
</span><span class="cx"> #endif
</span><span class="lines">@@ -997,7 +997,7 @@
</span><span class="cx"> void DocumentLoader::addAllArchiveResources(Archive* archive)
</span><span class="cx"> {
</span><span class="cx">     if (!m_archiveResourceCollection)
</span><del>-        m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection);
</del><ins>+        m_archiveResourceCollection = std::make_unique&lt;ArchiveResourceCollection&gt;();
</ins><span class="cx">         
</span><span class="cx">     ASSERT(archive);
</span><span class="cx">     if (!archive)
</span><span class="lines">@@ -1011,7 +1011,7 @@
</span><span class="cx"> void DocumentLoader::addArchiveResource(PassRefPtr&lt;ArchiveResource&gt; resource)
</span><span class="cx"> {
</span><span class="cx">     if (!m_archiveResourceCollection)
</span><del>-        m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection);
</del><ins>+        m_archiveResourceCollection = std::make_unique&lt;ArchiveResourceCollection&gt;();
</ins><span class="cx">         
</span><span class="cx">     ASSERT(resource);
</span><span class="cx">     if (!resource)
</span><span class="lines">@@ -1027,7 +1027,7 @@
</span><span class="cx"> 
</span><span class="cx"> void DocumentLoader::clearArchiveResources()
</span><span class="cx"> {
</span><del>-    m_archiveResourceCollection.clear();
</del><ins>+    m_archiveResourceCollection = nullptr;
</ins><span class="cx">     m_substituteResourceDeliveryTimer.stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1418,7 +1418,7 @@
</span><span class="cx">         // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost
</span><span class="cx">         // is now in a state where starting an empty load will be inconsistent. Replace it with
</span><span class="cx">         // a new ApplicationCacheHost.
</span><del>-        m_applicationCacheHost = adoptPtr(new ApplicationCacheHost(*this));
</del><ins>+        m_applicationCacheHost = std::make_unique&lt;ApplicationCacheHost&gt;(*this);
</ins><span class="cx">         maybeLoadEmpty();
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx">         SubstituteResourceMap m_pendingSubstituteResources;
</span><span class="cx">         Timer m_substituteResourceDeliveryTimer;
</span><span class="cx"> 
</span><del>-        OwnPtr&lt;ArchiveResourceCollection&gt; m_archiveResourceCollection;
</del><ins>+        std::unique_ptr&lt;ArchiveResourceCollection&gt; m_archiveResourceCollection;
</ins><span class="cx"> #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
</span><span class="cx">         RefPtr&lt;Archive&gt; m_archive;
</span><span class="cx">         RefPtr&lt;SharedBuffer&gt; m_parsedArchiveData;
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx">         bool m_subresourceLoadersArePageCacheAcceptable;
</span><span class="cx"> 
</span><span class="cx">         friend class ApplicationCacheHost;  // for substitute resource delivery
</span><del>-        OwnPtr&lt;ApplicationCacheHost&gt; m_applicationCacheHost;
</del><ins>+        std::unique_ptr&lt;ApplicationCacheHost&gt; m_applicationCacheHost;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">         std::unique_ptr&lt;ContentFilter&gt; m_contentFilter;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderWorkerThreadableLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -179,8 +179,8 @@
</span><span class="cx">     memcpy(vectorPtr-&gt;data(), data, dataLength);
</span><span class="cx">     if (!m_loaderProxy.postTaskForModeToWorkerGlobalScope([workerClientWrapper, vectorPtr] (ScriptExecutionContext&amp; context) {
</span><span class="cx">         ASSERT_UNUSED(context, context.isWorkerGlobalScope());
</span><del>-        OwnPtr&lt;Vector&lt;char&gt;&gt; vector = adoptPtr(vectorPtr);
-        workerClientWrapper-&gt;didReceiveData(vector-&gt;data(), vector-&gt;size());
</del><ins>+        workerClientWrapper-&gt;didReceiveData(vectorPtr-&gt;data(), vectorPtr-&gt;size());
+        delete vectorPtr;
</ins><span class="cx">     }, m_taskMode))
</span><span class="cx">         delete vectorPtr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -351,7 +351,8 @@
</span><span class="cx">     m_associatedDocumentLoaders.remove(loader);
</span><span class="cx">     m_pendingMasterResourceLoaders.remove(loader);
</span><span class="cx"> 
</span><del>-    loader-&gt;applicationCacheHost()-&gt;setApplicationCache(0); // Will set candidate to 0, too.
</del><ins>+    if (auto* host = loader-&gt;applicationCacheHost())
+        host-&gt;setApplicationCache(nullptr); // Will set candidate group to null, too.
</ins><span class="cx"> 
</span><span class="cx">     if (!m_associatedDocumentLoaders.isEmpty() || !m_pendingMasterResourceLoaders.isEmpty())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercocoaDiskCacheMonitorCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #import &quot;SessionID.h&quot;
</span><span class="cx"> #import &quot;SharedBuffer.h&quot;
</span><span class="cx"> #import &lt;wtf/MainThread.h&gt;
</span><del>-#import &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> #import &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #import &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -60,6 +59,7 @@
</span><span class="cx">     if (!cachedResponse)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    // FIXME: It's not good to have the new here, but the delete inside the constructor. Reconsider this design.
</ins><span class="cx">     new DiskCacheMonitor(request, sessionID, cachedResponse); // Balanced by adoptPtr in the blocks setup in the constructor, one of which is guaranteed to run.
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx">     __block DiskCacheMonitor* rawMonitor = this;
</span><span class="cx"> 
</span><span class="cx">     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * diskCacheMonitorTimeout), dispatch_get_main_queue(), ^{
</span><del>-        adoptPtr(rawMonitor); // Balanced by `new DiskCacheMonitor` in monitorFileBackingStoreCreation.
-        rawMonitor = 0;
</del><ins>+        delete rawMonitor; // Balanced by &quot;new DiskCacheMonitor&quot; in monitorFileBackingStoreCreation.
+        rawMonitor = nullptr;
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     // Set up the disk caching callback to create the ShareableResource and send it to the WebProcess.
</span><span class="lines">@@ -85,8 +85,8 @@
</span><span class="cx">         if (!rawMonitor)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        OwnPtr&lt;DiskCacheMonitor&gt; monitor = adoptPtr(rawMonitor); // Balanced by `new DiskCacheMonitor` in monitorFileBackingStoreCreation.
-        rawMonitor = 0;
</del><ins>+        auto monitor = std::unique_ptr&lt;DiskCacheMonitor&gt;(rawMonitor); // Balanced by &quot;new DiskCacheMonitor&quot; in monitorFileBackingStoreCreation.
+        rawMonitor = nullptr;
</ins><span class="cx"> 
</span><span class="cx">         RefPtr&lt;SharedBuffer&gt; fileBackedBuffer = DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse(cachedResponse);
</span><span class="cx">         if (!fileBackedBuffer)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/page/DragController.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> 
</span><span class="cx">     class DataTransfer;
</span><span class="cx">     class Document;
</span><del>-    class DocumentFragment;
</del><span class="cx">     class DragClient;
</span><span class="cx">     class DragData;
</span><span class="cx">     class Element;
</span><span class="lines">@@ -45,7 +44,6 @@
</span><span class="cx">     class IntRect;
</span><span class="cx">     class Page;
</span><span class="cx">     class PlatformMouseEvent;
</span><del>-    class Range;
</del><span class="cx"> 
</span><span class="cx">     struct DragState;
</span><span class="cx"> 
</span><span class="lines">@@ -55,7 +53,7 @@
</span><span class="cx">         DragController(Page&amp;, DragClient&amp;);
</span><span class="cx">         ~DragController();
</span><span class="cx"> 
</span><del>-        static PassOwnPtr&lt;DragController&gt; create(Page*, DragClient*);
</del><ins>+        static std::unique_ptr&lt;DragController&gt; create(Page&amp;, DragClient&amp;);
</ins><span class="cx"> 
</span><span class="cx">         DragClient&amp; client() const { return m_client; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLayoutUnith"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LayoutUnit.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LayoutUnit.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/LayoutUnit.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -178,11 +178,7 @@
</span><span class="cx">         returnValue.setRawValue(::abs(m_value));
</span><span class="cx">         return returnValue;
</span><span class="cx">     }
</span><del>-#if OS(DARWIN)
-    int wtf_ceil() const
-#else
</del><span class="cx">     int ceil() const
</span><del>-#endif
</del><span class="cx">     {
</span><span class="cx"> #if ENABLE(SATURATED_LAYOUT_ARITHMETIC)
</span><span class="cx">         if (UNLIKELY(m_value &gt;= INT_MAX - kFixedPointDenominator + 1))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -39,16 +39,6 @@
</span><span class="cx"> using namespace WTF;
</span><span class="cx"> using namespace Unicode;
</span><span class="cx"> 
</span><del>-namespace WTF {
-
-// allow compilation of OwnPtr&lt;TextLayout&gt; in source files that don't have access to the TextLayout class definition
-template &lt;&gt; void deleteOwnedPtr&lt;WebCore::TextLayout&gt;(WebCore::TextLayout* ptr)
-{
-    WebCore::FontCascade::deleteLayout(ptr);
-}
-
-}
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static Ref&lt;FontCascadeFonts&gt; retrieveOrAddCachedFonts(const FontDescription&amp;, PassRefPtr&lt;FontSelector&gt;);
</span><span class="lines">@@ -441,12 +431,13 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><del>-PassOwnPtr&lt;TextLayout&gt; FontCascade::createLayout(RenderText*, float, bool) const
</del><ins>+
+std::unique_ptr&lt;TextLayout, TextLayoutDeleter&gt; FontCascade::createLayout(RenderText&amp;, float, bool) const
</ins><span class="cx"> {
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FontCascade::deleteLayout(TextLayout*)
</del><ins>+void TextLayoutDeleter::operator()(TextLayout*) const
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -455,10 +446,9 @@
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-
-
</del><span class="cx"> static const char* fontFamiliesWithInvalidCharWidth[] = {
</span><span class="cx">     &quot;American Typewriter&quot;,
</span><span class="cx">     &quot;Arial Hebrew&quot;,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontCascadeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -107,6 +107,11 @@
</span><span class="cx"> };
</span><span class="cx"> GlyphToPathTranslator::GlyphUnderlineType computeUnderlineType(const TextRun&amp;, const GlyphBuffer&amp;, int index);
</span><span class="cx"> 
</span><ins>+class TextLayoutDeleter {
+public:
+    void operator()(TextLayout*) const;
+};
+
</ins><span class="cx"> class FontCascade {
</span><span class="cx"> public:
</span><span class="cx">     WEBCORE_EXPORT FontCascade();
</span><span class="lines">@@ -118,7 +123,6 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     FontCascade(const FontPlatformData&amp;, PassRefPtr&lt;FontSelector&gt;);
</span><span class="cx"> #endif
</span><del>-    ~FontCascade();
</del><span class="cx"> 
</span><span class="cx">     FontCascade(const FontCascade&amp;);
</span><span class="cx">     WEBCORE_EXPORT FontCascade&amp; operator=(const FontCascade&amp;);
</span><span class="lines">@@ -143,8 +147,7 @@
</span><span class="cx">     WEBCORE_EXPORT float width(const TextRun&amp;, HashSet&lt;const Font*&gt;* fallbackFonts = 0, GlyphOverflow* = 0) const;
</span><span class="cx">     float width(const TextRun&amp;, int&amp; charsConsumed, String&amp; glyphName) const;
</span><span class="cx"> 
</span><del>-    PassOwnPtr&lt;TextLayout&gt; createLayout(RenderText*, float xPos, bool collapseWhiteSpace) const;
-    static void deleteLayout(TextLayout*);
</del><ins>+    std::unique_ptr&lt;TextLayout, TextLayoutDeleter&gt; createLayout(RenderText&amp;, float xPos, bool collapseWhiteSpace) const;
</ins><span class="cx">     static float width(TextLayout&amp;, unsigned from, unsigned len, HashSet&lt;const Font*&gt;* fallbackFonts = 0);
</span><span class="cx"> 
</span><span class="cx">     int offsetForPosition(const TextRun&amp;, float position, bool includePartialGlyphs) const;
</span><span class="lines">@@ -360,10 +363,6 @@
</span><span class="cx"> void pruneSystemFallbackFonts();
</span><span class="cx"> void clearWidthCaches();
</span><span class="cx"> 
</span><del>-inline FontCascade::~FontCascade()
-{
-}
-
</del><span class="cx"> inline const Font&amp; FontCascade::primaryFont() const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_fonts);
</span><span class="lines">@@ -398,10 +397,4 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-namespace WTF {
-
-template &lt;&gt; void deleteOwnedPtr&lt;WebCore::TextLayout&gt;(WebCore::TextLayout*);
-
-}
-
</del><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT GraphicsContext* context() const;
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT PassRefPtr&lt;Image&gt; copyImage(BackingStoreCopy = CopyBackingStore, ScaleBehavior = Scaled) const;
</del><ins>+    WEBCORE_EXPORT RefPtr&lt;Image&gt; copyImage(BackingStoreCopy = CopyBackingStore, ScaleBehavior = Scaled) const;
</ins><span class="cx">     // Give hints on the faster copyImage Mode, return DontCopyBackingStore if it supports the DontCopyBackingStore behavior
</span><span class="cx">     // or return CopyBackingStore if it doesn't.  
</span><span class="cx">     static BackingStoreCopy fastCopyImageMode();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextTrackRepresentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -29,22 +29,26 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;TextTrackRepresentation.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;IntRect.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class NullTextTrackRepresentation : public TextTrackRepresentation {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~NullTextTrackRepresentation() { }
</span><span class="cx">     virtual void update() { }
</span><del>-    virtual PlatformLayer* platformLayer() { return 0; }
</del><ins>+    virtual PlatformLayer* platformLayer() { return nullptr; }
</ins><span class="cx">     virtual void setContentScale(float) { }
</span><span class="cx">     virtual IntRect bounds() const { return IntRect(); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-PassOwnPtr&lt;TextTrackRepresentation&gt; TextTrackRepresentation::create(TextTrackRepresentationClient*)
</del><ins>+
+std::unique_ptr&lt;TextTrackRepresentation&gt; TextTrackRepresentation::create(TextTrackRepresentationClient&amp;)
</ins><span class="cx"> {
</span><del>-    return WTF::adoptPtr(new NullTextTrackRepresentation());
</del><ins>+    return std::make_unique&lt;NullTextTrackRepresentation&gt;();
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTextTrackRepresentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -28,14 +28,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx"> 
</span><del>-#include &quot;IntRect.h&quot;
</del><span class="cx"> #include &quot;PlatformLayer.h&quot;
</span><del>-#include &lt;wtf/PassOwnPtr.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
</del><ins>+#include &lt;wtf/Forward.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class GraphicsContext;
</del><span class="cx"> class Image;
</span><span class="cx"> class IntRect;
</span><span class="cx"> 
</span><span class="lines">@@ -43,13 +40,13 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~TextTrackRepresentationClient() { }
</span><span class="cx"> 
</span><del>-    virtual PassRefPtr&lt;Image&gt; createTextTrackRepresentationImage() = 0;
</del><ins>+    virtual RefPtr&lt;Image&gt; createTextTrackRepresentationImage() = 0;
</ins><span class="cx">     virtual void textTrackRepresentationBoundsChanged(const IntRect&amp;) = 0;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class TextTrackRepresentation {
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;TextTrackRepresentation&gt; create(TextTrackRepresentationClient*);
</del><ins>+    static std::unique_ptr&lt;TextTrackRepresentation&gt; create(TextTrackRepresentationClient&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~TextTrackRepresentation() { }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     return m_data.m_context.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Image&gt; ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior) const
</del><ins>+RefPtr&lt;Image&gt; ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior) const
</ins><span class="cx"> {
</span><span class="cx">     if (copyBehavior == CopyBackingStore)
</span><span class="cx">         return BitmapImage::create(copyCairoImageSurface(m_data.m_surface.get()));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">     return image;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;Image&gt; ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior scaleBehavior) const
</del><ins>+RefPtr&lt;Image&gt; ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior scaleBehavior) const
</ins><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;CGImageRef&gt; image;
</span><span class="cx">     if (m_resolutionScale == 1 || scaleBehavior == Unscaled) {
</span><span class="lines">@@ -196,10 +196,10 @@
</span><span class="cx">     if (!image)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;BitmapImage&gt; bitmapImage = BitmapImage::create(image.get());
</del><ins>+    auto bitmapImage = BitmapImage::create(image.get());
</ins><span class="cx">     bitmapImage-&gt;setSpaceSize(spaceSize());
</span><span class="cx"> 
</span><del>-    return bitmapImage.release();
</del><ins>+    return WTF::move(bitmapImage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> BackingStoreCopy ImageBuffer::fastCopyImageMode()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosTextTrackRepresentationIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -36,20 +36,21 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class TextTrackRepresentationIOS : public TextTrackRepresentation {
</del><ins>+class TextTrackRepresentationIOS final : public TextTrackRepresentation {
</ins><span class="cx"> public:
</span><del>-    TextTrackRepresentationIOS(TextTrackRepresentationClient*);
</del><ins>+    explicit TextTrackRepresentationIOS(TextTrackRepresentationClient&amp;);
</ins><span class="cx">     virtual ~TextTrackRepresentationIOS();
</span><span class="cx"> 
</span><del>-    virtual void update() override;
</del><ins>+    TextTrackRepresentationClient&amp; client() const { return m_client; }
+
</ins><span class="cx">     virtual PlatformLayer* platformLayer() override { return m_layer.get(); }
</span><del>-    virtual void setContentScale(float) override;
</del><span class="cx">     virtual IntRect bounds() const override;
</span><span class="cx"> 
</span><del>-    TextTrackRepresentationClient* client() const { return m_client; }
</del><ins>+private:
+    virtual void update() override;
+    virtual void setContentScale(float) override;
</ins><span class="cx"> 
</span><del>-private:
-    TextTrackRepresentationClient* m_client;
</del><ins>+    TextTrackRepresentationClient&amp; m_client;
</ins><span class="cx">     RetainPtr&lt;CALayer&gt; m_layer;
</span><span class="cx">     RetainPtr&lt;WebCoreTextTrackRepresentationIOSHelper&gt; m_delegate;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsiosTextTrackRepresentationIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -31,9 +31,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FloatRect.h&quot;
</span><span class="cx"> #include &quot;GraphicsContextCG.h&quot;
</span><ins>+#include &quot;IntRect.h&quot;
</ins><span class="cx"> #include &quot;WebCoreThread.h&quot;
</span><span class="cx"> #include &quot;WebCoreThreadRun.h&quot;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>-    self.parent = nil;
</del><ins>+    self.parent = nullptr;
</ins><span class="cx">     [super dealloc];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     WebThreadRun(^{
</span><span class="cx">         if (_parent &amp;&amp; [keyPath isEqual:@&quot;bounds&quot;] &amp;&amp; object == _parent-&gt;platformLayer())
</span><del>-            _parent-&gt;client()-&gt;textTrackRepresentationBoundsChanged(_parent-&gt;bounds());
</del><ins>+            _parent-&gt;client().textTrackRepresentationBoundsChanged(_parent-&gt;bounds());
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -97,12 +97,12 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-PassOwnPtr&lt;TextTrackRepresentation&gt; TextTrackRepresentation::create(TextTrackRepresentationClient* client)
</del><ins>+std::unique_ptr&lt;TextTrackRepresentation&gt; TextTrackRepresentation::create(TextTrackRepresentationClient&amp; client)
</ins><span class="cx"> {
</span><del>-    return adoptPtr(new TextTrackRepresentationIOS(client));
</del><ins>+    return std::make_unique&lt;TextTrackRepresentationIOS&gt;(client);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-TextTrackRepresentationIOS::TextTrackRepresentationIOS(TextTrackRepresentationClient* client)
</del><ins>+TextTrackRepresentationIOS::TextTrackRepresentationIOS(TextTrackRepresentationClient&amp; client)
</ins><span class="cx">     : m_client(client)
</span><span class="cx">     , m_layer(adoptNS([[CALayer alloc] init]))
</span><span class="cx">     , m_delegate(adoptNS([[WebCoreTextTrackRepresentationIOSHelper alloc] initWithParent:this]))
</span><span class="lines">@@ -114,12 +114,12 @@
</span><span class="cx"> TextTrackRepresentationIOS::~TextTrackRepresentationIOS()
</span><span class="cx"> {
</span><span class="cx">     [m_layer.get() setDelegate:nil];
</span><del>-    [m_delegate.get() setParent:0];
</del><ins>+    [m_delegate.get() setParent:nullptr];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TextTrackRepresentationIOS::update()
</span><span class="cx"> {
</span><del>-    if (RefPtr&lt;Image&gt; representation = m_client-&gt;createTextTrackRepresentationImage())
</del><ins>+    if (auto representation = m_client.createTextTrackRepresentationImage())
</ins><span class="cx">         [m_layer.get() setContents:(id)representation-&gt;getCGImageRef()];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacComplexTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -32,25 +32,28 @@
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;TextBreakIterator.h&quot;
</span><span class="cx"> #include &quot;TextRun.h&quot;
</span><del>-#if !PLATFORM(IOS)
-#include &lt;ApplicationServices/ApplicationServices.h&gt;
-#else
-#include &lt;CoreText/CoreText.h&gt;
-#endif
</del><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/unicode/CharacterNames.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+#include &lt;CoreText/CoreText.h&gt;
+#endif
+
+#if PLATFORM(MAC)
+#include &lt;ApplicationServices/ApplicationServices.h&gt;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class TextLayout {
</span><span class="cx"> public:
</span><del>-    static bool isNeeded(RenderText* text, const FontCascade&amp; font)
</del><ins>+    static bool isNeeded(RenderText&amp; text, const FontCascade&amp; font)
</ins><span class="cx">     {
</span><del>-        TextRun run = RenderBlock::constructTextRun(text, font, text, text-&gt;style());
</del><ins>+        TextRun run = RenderBlock::constructTextRun(&amp;text, font, &amp;text, text.style());
</ins><span class="cx">         return font.codePath(run) == FontCascade::Complex;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    TextLayout(RenderText* text, const FontCascade&amp; font, float xPos)
</del><ins>+    TextLayout(RenderText&amp; text, const FontCascade&amp; font, float xPos)
</ins><span class="cx">         : m_font(font)
</span><span class="cx">         , m_run(constructTextRun(text, font, xPos))
</span><span class="cx">         , m_controller(std::make_unique&lt;ComplexTextController&gt;(m_font, m_run, true))
</span><span class="lines">@@ -69,12 +72,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    static TextRun constructTextRun(RenderText* text, const FontCascade&amp; font, float xPos)
</del><ins>+    static TextRun constructTextRun(RenderText&amp; text, const FontCascade&amp; font, float xPos)
</ins><span class="cx">     {
</span><del>-        TextRun run = RenderBlock::constructTextRun(text, font, text, text-&gt;style());
-        run.setCharactersLength(text-&gt;textLength());
</del><ins>+        TextRun run = RenderBlock::constructTextRun(&amp;text, font, &amp;text, text.style());
+        run.setCharactersLength(text.textLength());
</ins><span class="cx">         ASSERT(run.charactersLength() &gt;= run.length());
</span><del>-
</del><span class="cx">         run.setXPos(xPos);
</span><span class="cx">         return run;
</span><span class="cx">     }
</span><span class="lines">@@ -85,16 +87,16 @@
</span><span class="cx">     std::unique_ptr&lt;ComplexTextController&gt; m_controller;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-PassOwnPtr&lt;TextLayout&gt; FontCascade::createLayout(RenderText* text, float xPos, bool collapseWhiteSpace) const
</del><ins>+void TextLayoutDeleter::operator()(TextLayout* layout) const
</ins><span class="cx"> {
</span><del>-    if (!collapseWhiteSpace || !TextLayout::isNeeded(text, *this))
-        return nullptr;
-    return adoptPtr(new TextLayout(text, *this, xPos));
</del><ins>+    delete layout;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FontCascade::deleteLayout(TextLayout* layout)
</del><ins>+std::unique_ptr&lt;TextLayout, TextLayoutDeleter&gt; FontCascade::createLayout(RenderText&amp; text, float xPos, bool collapseWhiteSpace) const
</ins><span class="cx"> {
</span><del>-    delete layout;
</del><ins>+    if (!collapseWhiteSpace || !TextLayout::isNeeded(text, *this))
+        return nullptr;
+    return std::unique_ptr&lt;TextLayout, TextLayoutDeleter&gt;(new TextLayout(text, *this, xPos));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> float FontCascade::width(TextLayout&amp; layout, unsigned from, unsigned len, HashSet&lt;const Font*&gt;* fallbackFonts)
</span><span class="lines">@@ -102,20 +104,6 @@
</span><span class="cx">     return layout.width(from, len, fallbackFonts);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline CGFloat roundCGFloat(CGFloat f)
-{
-    if (sizeof(CGFloat) == sizeof(float))
-        return roundf(static_cast&lt;float&gt;(f));
-    return static_cast&lt;CGFloat&gt;(round(f));
-}
-
-static inline CGFloat ceilCGFloat(CGFloat f)
-{
-    if (sizeof(CGFloat) == sizeof(float))
-        return ceilf(static_cast&lt;float&gt;(f));
-    return static_cast&lt;CGFloat&gt;(ceil(f));
-}
-
</del><span class="cx"> ComplexTextController::ComplexTextController(const FontCascade&amp; font, const TextRun&amp; run, bool mayUseNaturalWritingDirection, HashSet&lt;const Font*&gt;* fallbackFonts, bool forTextEmphasis)
</span><span class="cx">     : m_font(font)
</span><span class="cx">     , m_run(run)
</span><span class="lines">@@ -637,7 +625,7 @@
</span><span class="cx"> 
</span><span class="cx">         bool lastRun = r + 1 == runCount;
</span><span class="cx">         float spaceWidth = font.spaceWidth() - font.syntheticBoldOffset();
</span><del>-        CGFloat roundedSpaceWidth = roundCGFloat(spaceWidth);
</del><ins>+        CGFloat roundedSpaceWidth = std::round(spaceWidth);
</ins><span class="cx">         const UChar* cp = complexTextRun.characters();
</span><span class="cx">         CGPoint glyphOrigin = CGPointZero;
</span><span class="cx">         CFIndex lastCharacterIndex = m_run.ltr() ? std::numeric_limits&lt;CFIndex&gt;::min() : std::numeric_limits&lt;CFIndex&gt;::max();
</span><span class="lines">@@ -748,14 +736,14 @@
</span><span class="cx">             // Force characters that are used to determine word boundaries for the rounding hack 
</span><span class="cx">             // to be integer width, so the following words will start on an integer boundary. 
</span><span class="cx">             if (m_run.applyWordRounding() &amp;&amp; FontCascade::isRoundingHackCharacter(ch)) 
</span><del>-                advance.width = ceilCGFloat(advance.width); 
</del><ins>+                advance.width = std::ceil(advance.width);
</ins><span class="cx"> 
</span><span class="cx">             // Check to see if the next character is a &quot;rounding hack character&quot;, if so, adjust the 
</span><span class="cx">             // width so that the total run width will be on an integer boundary.
</span><span class="cx">             bool needsRoundingForCharacter = m_run.applyWordRounding() &amp;&amp; !lastGlyph &amp;&amp; FontCascade::isRoundingHackCharacter(nextCh);
</span><span class="cx">             if (needsRoundingForCharacter || (m_run.applyRunRounding() &amp;&amp; lastGlyph)) {
</span><span class="cx">                 CGFloat totalWidth = widthSinceLastCommit + advance.width; 
</span><del>-                widthSinceLastCommit = ceilCGFloat(totalWidth); 
</del><ins>+                widthSinceLastCommit = std::ceil(totalWidth);
</ins><span class="cx">                 CGFloat extraWidth = widthSinceLastCommit - totalWidth; 
</span><span class="cx">                 if (m_run.ltr()) 
</span><span class="cx">                     advance.width += extraWidth; 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -1204,16 +1204,6 @@
</span><span class="cx">     repaintDirtyFloats(layoutState.floats());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderTextInfo::RenderTextInfo()
-    : m_text(0)
-    , m_font(0)
-{
-}
-
-RenderTextInfo::~RenderTextInfo()
-{
-}
-
</del><span class="cx"> // Before restarting the layout loop with a new logicalHeight, remove all floats that were added and reset the resolver.
</span><span class="cx"> inline const InlineIterator&amp; RenderBlockFlow::restartLayoutRunsAndFloatsInRange(LayoutUnit oldLogicalHeight, LayoutUnit newLogicalHeight,  FloatingObject* lastFloatFromPreviousLine, InlineBidiResolver&amp; resolver,  const InlineIterator&amp; oldEnd)
</span><span class="cx"> {
</span><span class="lines">@@ -1256,8 +1246,8 @@
</span><span class="cx"> 
</span><span class="cx">         WordMeasurements wordMeasurements;
</span><span class="cx">         end = lineBreaker.nextLineBreak(resolver, layoutState.lineInfo(), renderTextInfo, lastFloatFromPreviousLine, consecutiveHyphenatedLines, wordMeasurements);
</span><del>-        cachePriorCharactersIfNeeded(renderTextInfo.m_lineBreakIterator);
-        renderTextInfo.m_lineBreakIterator.resetPriorContext();
</del><ins>+        cachePriorCharactersIfNeeded(renderTextInfo.lineBreakIterator);
+        renderTextInfo.lineBreakIterator.resetPriorContext();
</ins><span class="cx">         if (resolver.position().atEnd()) {
</span><span class="cx">             // FIXME: We shouldn't be creating any runs in nextLineBreak to begin with!
</span><span class="cx">             // Once BidiRunList is separated from BidiResolver this will not be needed.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/rendering/RenderView.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include &quot;SelectionSubtreeRoot.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="cx"> #include &quot;SelectionRectGatherer.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/BreakingContext.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/rendering/line/BreakingContext.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -404,7 +404,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_width.addUncommittedWidth(inlineLogicalWidth(&amp;box));
</span><span class="cx">     // Reset prior line break context characters.
</span><del>-    m_renderTextInfo.m_lineBreakIterator.resetPriorContext();
</del><ins>+    m_renderTextInfo.lineBreakIterator.resetPriorContext();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void BreakingContext::handleFloat()
</span><span class="lines">@@ -423,7 +423,7 @@
</span><span class="cx">     } else
</span><span class="cx">         m_floatsFitOnLine = false;
</span><span class="cx">     // Update prior line break context characters, using U+FFFD (OBJECT REPLACEMENT CHARACTER) for floating element.
</span><del>-    m_renderTextInfo.m_lineBreakIterator.updatePriorContext(replacementCharacter);
</del><ins>+    m_renderTextInfo.lineBreakIterator.updatePriorContext(replacementCharacter);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This is currently just used for list markers and inline flows that have line boxes. Neither should
</span><span class="lines">@@ -489,7 +489,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Break on replaced elements if either has normal white-space.
</span><span class="cx">     if (((m_autoWrap || RenderStyle::autoWrap(m_lastWS)) &amp;&amp; (!m_current.renderer()-&gt;isImage() || m_allowImagesToBreak)
</span><del>-        &amp;&amp; (!m_current.renderer()-&gt;isRubyRun() || downcast&lt;RenderRubyRun&gt;(m_current.renderer())-&gt;canBreakBefore(m_renderTextInfo.m_lineBreakIterator))) || replacedBox.isAnonymousInlineBlock()) {
</del><ins>+        &amp;&amp; (!m_current.renderer()-&gt;isRubyRun() || downcast&lt;RenderRubyRun&gt;(m_current.renderer())-&gt;canBreakBefore(m_renderTextInfo.lineBreakIterator))) || replacedBox.isAnonymousInlineBlock()) {
</ins><span class="cx">         commitLineBreakAtCurrentWidth(*m_current.renderer());
</span><span class="cx">         if (m_width.committedWidth() &amp;&amp; replacedBox.isAnonymousInlineBlock()) {
</span><span class="cx">             // Always force a break before an anonymous inline block if there is content on the line
</span><span class="lines">@@ -528,10 +528,10 @@
</span><span class="cx">         m_width.addUncommittedWidth(replacedLogicalWidth);
</span><span class="cx">     if (is&lt;RenderRubyRun&gt;(*m_current.renderer())) {
</span><span class="cx">         m_width.applyOverhang(downcast&lt;RenderRubyRun&gt;(m_current.renderer()), m_lastObject, m_nextObject);
</span><del>-        downcast&lt;RenderRubyRun&gt;(m_current.renderer())-&gt;updatePriorContextFromCachedBreakIterator(m_renderTextInfo.m_lineBreakIterator);
</del><ins>+        downcast&lt;RenderRubyRun&gt;(m_current.renderer())-&gt;updatePriorContextFromCachedBreakIterator(m_renderTextInfo.lineBreakIterator);
</ins><span class="cx">     } else {
</span><span class="cx">         // Update prior line break context characters, using U+FFFD (OBJECT REPLACEMENT CHARACTER) for replaced element.
</span><del>-        m_renderTextInfo.m_lineBreakIterator.updatePriorContext(replacementCharacter);
</del><ins>+        m_renderTextInfo.lineBreakIterator.updatePriorContext(replacementCharacter);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (replacedBox.isAnonymousInlineBlock()) {
</span><span class="lines">@@ -723,27 +723,27 @@
</span><span class="cx">         breakAll = false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_renderTextInfo.m_text != &amp;renderText) {
</del><ins>+    if (m_renderTextInfo.text != &amp;renderText) {
</ins><span class="cx">         updateCounterIfNeeded(renderText);
</span><del>-        m_renderTextInfo.m_text = &amp;renderText;
-        m_renderTextInfo.m_font = &amp;font;
-        m_renderTextInfo.m_layout = font.createLayout(&amp;renderText, m_width.currentWidth(), m_collapseWhiteSpace);
-        m_renderTextInfo.m_lineBreakIterator.resetStringAndReleaseIterator(renderText.text(), style.locale(), mapLineBreakToIteratorMode(m_blockStyle.lineBreak()));
-        isLooseCJKMode = m_renderTextInfo.m_lineBreakIterator.isLooseCJKMode();
-    } else if (m_renderTextInfo.m_layout &amp;&amp; m_renderTextInfo.m_font != &amp;font) {
-        m_renderTextInfo.m_font = &amp;font;
-        m_renderTextInfo.m_layout = font.createLayout(&amp;renderText, m_width.currentWidth(), m_collapseWhiteSpace);
</del><ins>+        m_renderTextInfo.text = &amp;renderText;
+        m_renderTextInfo.font = &amp;font;
+        m_renderTextInfo.layout = font.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
+        m_renderTextInfo.lineBreakIterator.resetStringAndReleaseIterator(renderText.text(), style.locale(), mapLineBreakToIteratorMode(m_blockStyle.lineBreak()));
+        isLooseCJKMode = m_renderTextInfo.lineBreakIterator.isLooseCJKMode();
+    } else if (m_renderTextInfo.layout &amp;&amp; m_renderTextInfo.font != &amp;font) {
+        m_renderTextInfo.font = &amp;font;
+        m_renderTextInfo.layout = font.createLayout(renderText, m_width.currentWidth(), m_collapseWhiteSpace);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    TextLayout* textLayout = m_renderTextInfo.m_layout.get();
</del><ins>+    TextLayout* textLayout = m_renderTextInfo.layout.get();
</ins><span class="cx"> 
</span><span class="cx">     // Non-zero only when kerning is enabled and TextLayout isn't used, in which case we measure
</span><span class="cx">     // words with their trailing space, then subtract its width.
</span><span class="cx">     HashSet&lt;const Font*&gt; fallbackFonts;
</span><span class="cx">     float wordTrailingSpaceWidth = (font.typesettingFeatures() &amp; Kerning) &amp;&amp; !textLayout ? font.width(RenderBlock::constructTextRun(&amp;renderText, font, &amp;space, 1, style), &amp;fallbackFonts) + wordSpacing : 0;
</span><span class="cx"> 
</span><del>-    UChar lastCharacter = m_renderTextInfo.m_lineBreakIterator.lastCharacter();
-    UChar secondToLastCharacter = m_renderTextInfo.m_lineBreakIterator.secondToLastCharacter();
</del><ins>+    UChar lastCharacter = m_renderTextInfo.lineBreakIterator.lastCharacter();
+    UChar secondToLastCharacter = m_renderTextInfo.lineBreakIterator.secondToLastCharacter();
</ins><span class="cx">     for (; m_current.offset() &lt; renderText.textLength(); m_current.fastIncrementInTextNode()) {
</span><span class="cx">         bool previousCharacterIsSpace = m_currentCharacterIsSpace;
</span><span class="cx">         bool previousCharacterIsWS = m_currentCharacterIsWS;
</span><span class="lines">@@ -770,7 +770,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         int nextBreakablePosition = m_current.nextBreakablePosition();
</span><del>-        bool betweenWords = c == '\n' || (m_currWS != PRE &amp;&amp; !m_atStart &amp;&amp; isBreakable(m_renderTextInfo.m_lineBreakIterator, m_current.offset(), nextBreakablePosition, breakNBSP, isLooseCJKMode)
</del><ins>+        bool betweenWords = c == '\n' || (m_currWS != PRE &amp;&amp; !m_atStart &amp;&amp; isBreakable(m_renderTextInfo.lineBreakIterator, m_current.offset(), nextBreakablePosition, breakNBSP, isLooseCJKMode)
</ins><span class="cx">             &amp;&amp; (style.hyphens() != HyphensNone || (m_current.previousInSameNode() != softHyphen)));
</span><span class="cx">         m_current.setNextBreakablePosition(nextBreakablePosition);
</span><span class="cx"> 
</span><span class="lines">@@ -974,7 +974,7 @@
</span><span class="cx">         nextCharacter(c, lastCharacter, secondToLastCharacter);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_renderTextInfo.m_lineBreakIterator.setPriorContext(lastCharacter, secondToLastCharacter);
</del><ins>+    m_renderTextInfo.lineBreakIterator.setPriorContext(lastCharacter, secondToLastCharacter);
</ins><span class="cx"> 
</span><span class="cx">     wordMeasurements.grow(wordMeasurements.size() + 1);
</span><span class="cx">     WordMeasurement&amp; wordMeasurement = wordMeasurements.last();
</span><span class="lines">@@ -1183,10 +1183,10 @@
</span><span class="cx">     // Don't even bother measuring if our remaining line has many characters
</span><span class="cx">     if (renderText.textLength() == lineBreak.offset() || renderText.textLength() - lineBreak.offset() &gt; longTrailingWordLength)
</span><span class="cx">         return lineBreak;
</span><del>-    bool isLooseCJKMode = m_renderTextInfo.m_text != &amp;renderText &amp;&amp; m_renderTextInfo.m_lineBreakIterator.isLooseCJKMode();
</del><ins>+    bool isLooseCJKMode = m_renderTextInfo.text != &amp;renderText &amp;&amp; m_renderTextInfo.lineBreakIterator.isLooseCJKMode();
</ins><span class="cx">     bool breakNBSP = m_autoWrap &amp;&amp; m_currentStyle-&gt;nbspMode() == SPACE;
</span><span class="cx">     int nextBreakablePosition = lineBreak.nextBreakablePosition();
</span><del>-    isBreakable(m_renderTextInfo.m_lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, isLooseCJKMode);
</del><ins>+    isBreakable(m_renderTextInfo.lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, isLooseCJKMode);
</ins><span class="cx">     if (nextBreakablePosition &lt; 0 || static_cast&lt;unsigned&gt;(nextBreakablePosition) != renderText.textLength())
</span><span class="cx">         return lineBreak;
</span><span class="cx">     const RenderStyle&amp; style = lineStyle(renderText, m_lineInfo);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineBreakerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineBreaker.h (183168 => 183169)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineBreaker.h        2015-04-23 04:38:11 UTC (rev 183168)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.h        2015-04-23 05:20:23 UTC (rev 183169)
</span><span class="lines">@@ -36,20 +36,17 @@
</span><span class="cx"> class RenderText;
</span><span class="cx"> 
</span><span class="cx"> struct RenderTextInfo {
</span><del>-    // Destruction of m_layout requires TextLayout to be a complete type, so the constructor and destructor are made non-inline to avoid compilation errors.
-    RenderTextInfo();
-    ~RenderTextInfo();
-
-    RenderText* m_text;
-    OwnPtr&lt;TextLayout&gt; m_layout;
-    LazyLineBreakIterator m_lineBreakIterator;
-    const FontCascade* m_font;
</del><ins>+    RenderText* text { nullptr };
+    std::unique_ptr&lt;TextLayout, TextLayoutDeleter&gt; layout;
+    LazyLineBreakIterator lineBreakIterator;
+    const FontCascade* font { nullptr };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class LineBreaker {
</span><span class="cx"> public:
</span><span class="cx">     friend class BreakingContext;
</span><del>-    LineBreaker(RenderBlockFlow&amp; block)
</del><ins>+
+    explicit LineBreaker(RenderBlockFlow&amp; block)
</ins><span class="cx">         : m_block(block)
</span><span class="cx">     {
</span><span class="cx">         reset();
</span></span></pre>
</div>
</div>

</body>
</html>