| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) | 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 bool HTMLFrameElementBase::supportsFocus() const | 237 bool HTMLFrameElementBase::supportsFocus() const |
| 238 { | 238 { |
| 239 return true; | 239 return true; |
| 240 } | 240 } |
| 241 | 241 |
| 242 void HTMLFrameElementBase::setFocus(bool received) | 242 void HTMLFrameElementBase::setFocus(bool received) |
| 243 { | 243 { |
| 244 HTMLFrameOwnerElement::setFocus(received); | 244 HTMLFrameOwnerElement::setFocus(received); |
| 245 if (Page* page = document()->page()) | 245 if (Page* page = document()->page()) { |
| 246 page->focusController()->setFocusedFrame(received ? contentFrame() : 0); | 246 if (received) |
| 247 page->focusController()->setFocusedFrame(contentFrame()); |
| 248 else if (page->focusController()->focusedFrame() == contentFrame()) // F
ocus may have already been given to another frame, don't take it away. |
| 249 page->focusController()->setFocusedFrame(0); |
| 250 } |
| 247 } | 251 } |
| 248 | 252 |
| 249 bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const | 253 bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const |
| 250 { | 254 { |
| 251 return attr->name() == srcAttr; | 255 return attr->name() == srcAttr; |
| 252 } | 256 } |
| 253 | 257 |
| 254 int HTMLFrameElementBase::width() const | 258 int HTMLFrameElementBase::width() const |
| 255 { | 259 { |
| 256 if (!renderer()) | 260 if (!renderer()) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 296 |
| 293 void HTMLFrameElementBase::willRemove() | 297 void HTMLFrameElementBase::willRemove() |
| 294 { | 298 { |
| 295 if (m_remainsAliveOnRemovalFromTree) | 299 if (m_remainsAliveOnRemovalFromTree) |
| 296 return; | 300 return; |
| 297 | 301 |
| 298 HTMLFrameOwnerElement::willRemove(); | 302 HTMLFrameOwnerElement::willRemove(); |
| 299 } | 303 } |
| 300 | 304 |
| 301 } // namespace WebCore | 305 } // namespace WebCore |
| OLD | NEW |