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

Side by Side Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Document.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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 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 * 7 *
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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 return; 936 return;
937 Document* document = toFrameView(scrollBar->parent())->frame()->document (); 937 Document* document = toFrameView(scrollBar->parent())->frame()->document ();
938 if (document != document->topDocument()) 938 if (document != document->topDocument())
939 return; 939 return;
940 obj = get(document->renderer()); 940 obj = get(document->renderer());
941 } 941 }
942 942
943 if (!obj || !obj->document() || !obj->documentFrameView() || !obj->documentF rameView()->frame() || !obj->documentFrameView()->frame()->page()) 943 if (!obj || !obj->document() || !obj->documentFrameView() || !obj->documentF rameView()->frame() || !obj->documentFrameView()->frame()->page())
944 return; 944 return;
945 945
946 ChromeClient* client = obj->documentFrameView()->frame()->page()->chrome().c lient(); 946 ChromeClient& client = obj->documentFrameView()->frame()->page()->chrome().c lient();
947 if (!client)
948 return;
949 947
950 switch (notification) { 948 switch (notification) {
951 case AXActiveDescendantChanged: 949 case AXActiveDescendantChanged:
952 if (!obj->document()->focusedElement() || (obj->node() != obj->document( )->focusedElement())) 950 if (!obj->document()->focusedElement() || (obj->node() != obj->document( )->focusedElement()))
953 break; 951 break;
954 952
955 // Calling handleFocusedUIElementChanged will focus the new active 953 // Calling handleFocusedUIElementChanged will focus the new active
956 // descendant and send the AXFocusedUIElementChanged notification. 954 // descendant and send the AXFocusedUIElementChanged notification.
957 handleFocusedUIElementChanged(0, obj->document()->focusedElement()); 955 handleFocusedUIElementChanged(0, obj->document()->focusedElement());
958 break; 956 break;
(...skipping 12 matching lines...) Expand all
971 case AXRowCountChanged: 969 case AXRowCountChanged:
972 case AXRowExpanded: 970 case AXRowExpanded:
973 case AXScrolledToAnchor: 971 case AXScrolledToAnchor:
974 case AXSelectedChildrenChanged: 972 case AXSelectedChildrenChanged:
975 case AXSelectedTextChanged: 973 case AXSelectedTextChanged:
976 case AXTextChanged: 974 case AXTextChanged:
977 case AXValueChanged: 975 case AXValueChanged:
978 break; 976 break;
979 } 977 }
980 978
981 client->postAccessibilityNotification(obj, notification); 979 client.postAccessibilityNotification(obj, notification);
982 } 980 }
983 981
984 void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject*, AXT extChange, unsigned, const String&) 982 void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject*, AXT extChange, unsigned, const String&)
985 { 983 {
986 } 984 }
987 985
988 void AXObjectCache::handleFocusedUIElementChanged(Node*, Node* newFocusedNode) 986 void AXObjectCache::handleFocusedUIElementChanged(Node*, Node* newFocusedNode)
989 { 987 {
990 if (!newFocusedNode) 988 if (!newFocusedNode)
991 return; 989 return;
(...skipping 12 matching lines...) Expand all
1004 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) 1002 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode)
1005 { 1003 {
1006 // The anchor node may not be accessible. Post the notification for the 1004 // The anchor node may not be accessible. Post the notification for the
1007 // first accessible object. 1005 // first accessible object.
1008 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode( anchorNode), AXScrolledToAnchor); 1006 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode( anchorNode), AXScrolledToAnchor);
1009 } 1007 }
1010 1008
1011 } // namespace WebCore 1009 } // namespace WebCore
1012 1010
1013 #endif // HAVE(ACCESSIBILITY) 1011 #endif // HAVE(ACCESSIBILITY)
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698