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

Unified Diff: WebCore/html/HTMLFrameElementBase.cpp

Issue 2177001: Merge 58961 - Reviewed by Adele Peterson.... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 years, 7 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 | « WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/html/HTMLFrameElementBase.cpp
===================================================================
--- WebCore/html/HTMLFrameElementBase.cpp (revision 48064)
+++ WebCore/html/HTMLFrameElementBase.cpp (working copy)
@@ -242,8 +242,12 @@
void HTMLFrameElementBase::setFocus(bool received)
{
HTMLFrameOwnerElement::setFocus(received);
- if (Page* page = document()->page())
- page->focusController()->setFocusedFrame(received ? contentFrame() : 0);
+ if (Page* page = document()->page()) {
+ if (received)
+ page->focusController()->setFocusedFrame(contentFrame());
+ else if (page->focusController()->focusedFrame() == contentFrame()) // Focus may have already been given to another frame, don't take it away.
+ page->focusController()->setFocusedFrame(0);
+ }
}
bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const
« no previous file with comments | « WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698