Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1220)

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index bb48a3cf55886e608712358f5ca4abb320be4057..e23ddf7178bb272b830026534c4425e97a898314 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -244,9 +244,9 @@ namespace blink {
static int frameCount = 0;
-static WillBeHeapVector<ScriptSourceCode> createSourcesVector(const WebScriptSource* sourcesIn, unsigned numSources)
+static HeapVector<ScriptSourceCode> createSourcesVector(const WebScriptSource* sourcesIn, unsigned numSources)
{
- WillBeHeapVector<ScriptSourceCode> sources;
+ HeapVector<ScriptSourceCode> sources;
sources.append(sourcesIn, numSources);
return sources;
}
@@ -409,7 +409,7 @@ protected:
private:
void dispatchEventsForPrintingOnAllFrames()
{
- WillBeHeapVector<RefPtrWillBeMember<Document>> documents;
+ HeapVector<Member<Document>> documents;
for (Frame* currentFrame = frame(); currentFrame; currentFrame = currentFrame->tree().traverseNext(frame())) {
if (currentFrame->isLocalFrame())
documents.append(toLocalFrame(currentFrame)->document());
@@ -481,7 +481,7 @@ protected:
private:
// Set when printing.
- RawPtrWillBeMember<WebPluginContainerImpl> m_plugin;
+ Member<WebPluginContainerImpl> m_plugin;
WebPrintParams m_printParams;
};
@@ -540,7 +540,7 @@ WebLocalFrame* WebLocalFrame::frameForContext(v8::Local<v8::Context> context)
WebLocalFrame* WebLocalFrame::fromFrameOwnerElement(const WebElement& element)
{
- return WebLocalFrameImpl::fromFrameOwnerElement(PassRefPtrWillBeRawPtr<Element>(element).get());
+ return WebLocalFrameImpl::fromFrameOwnerElement(RawPtr<Element>(element).get());
}
bool WebLocalFrameImpl::isWebLocalFrame() const
@@ -752,7 +752,7 @@ void WebLocalFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScrip
RELEASE_ASSERT(worldID > 0);
RELEASE_ASSERT(worldID < EmbedderWorldIdLimit);
- WillBeHeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSources);
+ HeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSources);
v8::HandleScope handleScope(toIsolate(frame()));
frame()->script().executeScriptInIsolatedWorld(worldID, sources, extensionGroup, 0);
}
@@ -831,7 +831,7 @@ void WebLocalFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScrip
RELEASE_ASSERT(worldID > 0);
RELEASE_ASSERT(worldID < EmbedderWorldIdLimit);
- WillBeHeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSources);
+ HeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSources);
if (results) {
Vector<v8::Local<v8::Value>> scriptResults;
@@ -1214,7 +1214,7 @@ void WebLocalFrameImpl::selectRange(const WebPoint& baseInViewport, const WebPoi
void WebLocalFrameImpl::selectRange(const WebRange& webRange)
{
TRACE_EVENT0("blink", "WebLocalFrameImpl::selectRange");
- if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Range>>(webRange))
+ if (RawPtr<Range> range = static_cast<RawPtr<Range>>(webRange))
frame()->selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, SelectionDirectionalMode::NonDirectional, NotUserTriggered);
}
@@ -1312,9 +1312,9 @@ int WebLocalFrameImpl::printBegin(const WebPrintParams& printParams, const WebNo
}
if (pluginContainer && pluginContainer->supportsPaginatedPrint())
- m_printContext = adoptPtrWillBeNoop(new ChromePluginPrintContext(frame(), pluginContainer, printParams));
+ m_printContext = (new ChromePluginPrintContext(frame(), pluginContainer, printParams));
else
- m_printContext = adoptPtrWillBeNoop(new ChromePrintContext(frame()));
+ m_printContext = (new ChromePrintContext(frame()));
FloatRect rect(0, 0, static_cast<float>(printParams.printContentArea.width), static_cast<float>(printParams.printContentArea.height));
m_printContext->begin(rect.width(), rect.height());
@@ -1462,7 +1462,7 @@ WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
{
- RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebLocalFrameImpl(oldWebFrame, client));
+ RawPtr<WebLocalFrameImpl> webFrame = (new WebLocalFrameImpl(oldWebFrame, client));
Frame* oldFrame = oldWebFrame->toImplBase()->frame();
webFrame->setParent(oldWebFrame->parent());
webFrame->setOpener(oldWebFrame->opener());
@@ -1470,9 +1470,9 @@ WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
// When a core Frame is created with no owner, it attempts to set itself as
// the main frame of the Page. However, this is a provisional frame, and may
// disappear, so Page::m_mainFrame can't be updated just yet.
- OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nullptr, SandboxNone, WebFrameOwnerProperties());
+ RawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nullptr, SandboxNone, WebFrameOwnerProperties());
// TODO(dcheng): This block is very similar to initializeCoreFrame. Try to reuse it here.
- RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
+ RawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
// Set the name and unique name directly, bypassing any of the normal logic
// to calculate unique name.
frame->tree().setNameForReplacementFrame(toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName());
@@ -1548,7 +1548,7 @@ DEFINE_TRACE(WebLocalFrameImpl)
}
#endif
-void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
+void WebLocalFrameImpl::setCoreFrame(RawPtr<LocalFrame> frame)
{
m_frame = frame;
@@ -1594,7 +1594,7 @@ void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner,
frame()->init();
}
-PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
+RawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
const AtomicString& name, HTMLFrameOwnerElement* ownerElement)
{
ASSERT(m_client);
@@ -1603,7 +1603,7 @@ PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra
? WebTreeScopeType::Document
: WebTreeScopeType::Shadow;
WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), ownerElement->marginWidth(), ownerElement->marginHeight());
- RefPtrWillBeRawPtr<WebLocalFrameImpl> webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()), ownerProperties));
+ RawPtr<WebLocalFrameImpl> webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()), ownerProperties));
if (!webframeChild)
return nullptr;
@@ -1619,9 +1619,9 @@ PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra
// If we're moving in the back/forward list, we might want to replace the content
// of this child frame with whatever was there at that point.
- RefPtrWillBeRawPtr<HistoryItem> childItem = nullptr;
+ RawPtr<HistoryItem> childItem = nullptr;
if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished())
- childItem = PassRefPtrWillBeRawPtr<HistoryItem>(webframeChild->client()->historyItemForNewChildFrame());
+ childItem = RawPtr<HistoryItem>(webframeChild->client()->historyItemForNewChildFrame());
FrameLoadRequest newRequest = request;
FrameLoadType loadType = FrameLoadTypeStandard;
@@ -1831,7 +1831,7 @@ void WebLocalFrameImpl::loadJavaScriptURL(const KURL& url)
if (!frame()->document() || !frame()->page())
return;
- RefPtrWillBeRawPtr<Document> ownerDocument(frame()->document());
+ RawPtr<Document> ownerDocument(frame()->document());
// Protect privileged pages against bookmarklets and other javascript manipulations.
if (SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(frame()->document()->url().protocol()))
@@ -1933,7 +1933,7 @@ void WebLocalFrameImpl::sendPings(const WebNode& contextNode, const WebURL& dest
WebURLRequest WebLocalFrameImpl::requestFromHistoryItem(const WebHistoryItem& item,
WebURLRequest::CachePolicy cachePolicy) const
{
- RefPtrWillBeRawPtr<HistoryItem> historyItem = PassRefPtrWillBeRawPtr<HistoryItem>(item);
+ RawPtr<HistoryItem> historyItem = RawPtr<HistoryItem>(item);
ResourceRequest request = FrameLoader::resourceRequestFromHistoryItem(
historyItem.get(), static_cast<ResourceRequestCachePolicy>(cachePolicy));
return WrappedResourceRequest(request);
@@ -1964,7 +1964,7 @@ void WebLocalFrameImpl::load(const WebURLRequest& request, WebFrameLoadType webF
FrameLoadRequest frameRequest = FrameLoadRequest(nullptr, resourceRequest);
if (isClientRedirect)
frameRequest.setClientRedirect(ClientRedirect);
- RefPtrWillBeRawPtr<HistoryItem> historyItem = PassRefPtrWillBeRawPtr<HistoryItem>(item);
+ RawPtr<HistoryItem> historyItem = RawPtr<HistoryItem>(item);
frame()->loader().load(
frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem.get(),
static_cast<HistoryLoadType>(webHistoryLoadType));

Powered by Google App Engine
This is Rietveld 408576698