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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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
« no previous file with comments | « Source/core/inspector/InspectorFileSystemAgent.cpp ('k') | Source/core/inspector/PageRuntimeAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index bf22e05f4e9a22f45495bcc1d56c50183fddcda5..c5ef823c73abb3c9e5a2a43a8f708124b0e5cef9 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -536,7 +536,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
{
ListHashSet<Cookie> rawCookiesList;
- for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext(mainFrame())) {
+ for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext(mainFrame())) {
Document* document = frame->document();
Vector<KURL> allURLs = allResourcesURLsForFrame(frame);
for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) {
@@ -558,7 +558,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type
void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
{
KURL parsedURL(ParsedURLString, url);
- for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext(m_page->mainFrame()))
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext(m_page->mainFrame()))
WebCore::deleteCookie(frame->document(), parsedURL, cookieName);
}
@@ -632,7 +632,7 @@ void InspectorPageAgent::searchInResources(ErrorString*, const String& text, con
bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
OwnPtr<RegularExpression> regex = ContentSearchUtils::createSearchRegex(text, caseSensitive, isRegex);
- for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext(m_page->mainFrame())) {
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext(m_page->mainFrame())) {
String content;
Vector<Resource*> allResources = cachedResourcesForFrame(frame);
for (Vector<Resource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it) {
@@ -897,7 +897,7 @@ String InspectorPageAgent::loaderId(DocumentLoader* loader)
Frame* InspectorPageAgent::findFrameWithSecurityOrigin(const String& originRawString)
{
- for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
RefPtr<SecurityOrigin> documentOrigin = frame->document()->securityOrigin();
if (documentOrigin->toRawString() == originRawString)
return frame;
@@ -1038,8 +1038,8 @@ PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Fra
.setUrl(urlWithoutFragment(frame->document()->url()).string())
.setMimeType(frame->loader()->documentLoader()->responseMIMEType())
.setSecurityOrigin(frame->document()->securityOrigin()->toRawString());
- if (frame->tree()->parent())
- frameObject->setParentId(frameId(frame->tree()->parent()));
+ if (frame->tree().parent())
+ frameObject->setParentId(frameId(frame->tree().parent()));
if (frame->ownerElement()) {
String name = frame->ownerElement()->getNameAttribute();
if (name.isEmpty())
@@ -1074,7 +1074,7 @@ PassRefPtr<TypeBuilder::Page::FrameResourceTree> InspectorPageAgent::buildObject
}
RefPtr<TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree> > childrenArray;
- for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
+ for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
if (!childrenArray) {
childrenArray = TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree>::create();
result->setChildFrames(childrenArray);
« no previous file with comments | « Source/core/inspector/InspectorFileSystemAgent.cpp ('k') | Source/core/inspector/PageRuntimeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698