<!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>[167594] 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/167594">167594</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-04-21 10:11:43 -0700 (Mon, 21 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move cross-port Source/WebCore/page/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=130534
Reviewed by Darin Adler.
Source/WebCore:
Replace uses of OwnPtr and PassOwnPtr in cross-port code under Source/WebCore/page/ with
std::unique_ptr. Unnecessary OwnPtr.h and PassOwnPtr.h header inclusions are removed as well.
* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::setContentSecurityPolicy):
* dom/SecurityContext.h:
* page/CaptionUserPreferences.h:
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::create):
(WebCore::CSPDirectiveList::checkEvalAndReportViolation):
(WebCore::CSPDirectiveList::checkInlineAndReportViolation):
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::setCSPDirective):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/ContentSecurityPolicy.h:
* page/DOMSecurityPolicy.h:
* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::fired):
(WebCore::DOMWindow::postMessageTimerFired):
* page/DOMWindow.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
* page/EventHandler.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::createRegExpForLabels):
(WebCore::Frame::searchForLabelsAboveCell):
(WebCore::Frame::searchForLabelsBeforeElement):
(WebCore::matchLabelsAgainstString):
(WebCore::Frame::setTiledBackingStoreEnabled):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::addSlowRepaintObject):
(WebCore::FrameView::addViewportConstrainedObject):
(WebCore::FrameView::addScrollableArea):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
* page/PageConsole.h:
* page/PageThrottler.h:
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
* page/animation/AnimationController.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
(WebCore::CSSPropertyAnimationWrapperMap::instance):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
Source/WebKit/mac:
* WebView/WebHTMLRepresentation.mm:
(searchForLabelsBeforeElement): Pass a RegExp reference to Frame::searchForLabelsAboveCell().</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="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSecurityContextcpp">trunk/Source/WebCore/dom/SecurityContext.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSecurityContexth">trunk/Source/WebCore/dom/SecurityContext.h</a></li>
<li><a href="#trunkSourceWebCorepageCaptionUserPreferencesh">trunk/Source/WebCore/page/CaptionUserPreferences.h</a></li>
<li><a href="#trunkSourceWebCorepageContentSecurityPolicycpp">trunk/Source/WebCore/page/ContentSecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContentSecurityPolicyh">trunk/Source/WebCore/page/ContentSecurityPolicy.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMSecurityPolicyh">trunk/Source/WebCore/page/DOMSecurityPolicy.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlerh">trunk/Source/WebCore/page/EventHandler.h</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="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCorepagePageThrottlerh">trunk/Source/WebCore/page/PageThrottler.h</a></li>
<li><a href="#trunkSourceWebCorepageSecurityPolicycpp">trunk/Source/WebCore/page/SecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepageanimationAnimationControllerh">trunk/Source/WebCore/page/animation/AnimationController.h</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorepagemacPageMaccpp">trunk/Source/WebCore/page/mac/PageMac.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLRepresentationmm">trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/ChangeLog        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2014-04-21 Zan Dobersek <zdobersek@igalia.com>
+
+ Move cross-port Source/WebCore/page/ code to std::unique_ptr
+ https://bugs.webkit.org/show_bug.cgi?id=130534
+
+ Reviewed by Darin Adler.
+
+ Replace uses of OwnPtr and PassOwnPtr in cross-port code under Source/WebCore/page/ with
+ std::unique_ptr. Unnecessary OwnPtr.h and PassOwnPtr.h header inclusions are removed as well.
+
+ * dom/Document.cpp:
+ (WebCore::Document::initSecurityContext):
+ * dom/SecurityContext.cpp:
+ (WebCore::SecurityContext::setContentSecurityPolicy):
+ * dom/SecurityContext.h:
+ * page/CaptionUserPreferences.h:
+ * page/ContentSecurityPolicy.cpp:
+ (WebCore::CSPDirectiveList::create):
+ (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
+ (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
+ (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
+ (WebCore::CSPDirectiveList::setCSPDirective):
+ (WebCore::ContentSecurityPolicy::didReceiveHeader):
+ * page/ContentSecurityPolicy.h:
+ * page/DOMSecurityPolicy.h:
+ * page/DOMWindow.cpp:
+ (WebCore::PostMessageTimer::fired):
+ (WebCore::DOMWindow::postMessageTimerFired):
+ * page/DOMWindow.h:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler):
+ * page/EventHandler.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ (WebCore::createRegExpForLabels):
+ (WebCore::Frame::searchForLabelsAboveCell):
+ (WebCore::Frame::searchForLabelsBeforeElement):
+ (WebCore::matchLabelsAgainstString):
+ (WebCore::Frame::setTiledBackingStoreEnabled):
+ * page/Frame.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::addEmbeddedObjectToUpdate):
+ (WebCore::FrameView::addSlowRepaintObject):
+ (WebCore::FrameView::addViewportConstrainedObject):
+ (WebCore::FrameView::addScrollableArea):
+ * page/FrameView.h:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ * page/Page.h:
+ * page/PageConsole.h:
+ * page/PageThrottler.h:
+ * page/SecurityPolicy.cpp:
+ (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
+ * page/animation/AnimationController.h:
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
+ (WebCore::CSSPropertyAnimationWrapperMap::instance):
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * page/mac/PageMac.cpp:
+ (WebCore::Page::addSchedulePair):
+ * workers/WorkerGlobalScope.cpp:
+ (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
+
</ins><span class="cx"> 2014-04-21 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Add HashSet::takeAny
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -1110,7 +1110,7 @@
</span><span class="cx"> __ZN7WebCore5Frame17setPageZoomFactorEf
</span><span class="cx"> __ZN7WebCore5Frame17setTextZoomFactorEf
</span><span class="cx"> __ZN7WebCore5Frame23visiblePositionForPointERKNS_8IntPointE
</span><del>-__ZN7WebCore5Frame24searchForLabelsAboveCellEPN3JSC4Yarr17RegularExpressionEPNS_20HTMLTableCellElementEPm
</del><ins>+__ZN7WebCore5Frame24searchForLabelsAboveCellERKN3JSC4Yarr17RegularExpressionEPNS_20HTMLTableCellElementEPm
</ins><span class="cx"> __ZN7WebCore5Frame25setPageAndTextZoomFactorsEff
</span><span class="cx"> __ZN7WebCore5Frame27resizePageRectsKeepingRatioERKNS_9FloatSizeES3_
</span><span class="cx"> __ZN7WebCore5Frame6createEPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -4619,7 +4619,7 @@
</span><span class="cx"> // This can occur via document.implementation.createDocument().
</span><span class="cx"> m_cookieURL = URL(ParsedURLString, emptyString());
</span><span class="cx"> setSecurityOrigin(SecurityOrigin::createUnique());
</span><del>- setContentSecurityPolicy(ContentSecurityPolicy::create(this));
</del><ins>+ setContentSecurityPolicy(std::make_unique<ContentSecurityPolicy>(this));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4639,7 +4639,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique() : SecurityOrigin::create(m_url));
</span><del>- setContentSecurityPolicy(ContentSecurityPolicy::create(this));
</del><ins>+ setContentSecurityPolicy(std::make_unique<ContentSecurityPolicy>(this));
</ins><span class="cx">
</span><span class="cx"> if (Settings* settings = this->settings()) {
</span><span class="cx"> if (!settings->webSecurityEnabled()) {
</span></span></pre></div>
<a id="trunkSourceWebCoredomSecurityContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SecurityContext.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SecurityContext.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/dom/SecurityContext.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -50,9 +50,9 @@
</span><span class="cx"> m_haveInitializedSecurityOrigin = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SecurityContext::setContentSecurityPolicy(PassOwnPtr<ContentSecurityPolicy> contentSecurityPolicy)
</del><ins>+void SecurityContext::setContentSecurityPolicy(std::unique_ptr<ContentSecurityPolicy> contentSecurityPolicy)
</ins><span class="cx"> {
</span><del>- m_contentSecurityPolicy = contentSecurityPolicy;
</del><ins>+ m_contentSecurityPolicy = std::move(contentSecurityPolicy);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool SecurityContext::isSecureTransitionTo(const URL& url) const
</span></span></pre></div>
<a id="trunkSourceWebCoredomSecurityContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SecurityContext.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SecurityContext.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/dom/SecurityContext.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #ifndef SecurityContext_h
</span><span class="cx"> #define SecurityContext_h
</span><span class="cx">
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="lines">@@ -76,7 +77,7 @@
</span><span class="cx"> SecurityContext();
</span><span class="cx"> virtual ~SecurityContext();
</span><span class="cx">
</span><del>- void setContentSecurityPolicy(PassOwnPtr<ContentSecurityPolicy>);
</del><ins>+ void setContentSecurityPolicy(std::unique_ptr<ContentSecurityPolicy>);
</ins><span class="cx">
</span><span class="cx"> void didFailToInitializeSecurityOrigin() { m_haveInitializedSecurityOrigin = false; }
</span><span class="cx"> bool haveInitializedSecurityOrigin() const { return m_haveInitializedSecurityOrigin; }
</span><span class="lines">@@ -85,7 +86,7 @@
</span><span class="cx"> bool m_haveInitializedSecurityOrigin;
</span><span class="cx"> SandboxFlags m_sandboxFlags;
</span><span class="cx"> RefPtr<SecurityOrigin> m_securityOrigin;
</span><del>- OwnPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
</del><ins>+ std::unique_ptr<ContentSecurityPolicy> m_contentSecurityPolicy;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageCaptionUserPreferencesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/CaptionUserPreferences.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/CaptionUserPreferences.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/CaptionUserPreferences.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include "LocalizedStrings.h"
</span><span class="cx"> #include "TextTrack.h"
</span><span class="cx"> #include "Timer.h"
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -810,7 +810,8 @@
</span><span class="cx"> class CSPDirectiveList {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<CSPDirectiveList> create(ContentSecurityPolicy*, const String&, ContentSecurityPolicy::HeaderType);
</del><ins>+ static std::unique_ptr<CSPDirectiveList> create(ContentSecurityPolicy*, const String&, ContentSecurityPolicy::HeaderType);
+ CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicy::HeaderType);
</ins><span class="cx">
</span><span class="cx"> const String& header() const { return m_header; }
</span><span class="cx"> ContentSecurityPolicy::HeaderType headerType() const { return m_headerType; }
</span><span class="lines">@@ -841,8 +842,6 @@
</span><span class="cx"> const Vector<URL>& reportURIs() const { return m_reportURIs; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicy::HeaderType);
-
</del><span class="cx"> void parse(const String&);
</span><span class="cx">
</span><span class="cx"> bool parseDirective(const UChar* begin, const UChar* end, String& name, String& value);
</span><span class="lines">@@ -854,7 +853,7 @@
</span><span class="cx"> void applySandboxPolicy(const String& name, const String& sandboxPolicy);
</span><span class="cx">
</span><span class="cx"> template <class CSPDirectiveType>
</span><del>- void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDirectiveType>&);
</del><ins>+ void setCSPDirective(const String& name, const String& value, std::unique_ptr<CSPDirectiveType>&);
</ins><span class="cx">
</span><span class="cx"> SourceListDirective* operativeDirective(SourceListDirective*) const;
</span><span class="cx"> void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL = URL(), const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
</span><span class="lines">@@ -885,19 +884,19 @@
</span><span class="cx"> bool m_haveSandboxPolicy;
</span><span class="cx"> ContentSecurityPolicy::ReflectedXSSDisposition m_reflectedXSSDisposition;
</span><span class="cx">
</span><del>- OwnPtr<MediaListDirective> m_pluginTypes;
- OwnPtr<NonceDirective> m_scriptNonce;
- OwnPtr<SourceListDirective> m_baseURI;
- OwnPtr<SourceListDirective> m_connectSrc;
- OwnPtr<SourceListDirective> m_defaultSrc;
- OwnPtr<SourceListDirective> m_fontSrc;
- OwnPtr<SourceListDirective> m_formAction;
- OwnPtr<SourceListDirective> m_frameSrc;
- OwnPtr<SourceListDirective> m_imgSrc;
- OwnPtr<SourceListDirective> m_mediaSrc;
- OwnPtr<SourceListDirective> m_objectSrc;
- OwnPtr<SourceListDirective> m_scriptSrc;
- OwnPtr<SourceListDirective> m_styleSrc;
</del><ins>+ std::unique_ptr<MediaListDirective> m_pluginTypes;
+ std::unique_ptr<NonceDirective> m_scriptNonce;
+ std::unique_ptr<SourceListDirective> m_baseURI;
+ std::unique_ptr<SourceListDirective> m_connectSrc;
+ std::unique_ptr<SourceListDirective> m_defaultSrc;
+ std::unique_ptr<SourceListDirective> m_fontSrc;
+ std::unique_ptr<SourceListDirective> m_formAction;
+ std::unique_ptr<SourceListDirective> m_frameSrc;
+ std::unique_ptr<SourceListDirective> m_imgSrc;
+ std::unique_ptr<SourceListDirective> m_mediaSrc;
+ std::unique_ptr<SourceListDirective> m_objectSrc;
+ std::unique_ptr<SourceListDirective> m_scriptSrc;
+ std::unique_ptr<SourceListDirective> m_styleSrc;
</ins><span class="cx">
</span><span class="cx"> Vector<URL> m_reportURIs;
</span><span class="cx">
</span><span class="lines">@@ -914,9 +913,9 @@
</span><span class="cx"> m_reportOnly = (type == ContentSecurityPolicy::Report || type == ContentSecurityPolicy::PrefixedReport);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<CSPDirectiveList> CSPDirectiveList::create(ContentSecurityPolicy* policy, const String& header, ContentSecurityPolicy::HeaderType type)
</del><ins>+std::unique_ptr<CSPDirectiveList> CSPDirectiveList::create(ContentSecurityPolicy* policy, const String& header, ContentSecurityPolicy::HeaderType type)
</ins><span class="cx"> {
</span><del>- OwnPtr<CSPDirectiveList> directives = adoptPtr(new CSPDirectiveList(policy, type));
</del><ins>+ auto directives = std::make_unique<CSPDirectiveList>(policy, type);
</ins><span class="cx"> directives->parse(header);
</span><span class="cx">
</span><span class="cx"> if (!directives->checkEval(directives->operativeDirective(directives->m_scriptSrc.get()))) {
</span><span class="lines">@@ -927,7 +926,7 @@
</span><span class="cx"> if (directives->isReportOnly() && directives->reportURIs().isEmpty())
</span><span class="cx"> policy->reportMissingReportURI(header);
</span><span class="cx">
</span><del>- return directives.release();
</del><ins>+ return directives;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSPDirectiveList::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
</span><span class="lines">@@ -976,7 +975,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> String suffix = String();
</span><del>- if (directive == m_defaultSrc)
</del><ins>+ if (directive == m_defaultSrc.get())
</ins><span class="cx"> suffix = " Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.";
</span><span class="cx">
</span><span class="cx"> reportViolation(directive->text(), scriptSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", URL(), contextURL, contextLine, state);
</span><span class="lines">@@ -1014,7 +1013,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> String suffix = String();
</span><del>- if (directive == m_defaultSrc)
</del><ins>+ if (directive == m_defaultSrc.get())
</ins><span class="cx"> suffix = makeString(" Note that '", (isScript ? "script" : "style"), "-src' was not explicitly set, so 'default-src' is used as a fallback.");
</span><span class="cx">
</span><span class="cx"> reportViolation(directive->text(), isScript ? scriptSrc : styleSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", URL(), contextURL, contextLine);
</span><span class="lines">@@ -1055,7 +1054,7 @@
</span><span class="cx"> prefix = "Refused to load the stylesheet '";
</span><span class="cx">
</span><span class="cx"> String suffix = String();
</span><del>- if (directive == m_defaultSrc)
</del><ins>+ if (directive == m_defaultSrc.get())
</ins><span class="cx"> suffix = " Note that '" + effectiveDirective + "' was not explicitly set, so 'default-src' is used as a fallback.";
</span><span class="cx">
</span><span class="cx"> reportViolation(directive->text(), effectiveDirective, prefix + url.stringCenterEllipsizedToLength() + "' because it violates the following Content Security Policy directive: \"" + directive->text() + "\"." + suffix + "\n", url);
</span><span class="lines">@@ -1314,13 +1313,13 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> template<class CSPDirectiveType>
</span><del>-void CSPDirectiveList::setCSPDirective(const String& name, const String& value, OwnPtr<CSPDirectiveType>& directive)
</del><ins>+void CSPDirectiveList::setCSPDirective(const String& name, const String& value, std::unique_ptr<CSPDirectiveType>& directive)
</ins><span class="cx"> {
</span><span class="cx"> if (directive) {
</span><span class="cx"> m_policy->reportDuplicateDirective(name);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- directive = adoptPtr(new CSPDirectiveType(name, value, m_policy));
</del><ins>+ directive = std::make_unique<CSPDirectiveType>(name, value, m_policy);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSPDirectiveList::applySandboxPolicy(const String& name, const String& sandboxPolicy)
</span><span class="lines">@@ -1459,7 +1458,7 @@
</span><span class="cx">
</span><span class="cx"> // header1,header2 OR header1
</span><span class="cx"> // ^ ^
</span><del>- OwnPtr<CSPDirectiveList> policy = CSPDirectiveList::create(this, String(begin, position - begin), type);
</del><ins>+ std::unique_ptr<CSPDirectiveList> policy = CSPDirectiveList::create(this, String(begin, position - begin), type);
</ins><span class="cx"> if (!policy->isReportOnly() && !policy->allowEval(0, SuppressReport))
</span><span class="cx"> m_scriptExecutionContext->disableEval(policy->evalDisabledErrorMessage());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "ScriptState.h"
</span><del>-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/TextPosition.h>
</span><span class="lines">@@ -46,15 +46,12 @@
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx">
</span><span class="cx"> typedef int SandboxFlags;
</span><del>-typedef Vector<OwnPtr<CSPDirectiveList>> CSPDirectiveListVector;
</del><ins>+typedef Vector<std::unique_ptr<CSPDirectiveList>> CSPDirectiveListVector;
</ins><span class="cx">
</span><span class="cx"> class ContentSecurityPolicy {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ContentSecurityPolicy> create(ScriptExecutionContext* scriptExecutionContext)
- {
- return adoptPtr(new ContentSecurityPolicy(scriptExecutionContext));
- }
</del><ins>+ explicit ContentSecurityPolicy(ScriptExecutionContext*);
</ins><span class="cx"> ~ContentSecurityPolicy();
</span><span class="cx">
</span><span class="cx"> void copyStateFrom(const ContentSecurityPolicy*);
</span><span class="lines">@@ -137,8 +134,6 @@
</span><span class="cx"> bool experimentalFeaturesEnabled() const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit ContentSecurityPolicy(ScriptExecutionContext*);
-
</del><span class="cx"> void logToConsole(const String& message, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
</span><span class="cx">
</span><span class="cx"> ScriptExecutionContext* m_scriptExecutionContext;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSecurityPolicyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSecurityPolicy.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSecurityPolicy.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/DOMSecurityPolicy.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define DOMSecurityPolicy_h
</span><span class="cx">
</span><span class="cx"> #include "ContextDestructionObserver.h"
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx"> #include <algorithm>
</span><span class="cx"> #include <inspector/ScriptCallStack.h>
</span><span class="cx"> #include <inspector/ScriptCallStackFactory.h>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="lines">@@ -152,8 +153,9 @@
</span><span class="cx"> private:
</span><span class="cx"> virtual void fired()
</span><span class="cx"> {
</span><del>- m_window->postMessageTimerFired(adoptPtr(this));
- // This object is deleted now.
</del><ins>+ // This object gets deleted when std::unique_ptr falls out of scope..
+ std::unique_ptr<PostMessageTimer> timer(this);
+ m_window->postMessageTimerFired(*timer);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<DOMWindow> m_window;
</span><span class="lines">@@ -841,14 +843,12 @@
</span><span class="cx"> timer->startOneShot(0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DOMWindow::postMessageTimerFired(PassOwnPtr<PostMessageTimer> t)
</del><ins>+void DOMWindow::postMessageTimerFired(PostMessageTimer& timer)
</ins><span class="cx"> {
</span><del>- OwnPtr<PostMessageTimer> timer(t);
-
</del><span class="cx"> if (!document() || !isCurrentlyDisplayedInFrame())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- dispatchMessageEventWithOriginCheck(timer->targetOrigin(), timer->event(document()), timer->stackTrace());
</del><ins>+ dispatchMessageEventWithOriginCheck(timer.targetOrigin(), timer.event(document()), timer.stackTrace());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, PassRefPtr<Event> event, PassRefPtr<ScriptCallStack> stackTrace)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/DOMWindow.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow& source, ExceptionCode&);
</span><span class="cx"> // Needed for Objective-C bindings (see bug 28774).
</span><span class="cx"> void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, const String& targetOrigin, DOMWindow& source, ExceptionCode&);
</span><del>- void postMessageTimerFired(PassOwnPtr<PostMessageTimer>);
</del><ins>+ void postMessageTimerFired(PostMessageTimer&);
</ins><span class="cx"> void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, PassRefPtr<Event>, PassRefPtr<Inspector::ScriptCallStack>);
</span><span class="cx">
</span><span class="cx"> void scrollBy(int x, int y) const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx"> #if ENABLE(CURSOR_SUPPORT)
</span><span class="cx"> , m_cursorUpdateTimer(this, &EventHandler::cursorUpdateTimerFired)
</span><span class="cx"> #endif
</span><del>- , m_autoscrollController(adoptPtr(new AutoscrollController))
</del><ins>+ , m_autoscrollController(std::make_unique<AutoscrollController>())
</ins><span class="cx"> , m_mouseDownMayStartAutoscroll(false)
</span><span class="cx"> , m_mouseDownWasInSubframe(false)
</span><span class="cx"> #if !ENABLE(IOS_TOUCH_EVENTS)
</span><span class="lines">@@ -357,7 +357,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> , m_mousePositionIsUnknown(true)
</span><span class="cx"> , m_mouseDownTimestamp(0)
</span><del>- , m_recentWheelEventDeltaTracker(adoptPtr(new WheelEventDeltaTracker))
</del><ins>+ , m_recentWheelEventDeltaTracker(std::make_unique<WheelEventDeltaTracker>())
</ins><span class="cx"> , m_widgetIsLatched(false)
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> , m_mouseDownView(nil)
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/EventHandler.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -38,8 +38,8 @@
</span><span class="cx"> #include "TextGranularity.h"
</span><span class="cx"> #include "Timer.h"
</span><span class="cx"> #include "WheelEventDeltaTracker.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx"> Timer<EventHandler> m_cursorUpdateTimer;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- OwnPtr<AutoscrollController> m_autoscrollController;
</del><ins>+ std::unique_ptr<AutoscrollController> m_autoscrollController;
</ins><span class="cx"> bool m_mouseDownMayStartAutoscroll;
</span><span class="cx"> bool m_mouseDownWasInSubframe;
</span><span class="cx">
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx"> double m_mouseDownTimestamp;
</span><span class="cx"> PlatformMouseEvent m_mouseDown;
</span><span class="cx">
</span><del>- OwnPtr<WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
</del><ins>+ std::unique_ptr<WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
</ins><span class="cx"> RefPtr<Element> m_latchedWheelEventElement;
</span><span class="cx"> bool m_widgetIsLatched;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -106,7 +106,6 @@
</span><span class="cx"> #include "npruntime_impl.h"
</span><span class="cx"> #include "runtime_root.h"
</span><span class="cx"> #include <bindings/ScriptValue.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/RefCountedLeakCounter.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <yarr/RegularExpression.h>
</span><span class="lines">@@ -163,8 +162,8 @@
</span><span class="cx"> , m_ownerElement(ownerElement)
</span><span class="cx"> , m_script(std::make_unique<ScriptController>(*this))
</span><span class="cx"> , m_editor(std::make_unique<Editor>(*this))
</span><del>- , m_selection(adoptPtr(new FrameSelection(this)))
- , m_eventHandler(adoptPtr(new EventHandler(*this)))
</del><ins>+ , m_selection(std::make_unique<FrameSelection>(this))
+ , m_eventHandler(std::make_unique<EventHandler>(*this))
</ins><span class="cx"> , m_animationController(std::make_unique<AnimationController>(*this))
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> , m_overflowAutoScrollTimer(this, &Frame::overflowAutoScrollTimerFired)
</span><span class="lines">@@ -312,7 +311,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(ORIENTATION_EVENTS)
</span><span class="cx">
</span><del>-static PassOwnPtr<JSC::Yarr::RegularExpression> createRegExpForLabels(const Vector<String>& labels)
</del><ins>+static JSC::Yarr::RegularExpression createRegExpForLabels(const Vector<String>& labels)
</ins><span class="cx"> {
</span><span class="cx"> // REVIEW- version of this call in FrameMac.mm caches based on the NSArray ptrs being
</span><span class="cx"> // the same across calls. We can't do that.
</span><span class="lines">@@ -344,10 +343,10 @@
</span><span class="cx"> pattern.appendLiteral("\\b");
</span><span class="cx"> }
</span><span class="cx"> pattern.append(')');
</span><del>- return adoptPtr(new JSC::Yarr::RegularExpression(pattern.toString(), TextCaseInsensitive));
</del><ins>+ return JSC::Yarr::RegularExpression(pattern.toString(), TextCaseInsensitive);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Frame::searchForLabelsAboveCell(JSC::Yarr::RegularExpression* regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
</del><ins>+String Frame::searchForLabelsAboveCell(const JSC::Yarr::RegularExpression& regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
</ins><span class="cx"> {
</span><span class="cx"> HTMLTableCellElement* aboveCell = cell->cellAbove();
</span><span class="cx"> if (aboveCell) {
</span><span class="lines">@@ -358,11 +357,11 @@
</span><span class="cx"> continue;
</span><span class="cx"> // For each text chunk, run the regexp
</span><span class="cx"> String nodeString = textNode->data();
</span><del>- int pos = regExp->searchRev(nodeString);
</del><ins>+ int pos = regExp.searchRev(nodeString);
</ins><span class="cx"> if (pos >= 0) {
</span><span class="cx"> if (resultDistanceFromStartOfCell)
</span><span class="cx"> *resultDistanceFromStartOfCell = lengthSearched;
</span><del>- return nodeString.substring(pos, regExp->matchedLength());
</del><ins>+ return nodeString.substring(pos, regExp.matchedLength());
</ins><span class="cx"> }
</span><span class="cx"> lengthSearched += nodeString.length();
</span><span class="cx"> }
</span><span class="lines">@@ -376,7 +375,7 @@
</span><span class="cx">
</span><span class="cx"> String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element* element, size_t* resultDistance, bool* resultIsInCellAbove)
</span><span class="cx"> {
</span><del>- OwnPtr<JSC::Yarr::RegularExpression> regExp(createRegExpForLabels(labels));
</del><ins>+ JSC::Yarr::RegularExpression regExp = createRegExpForLabels(labels);
</ins><span class="cx"> // We stop searching after we've seen this many chars
</span><span class="cx"> const unsigned int charsSearchedThreshold = 500;
</span><span class="cx"> // This is the absolute max we search. We allow a little more slop than
</span><span class="lines">@@ -402,7 +401,7 @@
</span><span class="cx"> if (n->hasTagName(tdTag) && !startingTableCell) {
</span><span class="cx"> startingTableCell = toHTMLTableCellElement(n);
</span><span class="cx"> } else if (n->hasTagName(trTag) && startingTableCell) {
</span><del>- String result = searchForLabelsAboveCell(regExp.get(), startingTableCell, resultDistance);
</del><ins>+ String result = searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
</ins><span class="cx"> if (!result.isEmpty()) {
</span><span class="cx"> if (resultIsInCellAbove)
</span><span class="cx"> *resultIsInCellAbove = true;
</span><span class="lines">@@ -415,11 +414,11 @@
</span><span class="cx"> // add 100 for slop, to make it more likely that we'll search whole nodes
</span><span class="cx"> if (lengthSearched + nodeString.length() > maxCharsSearched)
</span><span class="cx"> nodeString = nodeString.right(charsSearchedThreshold - lengthSearched);
</span><del>- int pos = regExp->searchRev(nodeString);
</del><ins>+ int pos = regExp.searchRev(nodeString);
</ins><span class="cx"> if (pos >= 0) {
</span><span class="cx"> if (resultDistance)
</span><span class="cx"> *resultDistance = lengthSearched;
</span><del>- return nodeString.substring(pos, regExp->matchedLength());
</del><ins>+ return nodeString.substring(pos, regExp.matchedLength());
</ins><span class="cx"> }
</span><span class="cx"> lengthSearched += nodeString.length();
</span><span class="cx"> }
</span><span class="lines">@@ -428,7 +427,7 @@
</span><span class="cx"> // If we started in a cell, but bailed because we found the start of the form or the
</span><span class="cx"> // previous element, we still might need to search the row above us for a label.
</span><span class="cx"> if (startingTableCell && !searchedCellAbove) {
</span><del>- String result = searchForLabelsAboveCell(regExp.get(), startingTableCell, resultDistance);
</del><ins>+ String result = searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
</ins><span class="cx"> if (!result.isEmpty()) {
</span><span class="cx"> if (resultIsInCellAbove)
</span><span class="cx"> *resultIsInCellAbove = true;
</span><span class="lines">@@ -449,7 +448,7 @@
</span><span class="cx"> replace(mutableStringToMatch, JSC::Yarr::RegularExpression("\\d", TextCaseSensitive), " ");
</span><span class="cx"> mutableStringToMatch.replace('_', ' ');
</span><span class="cx">
</span><del>- OwnPtr<JSC::Yarr::RegularExpression> regExp(createRegExpForLabels(labels));
</del><ins>+ JSC::Yarr::RegularExpression regExp = createRegExpForLabels(labels);
</ins><span class="cx"> // Use the largest match we can find in the whole string
</span><span class="cx"> int pos;
</span><span class="cx"> int length;
</span><span class="lines">@@ -457,9 +456,9 @@
</span><span class="cx"> int bestLength = -1;
</span><span class="cx"> int start = 0;
</span><span class="cx"> do {
</span><del>- pos = regExp->match(mutableStringToMatch, start);
</del><ins>+ pos = regExp.match(mutableStringToMatch, start);
</ins><span class="cx"> if (pos != -1) {
</span><del>- length = regExp->matchedLength();
</del><ins>+ length = regExp.matchedLength();
</ins><span class="cx"> if (length >= bestLength) {
</span><span class="cx"> bestPos = pos;
</span><span class="cx"> bestLength = length;
</span><span class="lines">@@ -946,12 +945,12 @@
</span><span class="cx"> void Frame::setTiledBackingStoreEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> if (!enabled) {
</span><del>- m_tiledBackingStore.clear();
</del><ins>+ m_tiledBackingStore = nullptr;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (m_tiledBackingStore)
</span><span class="cx"> return;
</span><del>- m_tiledBackingStore = adoptPtr(new TiledBackingStore(this));
</del><ins>+ m_tiledBackingStore = std::make_unique<TiledBackingStore>(this);
</ins><span class="cx"> m_tiledBackingStore->setCommitTileUpdatesOnIdleEventLoop(true);
</span><span class="cx"> if (m_view)
</span><span class="cx"> m_view->setPaintsEntireContents(true);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/Frame.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include "NavigationScheduler.h"
</span><span class="cx"> #include "ScrollTypes.h"
</span><span class="cx"> #include "UserScriptTypes.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -235,7 +236,7 @@
</span><span class="cx"> Document* documentAtPoint(const IntPoint& windowPoint);
</span><span class="cx"> PassRefPtr<Range> rangeForPoint(const IntPoint& framePoint);
</span><span class="cx">
</span><del>- String searchForLabelsAboveCell(JSC::Yarr::RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
</del><ins>+ String searchForLabelsAboveCell(const JSC::Yarr::RegularExpression&, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
</ins><span class="cx"> String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
</span><span class="cx"> String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
</span><span class="cx">
</span><span class="lines">@@ -299,8 +300,8 @@
</span><span class="cx">
</span><span class="cx"> const std::unique_ptr<ScriptController> m_script;
</span><span class="cx"> const std::unique_ptr<Editor> m_editor;
</span><del>- const OwnPtr<FrameSelection> m_selection;
- const OwnPtr<EventHandler> m_eventHandler;
</del><ins>+ const std::unique_ptr<FrameSelection> m_selection;
+ const std::unique_ptr<EventHandler> m_eventHandler;
</ins><span class="cx"> const std::unique_ptr<AnimationController> m_animationController;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -351,7 +352,7 @@
</span><span class="cx"> virtual IntRect tiledBackingStoreVisibleRect() override final;
</span><span class="cx"> virtual Color tiledBackingStoreBackgroundColor() const override final;
</span><span class="cx">
</span><del>- OwnPtr<TiledBackingStore> m_tiledBackingStore;
</del><ins>+ std::unique_ptr<TiledBackingStore> m_tiledBackingStore;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> int m_activeDOMObjectsAndAnimationsSuspendedCount;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -1382,7 +1382,7 @@
</span><span class="cx"> void FrameView::addEmbeddedObjectToUpdate(RenderEmbeddedObject& embeddedObject)
</span><span class="cx"> {
</span><span class="cx"> if (!m_embeddedObjectsToUpdate)
</span><del>- m_embeddedObjectsToUpdate = adoptPtr(new ListHashSet<RenderEmbeddedObject*>);
</del><ins>+ m_embeddedObjectsToUpdate = std::make_unique<ListHashSet<RenderEmbeddedObject*>>();
</ins><span class="cx">
</span><span class="cx"> HTMLFrameOwnerElement& element = embeddedObject.frameOwnerElement();
</span><span class="cx"> if (isHTMLObjectElement(element) || isHTMLEmbedElement(element)) {
</span><span class="lines">@@ -1489,7 +1489,7 @@
</span><span class="cx"> bool hadSlowRepaintObjects = hasSlowRepaintObjects();
</span><span class="cx">
</span><span class="cx"> if (!m_slowRepaintObjects)
</span><del>- m_slowRepaintObjects = adoptPtr(new HashSet<RenderElement*>);
</del><ins>+ m_slowRepaintObjects = std::make_unique<HashSet<RenderElement*>>();
</ins><span class="cx">
</span><span class="cx"> m_slowRepaintObjects->add(o);
</span><span class="cx">
</span><span class="lines">@@ -1523,7 +1523,7 @@
</span><span class="cx"> void FrameView::addViewportConstrainedObject(RenderElement* object)
</span><span class="cx"> {
</span><span class="cx"> if (!m_viewportConstrainedObjects)
</span><del>- m_viewportConstrainedObjects = adoptPtr(new ViewportConstrainedObjectSet);
</del><ins>+ m_viewportConstrainedObjects = std::make_unique<ViewportConstrainedObjectSet>();
</ins><span class="cx">
</span><span class="cx"> if (!m_viewportConstrainedObjects->contains(object)) {
</span><span class="cx"> m_viewportConstrainedObjects->add(object);
</span><span class="lines">@@ -3989,7 +3989,7 @@
</span><span class="cx"> bool FrameView::addScrollableArea(ScrollableArea* scrollableArea)
</span><span class="cx"> {
</span><span class="cx"> if (!m_scrollableAreas)
</span><del>- m_scrollableAreas = adoptPtr(new ScrollableAreaSet);
</del><ins>+ m_scrollableAreas = std::make_unique<ScrollableAreaSet>();
</ins><span class="cx"> return m_scrollableAreas->add(scrollableArea).isNewEntry;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/FrameView.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -33,9 +33,9 @@
</span><span class="cx"> #include "PaintPhase.h"
</span><span class="cx"> #include "RenderPtr.h"
</span><span class="cx"> #include "ScrollView.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/ListHashSet.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -602,10 +602,10 @@
</span><span class="cx"> LayoutSize m_size;
</span><span class="cx"> LayoutSize m_margins;
</span><span class="cx">
</span><del>- OwnPtr<ListHashSet<RenderEmbeddedObject*>> m_embeddedObjectsToUpdate;
</del><ins>+ std::unique_ptr<ListHashSet<RenderEmbeddedObject*>> m_embeddedObjectsToUpdate;
</ins><span class="cx"> const RefPtr<Frame> m_frame;
</span><span class="cx">
</span><del>- OwnPtr<HashSet<RenderElement*>> m_slowRepaintObjects;
</del><ins>+ std::unique_ptr<HashSet<RenderElement*>> m_slowRepaintObjects;
</ins><span class="cx">
</span><span class="cx"> bool m_needsFullRepaint;
</span><span class="cx">
</span><span class="lines">@@ -697,8 +697,8 @@
</span><span class="cx"> // The intrinsic content size decided by autosizing.
</span><span class="cx"> IntSize m_autoSizeContentSize;
</span><span class="cx">
</span><del>- OwnPtr<ScrollableAreaSet> m_scrollableAreas;
- OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
</del><ins>+ std::unique_ptr<ScrollableAreaSet> m_scrollableAreas;
+ std::unique_ptr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
</ins><span class="cx">
</span><span class="cx"> int m_headerHeight;
</span><span class="cx"> int m_footerHeight;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/Page.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include "Supplementable.h"
</span><span class="cx"> #include "ViewState.h"
</span><span class="cx"> #include "ViewportArguments.h"
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -257,7 +258,7 @@
</span><span class="cx"> void removeSchedulePair(PassRefPtr<SchedulePair>);
</span><span class="cx"> SchedulePairHashSet* scheduledRunLoopPairs() { return m_scheduledRunLoopPairs.get(); }
</span><span class="cx">
</span><del>- OwnPtr<SchedulePairHashSet> m_scheduledRunLoopPairs;
</del><ins>+ std::unique_ptr<SchedulePairHashSet> m_scheduledRunLoopPairs;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> const VisibleSelection& selection() const;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageThrottlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageThrottler.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageThrottler.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/PageThrottler.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -31,8 +31,6 @@
</span><span class="cx"> #include "UserActivity.h"
</span><span class="cx"> #include "ViewState.h"
</span><span class="cx"> #include <wtf/HashSet.h>
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/WeakPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCorepageSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SecurityPolicy.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SecurityPolicy.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/SecurityPolicy.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -33,8 +33,7 @@
</span><span class="cx"> #include <wtf/MainThread.h>
</span><span class="cx"> #include "OriginAccessEntry.h"
</span><span class="cx"> #include "SecurityOrigin.h"
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -42,7 +41,7 @@
</span><span class="cx"> static SecurityPolicy::LocalLoadPolicy localLoadPolicy = SecurityPolicy::AllowLocalLoadsForLocalOnly;
</span><span class="cx">
</span><span class="cx"> typedef Vector<OriginAccessEntry> OriginAccessWhiteList;
</span><del>-typedef HashMap<String, OwnPtr<OriginAccessWhiteList>> OriginAccessMap;
</del><ins>+typedef HashMap<String, std::unique_ptr<OriginAccessWhiteList>> OriginAccessMap;
</ins><span class="cx">
</span><span class="cx"> static OriginAccessMap& originAccessMap()
</span><span class="cx"> {
</span><span class="lines">@@ -136,7 +135,7 @@
</span><span class="cx"> String sourceString = sourceOrigin.toString();
</span><span class="cx"> OriginAccessMap::AddResult result = originAccessMap().add(sourceString, nullptr);
</span><span class="cx"> if (result.isNewEntry)
</span><del>- result.iterator->value = adoptPtr(new OriginAccessWhiteList);
</del><ins>+ result.iterator->value = std::make_unique<OriginAccessWhiteList>();
</ins><span class="cx">
</span><span class="cx"> OriginAccessWhiteList* list = result.iterator->value.get();
</span><span class="cx"> list->append(OriginAccessEntry(destinationProtocol, destinationDomain, allowDestinationSubdomains ? OriginAccessEntry::AllowSubdomains : OriginAccessEntry::DisallowSubdomains));
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationAnimationControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/AnimationController.h (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/AnimationController.h        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/animation/AnimationController.h        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include "AnimationBase.h"
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #include "StylePropertyShorthand.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="cx"> #include <algorithm>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="lines">@@ -765,15 +766,15 @@
</span><span class="cx"> PropertyWrapperVisitedAffectedColor(CSSPropertyID prop, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&),
</span><span class="cx"> Color (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
</span><span class="cx"> : AnimationPropertyWrapperBase(prop)
</span><del>- , m_wrapper(adoptPtr(new PropertyWrapperColor(prop, getter, setter)))
- , m_visitedWrapper(adoptPtr(new PropertyWrapperColor(prop, visitedGetter, visitedSetter)))
</del><ins>+ , m_wrapper(std::make_unique<PropertyWrapperColor>(prop, getter, setter))
+ , m_visitedWrapper(std::make_unique<PropertyWrapperColor>(prop, visitedGetter, visitedSetter))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> PropertyWrapperVisitedAffectedColor(CSSPropertyID prop, MaybeInvalidColorTag, Color (RenderStyle::*getter)() const, void (RenderStyle::*setter)(const Color&),
</span><span class="cx"> Color (RenderStyle::*visitedGetter)() const, void (RenderStyle::*visitedSetter)(const Color&))
</span><span class="cx"> : AnimationPropertyWrapperBase(prop)
</span><del>- , m_wrapper(adoptPtr(new PropertyWrapperMaybeInvalidColor(prop, getter, setter)))
- , m_visitedWrapper(adoptPtr(new PropertyWrapperMaybeInvalidColor(prop, visitedGetter, visitedSetter)))
</del><ins>+ , m_wrapper(std::make_unique<PropertyWrapperMaybeInvalidColor>(prop, getter, setter))
+ , m_visitedWrapper(std::make_unique<PropertyWrapperMaybeInvalidColor>(prop, visitedGetter, visitedSetter))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="lines">@@ -787,8 +788,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- OwnPtr<AnimationPropertyWrapperBase> m_wrapper;
- OwnPtr<AnimationPropertyWrapperBase> m_visitedWrapper;
</del><ins>+ std::unique_ptr<AnimationPropertyWrapperBase> m_wrapper;
+ std::unique_ptr<AnimationPropertyWrapperBase> m_visitedWrapper;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // Wrapper base class for an animatable property in a FillLayer
</span><span class="lines">@@ -1079,10 +1080,8 @@
</span><span class="cx"> static CSSPropertyAnimationWrapperMap& instance()
</span><span class="cx"> {
</span><span class="cx"> // FIXME: This data is never destroyed. Maybe we should ref count it and toss it when the last AnimationController is destroyed?
</span><del>- DEPRECATED_DEFINE_STATIC_LOCAL(OwnPtr<CSSPropertyAnimationWrapperMap>, map, ());
- if (!map)
- map = adoptPtr(new CSSPropertyAnimationWrapperMap);
- return *map;
</del><ins>+ static NeverDestroyed<CSSPropertyAnimationWrapperMap> map;
+ return map;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> AnimationPropertyWrapperBase* wrapperForProperty(CSSPropertyID propertyID)
</span><span class="lines">@@ -1115,10 +1114,12 @@
</span><span class="cx"> return m_propertyToIdMap[propertyID - firstCSSProperty];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Vector<OwnPtr<AnimationPropertyWrapperBase>> m_propertyWrappers;
</del><ins>+ Vector<std::unique_ptr<AnimationPropertyWrapperBase>> m_propertyWrappers;
</ins><span class="cx"> unsigned char m_propertyToIdMap[numCSSProperties];
</span><span class="cx">
</span><span class="cx"> static const unsigned char cInvalidPropertyWrapperIndex = UCHAR_MAX;
</span><ins>+
+ friend class WTF::NeverDestroyed<CSSPropertyAnimationWrapperMap>;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
</span><span class="lines">@@ -1313,7 +1314,7 @@
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < animatableLonghandPropertiesCount; ++i) {
</span><span class="cx"> AnimationPropertyWrapperBase* wrapper = animatableLonghandPropertyWrappers[i];
</span><del>- m_propertyWrappers.uncheckedAppend(adoptPtr(wrapper));
</del><ins>+ m_propertyWrappers.uncheckedAppend(std::unique_ptr<AnimationPropertyWrapperBase>(wrapper));
</ins><span class="cx"> indexFromPropertyID(wrapper->property()) = i;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1334,7 +1335,7 @@
</span><span class="cx"> longhandWrappers.uncheckedAppend(m_propertyWrappers[wrapperIndex].get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_propertyWrappers.uncheckedAppend(adoptPtr(new ShorthandPropertyWrapper(propertyID, longhandWrappers)));
</del><ins>+ m_propertyWrappers.uncheckedAppend(std::make_unique<ShorthandPropertyWrapper>(propertyID, longhandWrappers));
</ins><span class="cx"> indexFromPropertyID(propertyID) = animatableLonghandPropertiesCount + i;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacPageMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/PageMac.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/PageMac.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/page/mac/PageMac.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> RefPtr<SchedulePair> pair = prpPair;
</span><span class="cx">
</span><span class="cx"> if (!m_scheduledRunLoopPairs)
</span><del>- m_scheduledRunLoopPairs = adoptPtr(new SchedulePairHashSet);
</del><ins>+ m_scheduledRunLoopPairs = std::make_unique<SchedulePairHashSet>();
</ins><span class="cx"> m_scheduledRunLoopPairs->add(pair);
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">
</span><span class="cx"> void WorkerGlobalScope::applyContentSecurityPolicyFromString(const String& policy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
</span><span class="cx"> {
</span><del>- setContentSecurityPolicy(ContentSecurityPolicy::create(this));
</del><ins>+ setContentSecurityPolicy(std::make_unique<ContentSecurityPolicy>(this));
</ins><span class="cx"> contentSecurityPolicy()->didReceiveHeader(policy, contentSecurityPolicyType);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-04-21 Zan Dobersek <zdobersek@igalia.com>
+
+ Move cross-port Source/WebCore/page/ code to std::unique_ptr
+ https://bugs.webkit.org/show_bug.cgi?id=130534
+
+ Reviewed by Darin Adler.
+
+ * WebView/WebHTMLRepresentation.mm:
+ (searchForLabelsBeforeElement): Pass a RegExp reference to Frame::searchForLabelsAboveCell().
+
</ins><span class="cx"> 2014-04-19 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] WebView adjusts the cursor even when another window is in front
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLRepresentationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm (167593 => 167594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm        2014-04-21 16:56:14 UTC (rev 167593)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLRepresentation.mm        2014-04-21 17:11:43 UTC (rev 167594)
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> } else if (n->hasTagName(tdTag) && !startingTableCell) {
</span><span class="cx"> startingTableCell = static_cast<HTMLTableCellElement*>(n);
</span><span class="cx"> } else if (n->hasTagName(trTag) && startingTableCell) {
</span><del>- NSString* result = frame->searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
</del><ins>+ NSString* result = frame->searchForLabelsAboveCell(*regExp, startingTableCell, resultDistance);
</ins><span class="cx"> if (result && [result length] > 0) {
</span><span class="cx"> if (resultIsInCellAbove)
</span><span class="cx"> *resultIsInCellAbove = true;
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx"> // If we started in a cell, but bailed because we found the start of the form or the
</span><span class="cx"> // previous element, we still might need to search the row above us for a label.
</span><span class="cx"> if (startingTableCell && !searchedCellAbove) {
</span><del>- NSString* result = frame->searchForLabelsAboveCell(regExp, startingTableCell, resultDistance);
</del><ins>+ NSString* result = frame->searchForLabelsAboveCell(*regExp, startingTableCell, resultDistance);
</ins><span class="cx"> if (result && [result length] > 0) {
</span><span class="cx"> if (resultIsInCellAbove)
</span><span class="cx"> *resultIsInCellAbove = true;
</span></span></pre>
</div>
</div>
</body>
</html>