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

Side by Side Diff: Source/WebCore/page/FocusController.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 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/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/page/Frame.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 * 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 return node; 246 return node;
247 } 247 }
248 248
249 bool FocusController::setInitialFocus(FocusDirection direction, KeyboardEvent* e vent) 249 bool FocusController::setInitialFocus(FocusDirection direction, KeyboardEvent* e vent)
250 { 250 {
251 bool didAdvanceFocus = advanceFocus(direction, event, true); 251 bool didAdvanceFocus = advanceFocus(direction, event, true);
252 252
253 // If focus is being set initially, accessibility needs to be informed that system focus has moved 253 // If focus is being set initially, accessibility needs to be informed that system focus has moved
254 // into the web area again, even if focus did not change within WebCore. Pos tNotification is called instead 254 // into the web area again, even if focus did not change within WebCore. Pos tNotification is called instead
255 // of handleFocusedUIElementChanged, because this will send the notification even if the element is the same. 255 // of handleFocusedUIElementChanged, because this will send the notification even if the element is the same.
256 if (AXObjectCache* cache = focusedOrMainFrame()->document()->existingAXObjec tCache()) 256 if (AXObjectCache::accessibilityEnabled())
257 cache->postNotification(focusedOrMainFrame()->document(), AXObjectCache: :AXFocusedUIElementChanged, true); 257 focusedOrMainFrame()->document()->axObjectCache()->postNotification(focu sedOrMainFrame()->document(), AXObjectCache::AXFocusedUIElementChanged, true);
258 258
259 return didAdvanceFocus; 259 return didAdvanceFocus;
260 } 260 }
261 261
262 bool FocusController::advanceFocus(FocusDirection direction, KeyboardEvent* even t, bool initialFocus) 262 bool FocusController::advanceFocus(FocusDirection direction, KeyboardEvent* even t, bool initialFocus)
263 { 263 {
264 switch (direction) { 264 switch (direction) {
265 case FocusDirectionForward: 265 case FocusDirectionForward:
266 case FocusDirectionBackward: 266 case FocusDirectionBackward:
267 return advanceFocusInDocumentOrder(direction, event, initialFocus); 267 return advanceFocusInDocumentOrder(direction, event, initialFocus);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */); 873 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */);
874 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container); 874 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container);
875 if (container && container->isDocumentNode()) 875 if (container && container->isDocumentNode())
876 toDocument(container)->updateLayoutIgnorePendingStylesheets(); 876 toDocument(container)->updateLayoutIgnorePendingStylesheets();
877 } while (!consumed && container); 877 } while (!consumed && container);
878 878
879 return consumed; 879 return consumed;
880 } 880 }
881 881
882 } // namespace WebCore 882 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/page/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698