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

Side by Side Diff: third_party/WebKit/Source/core/page/FrameTree.cpp

Issue 2616513002: Make sure pages that are closing but not yet closed are still suspended. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 for (Frame* frame = page->mainFrame(); frame; 423 for (Frame* frame = page->mainFrame(); frame;
424 frame = frame->tree().traverseNext()) { 424 frame = frame->tree().traverseNext()) {
425 if (frame->tree().name() == name) 425 if (frame->tree().name() == name)
426 return frame; 426 return frame;
427 } 427 }
428 428
429 // Search the entire tree of each of the other pages in this namespace. 429 // Search the entire tree of each of the other pages in this namespace.
430 // FIXME: Is random order OK? 430 // FIXME: Is random order OK?
431 for (const Page* otherPage : Page::ordinaryPages()) { 431 for (const Page* otherPage : Page::ordinaryPages()) {
432 if (otherPage == page) 432 if (otherPage == page || otherPage->isClosing())
433 continue; 433 continue;
434 for (Frame* frame = otherPage->mainFrame(); frame; 434 for (Frame* frame = otherPage->mainFrame(); frame;
435 frame = frame->tree().traverseNext()) { 435 frame = frame->tree().traverseNext()) {
436 if (frame->tree().name() == name) 436 if (frame->tree().name() == name)
437 return frame; 437 return frame;
438 } 438 }
439 } 439 }
440 440
441 return nullptr; 441 return nullptr;
442 } 442 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 void showFrameTree(const blink::Frame* frame) { 536 void showFrameTree(const blink::Frame* frame) {
537 if (!frame) { 537 if (!frame) {
538 printf("Null input frame\n"); 538 printf("Null input frame\n");
539 return; 539 return;
540 } 540 }
541 541
542 printFrames(frame->tree().top(), frame, 0); 542 printFrames(frame->tree().top(), frame, 0);
543 } 543 }
544 544
545 #endif 545 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698