OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nuanti Ltd. | 3 * Copyright (C) 2008 Nuanti Ltd. |
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 oldFrame->selection().setFocused(false); | 249 oldFrame->selection().setFocused(false); |
250 oldFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::blur)
); | 250 oldFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::blur)
); |
251 } | 251 } |
252 | 252 |
253 if (newFrame && newFrame->view() && isFocused()) { | 253 if (newFrame && newFrame->view() && isFocused()) { |
254 newFrame->selection().setFocused(true); | 254 newFrame->selection().setFocused(true); |
255 newFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::focus
)); | 255 newFrame->domWindow()->dispatchEvent(Event::create(EventTypeNames::focus
)); |
256 } | 256 } |
257 | 257 |
258 m_isChangingFocusedFrame = false; | 258 m_isChangingFocusedFrame = false; |
| 259 |
| 260 m_page->chrome().client().focusedFrameChanged(newFrame.get()); |
259 } | 261 } |
260 | 262 |
261 LocalFrame* FocusController::focusedOrMainFrame() const | 263 LocalFrame* FocusController::focusedOrMainFrame() const |
262 { | 264 { |
263 if (LocalFrame* frame = focusedFrame()) | 265 if (LocalFrame* frame = focusedFrame()) |
264 return frame; | 266 return frame; |
265 return m_page->mainFrame(); | 267 return m_page->mainFrame(); |
266 } | 268 } |
267 | 269 |
268 void FocusController::setFocused(bool focused) | 270 void FocusController::setFocused(bool focused) |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 904 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
903 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type,
container); | 905 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type,
container); |
904 if (container && container->isDocumentNode()) | 906 if (container && container->isDocumentNode()) |
905 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 907 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
906 } while (!consumed && container); | 908 } while (!consumed && container); |
907 | 909 |
908 return consumed; | 910 return consumed; |
909 } | 911 } |
910 | 912 |
911 } // namespace WebCore | 913 } // namespace WebCore |
OLD | NEW |