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

Side by Side Diff: Source/core/page/FocusController.h

Issue 238023004: Focusing iframe window should trigger blur event for oldframe's focused element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments 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
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/page/FocusController.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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 explicit FocusNavigationScope(TreeScope*); 60 explicit FocusNavigationScope(TreeScope*);
61 TreeScope* m_rootTreeScope; 61 TreeScope* m_rootTreeScope;
62 }; 62 };
63 63
64 class FocusController { 64 class FocusController {
65 WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED; 65 WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED;
66 public: 66 public:
67 static PassOwnPtr<FocusController> create(Page*); 67 static PassOwnPtr<FocusController> create(Page*);
68 68
69 void setFocusedFrame(PassRefPtr<Frame>); 69 void setFocusedFrame(PassRefPtr<Frame>);
70 void focusDocumentView(PassRefPtr<Frame>);
70 Frame* focusedFrame() const { return m_focusedFrame.get(); } 71 Frame* focusedFrame() const { return m_focusedFrame.get(); }
71 Frame* focusedOrMainFrame() const; 72 Frame* focusedOrMainFrame() const;
72 73
73 bool setInitialFocus(FocusType); 74 bool setInitialFocus(FocusType);
74 bool advanceFocus(FocusType type) { return advanceFocus(type, false); } 75 bool advanceFocus(FocusType type) { return advanceFocus(type, false); }
75 76
76 bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusType = FocusTypeNon e); 77 bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusType = FocusTypeNon e);
77 78
78 void setActive(bool); 79 void setActive(bool);
79 bool isActive() const { return m_isActive; } 80 bool isActive() const { return m_isActive; }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 Page* m_page; 115 Page* m_page;
115 RefPtr<Frame> m_focusedFrame; 116 RefPtr<Frame> m_focusedFrame;
116 bool m_isActive; 117 bool m_isActive;
117 bool m_isFocused; 118 bool m_isFocused;
118 bool m_isChangingFocusedFrame; 119 bool m_isChangingFocusedFrame;
119 }; 120 };
120 121
121 } // namespace WebCore 122 } // namespace WebCore
122 123
123 #endif // FocusController_h 124 #endif // FocusController_h
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698