| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (oldFrame && oldFrame->view()) { | 190 if (oldFrame && oldFrame->view()) { |
| 191 oldFrame->selection()->setFocused(false); | 191 oldFrame->selection()->setFocused(false); |
| 192 oldFrame->document()->dispatchWindowEvent(Event::create(eventNames().blu
rEvent, false, false)); | 192 oldFrame->document()->dispatchWindowEvent(Event::create(eventNames().blu
rEvent, false, false)); |
| 193 } | 193 } |
| 194 | 194 |
| 195 if (newFrame && newFrame->view() && isFocused()) { | 195 if (newFrame && newFrame->view() && isFocused()) { |
| 196 newFrame->selection()->setFocused(true); | 196 newFrame->selection()->setFocused(true); |
| 197 newFrame->document()->dispatchWindowEvent(Event::create(eventNames().foc
usEvent, false, false)); | 197 newFrame->document()->dispatchWindowEvent(Event::create(eventNames().foc
usEvent, false, false)); |
| 198 } | 198 } |
| 199 | 199 |
| 200 m_page->chrome()->focusedFrameChanged(newFrame.get()); | |
| 201 | |
| 202 m_isChangingFocusedFrame = false; | 200 m_isChangingFocusedFrame = false; |
| 203 } | 201 } |
| 204 | 202 |
| 205 Frame* FocusController::focusedOrMainFrame() const | 203 Frame* FocusController::focusedOrMainFrame() const |
| 206 { | 204 { |
| 207 if (Frame* frame = focusedFrame()) | 205 if (Frame* frame = focusedFrame()) |
| 208 return frame; | 206 return frame; |
| 209 return m_page->mainFrame(); | 207 return m_page->mainFrame(); |
| 210 } | 208 } |
| 211 | 209 |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); | 869 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b
order */); |
| 872 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); | 870 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct
ion, container); |
| 873 if (container && container->isDocumentNode()) | 871 if (container && container->isDocumentNode()) |
| 874 toDocument(container)->updateLayoutIgnorePendingStylesheets(); | 872 toDocument(container)->updateLayoutIgnorePendingStylesheets(); |
| 875 } while (!consumed && container); | 873 } while (!consumed && container); |
| 876 | 874 |
| 877 return consumed; | 875 return consumed; |
| 878 } | 876 } |
| 879 | 877 |
| 880 } // namespace WebCore | 878 } // namespace WebCore |
| OLD | NEW |