| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 if (!isCurrentlyDisplayedInFrame()) | 1074 if (!isCurrentlyDisplayedInFrame()) |
| 1075 return nullAtom; | 1075 return nullAtom; |
| 1076 | 1076 |
| 1077 return frame()->tree().name(); | 1077 return frame()->tree().name(); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 void LocalDOMWindow::setName(const AtomicString& name) { | 1080 void LocalDOMWindow::setName(const AtomicString& name) { |
| 1081 if (!isCurrentlyDisplayedInFrame()) | 1081 if (!isCurrentlyDisplayedInFrame()) |
| 1082 return; | 1082 return; |
| 1083 | 1083 |
| 1084 // Avoid calling out to notify the embedder if the browsing context name |
| 1085 // didn't change. This is important to avoid violating the browser assumption |
| 1086 // that the unique name doesn't change if the browsing context name doesn't |
| 1087 // change. |
| 1088 // TODO(dcheng): This comment is indicative of a problematic layering |
| 1089 // violation. The browser should not be relying on the renderer to get this |
| 1090 // correct; unique name calculation should be moved up into the browser. |
| 1084 if (name == frame()->tree().name()) | 1091 if (name == frame()->tree().name()) |
| 1085 return; | 1092 return; |
| 1086 | 1093 |
| 1087 frame()->tree().setName(name); | 1094 frame()->tree().setName(name); |
| 1088 ASSERT(frame()->loader().client()); | 1095 ASSERT(frame()->loader().client()); |
| 1089 frame()->loader().client()->didChangeName(name, frame()->tree().uniqueName()); | 1096 frame()->loader().client()->didChangeName(name); |
| 1090 } | 1097 } |
| 1091 | 1098 |
| 1092 void LocalDOMWindow::setStatus(const String& string) { | 1099 void LocalDOMWindow::setStatus(const String& string) { |
| 1093 m_status = string; | 1100 m_status = string; |
| 1094 | 1101 |
| 1095 if (!frame()) | 1102 if (!frame()) |
| 1096 return; | 1103 return; |
| 1097 | 1104 |
| 1098 Page* page = frame()->page(); | 1105 Page* page = frame()->page(); |
| 1099 if (!page) | 1106 if (!page) |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 DOMWindow::trace(visitor); | 1659 DOMWindow::trace(visitor); |
| 1653 Supplementable<LocalDOMWindow>::trace(visitor); | 1660 Supplementable<LocalDOMWindow>::trace(visitor); |
| 1654 } | 1661 } |
| 1655 | 1662 |
| 1656 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1663 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
| 1657 visitor->traceWrappers(m_customElements); | 1664 visitor->traceWrappers(m_customElements); |
| 1658 DOMWindow::traceWrappers(visitor); | 1665 DOMWindow::traceWrappers(visitor); |
| 1659 } | 1666 } |
| 1660 | 1667 |
| 1661 } // namespace blink | 1668 } // namespace blink |
| OLD | NEW |