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

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

Issue 218693003: Generate FrameTree::uniqueName with a URL attribute value. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unload handler Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FrameTree.h ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 } 47 }
48 48
49 FrameTree::~FrameTree() 49 FrameTree::~FrameTree()
50 { 50 {
51 // FIXME: Why is this here? Doesn't this parallel what we already do in ~Loc alFrame? 51 // FIXME: Why is this here? Doesn't this parallel what we already do in ~Loc alFrame?
52 for (LocalFrame* child = firstChild(); child; child = child->tree().nextSibl ing()) 52 for (LocalFrame* child = firstChild(); child; child = child->tree().nextSibl ing())
53 child->setView(nullptr); 53 child->setView(nullptr);
54 } 54 }
55 55
56 void FrameTree::setName(const AtomicString& name) 56 void FrameTree::setName(const AtomicString& name, const AtomicString& fallbackNa me)
57 { 57 {
58 m_name = name; 58 m_name = name;
59 if (!parent()) { 59 if (!parent()) {
60 m_uniqueName = name; 60 m_uniqueName = name;
61 return; 61 return;
62 } 62 }
63 m_uniqueName = AtomicString(); // Remove our old frame name so it's not cons idered in uniqueChildName. 63 m_uniqueName = AtomicString(); // Remove our old frame name so it's not cons idered in uniqueChildName.
64 m_uniqueName = parent()->tree().uniqueChildName(name); 64 m_uniqueName = parent()->tree().uniqueChildName(name.isEmpty() ? fallbackNam e : name);
65 } 65 }
66 66
67 LocalFrame* FrameTree::parent() const 67 LocalFrame* FrameTree::parent() const
68 { 68 {
69 if (!m_thisFrame->loader().client()) 69 if (!m_thisFrame->loader().client())
70 return 0; 70 return 0;
71 // FIXME: Temporary hack to stage converting locations that really should be Frame. 71 // FIXME: Temporary hack to stage converting locations that really should be Frame.
72 return toLocalFrame(m_thisFrame->loader().client()->parent()); 72 return toLocalFrame(m_thisFrame->loader().client()->parent());
73 } 73 }
74 74
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 { 409 {
410 if (!frame) { 410 if (!frame) {
411 printf("Null input frame\n"); 411 printf("Null input frame\n");
412 return; 412 return;
413 } 413 }
414 414
415 printFrames(frame->tree().top(), frame, 0); 415 printFrames(frame->tree().top(), frame, 0);
416 } 416 }
417 417
418 #endif 418 #endif
OLDNEW
« no previous file with comments | « Source/core/page/FrameTree.h ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698