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

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

Issue 1180843005: Change private API names and return type in FocusController (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more conversion Created 5 years, 6 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/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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 DECLARE_TRACE(); 71 DECLARE_TRACE();
72 72
73 private: 73 private:
74 explicit FocusController(Page*); 74 explicit FocusController(Page*);
75 75
76 bool advanceFocus(WebFocusType, bool initialFocus); 76 bool advanceFocus(WebFocusType, bool initialFocus);
77 bool advanceFocusDirectionally(WebFocusType); 77 bool advanceFocusDirectionally(WebFocusType);
78 bool advanceFocusInDocumentOrder(WebFocusType, bool initialFocus); 78 bool advanceFocusInDocumentOrder(WebFocusType, bool initialFocus);
79 79
80 Node* findFocusableNodeAcrossFocusScopes(WebFocusType, const FocusNavigation Scope&, Node*); 80 Element* findFocusableElementAcrossFocusScopes(WebFocusType, const FocusNavi gationScope&, Node*);
81 Node* findFocusableNodeAcrossFocusScopesForward(const FocusNavigationScope&, Node*); 81 Element* findFocusableElementAcrossFocusScopesForward(const FocusNavigationS cope&, Node*);
82 Node* findFocusableNodeAcrossFocusScopesBackward(const FocusNavigationScope& , Node*); 82 Element* findFocusableElementAcrossFocusScopesBackward(const FocusNavigation Scope&, Node*);
83 83
84 Element* findFocusableElementRecursively(WebFocusType, const FocusNavigation Scope&, Node*); 84 Element* findFocusableElementRecursively(WebFocusType, const FocusNavigation Scope&, Node*);
85 Element* findFocusableElementRecursivelyForward(const FocusNavigationScope&, Node*); 85 Element* findFocusableElementRecursivelyForward(const FocusNavigationScope&, Node*);
86 Element* findFocusableElementRecursivelyBackward(const FocusNavigationScope& , Node*); 86 Element* findFocusableElementRecursivelyBackward(const FocusNavigationScope& , Node*);
87 87
88 Node* findFocusableNodeDecendingDownIntoFrameDocument(WebFocusType, Node*); 88 Element* findFocusableElementDescendingDownIntoFrameDocument(WebFocusType, E lement*);
89 89
90 // Searches through the given tree scope, starting from start node, for the next/previous 90 // Searches through the given tree scope, starting from start node, for the next/previous
91 // selectable element that comes after/before start node. 91 // selectable element that comes after/before start node.
92 // The order followed is as specified in the HTML spec[1], which is elements with tab indexes 92 // The order followed is as specified in the HTML spec[1], which is elements with tab indexes
93 // first (from lowest to highest), and then elements without tab indexes (in document order). 93 // first (from lowest to highest), and then elements without tab indexes (in document order).
94 // The search algorithm also conforms the Shadow DOM spec[2], which inserts sequence in a shadow 94 // The search algorithm also conforms the Shadow DOM spec[2], which inserts sequence in a shadow
95 // tree into its host. 95 // tree into its host.
96 // 96 //
97 // @param start The node from which to start searching. The node after this will be focused. 97 // @param start The node from which to start searching. The node after this will be focused.
98 // May be null. 98 // May be null.
99 // @return The focus node that comes after/before start node. 99 // @return The focus node that comes after/before start node.
100 // 100 //
101 // [1] https://html.spec.whatwg.org/multipage/interaction.html#sequential-fo cus-navigation 101 // [1] https://html.spec.whatwg.org/multipage/interaction.html#sequential-fo cus-navigation
102 // [2] https://w3c.github.io/webcomponents/spec/shadow/#focus-navigation 102 // [2] https://w3c.github.io/webcomponents/spec/shadow/#focus-navigation
103 inline Element* findFocusableElement(WebFocusType, const FocusNavigationScop e&, Node* start); 103 inline Element* findFocusableElement(WebFocusType, const FocusNavigationScop e&, Node* start);
104 104
105 bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, WebFocusType); 105 bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, WebFocusType);
106 void findFocusCandidateInContainer(Node& container, const LayoutRect& starti ngRect, WebFocusType, FocusCandidate& closest); 106 void findFocusCandidateInContainer(Node& container, const LayoutRect& starti ngRect, WebFocusType, FocusCandidate& closest);
107 107
108 RawPtrWillBeMember<Page> m_page; 108 RawPtrWillBeMember<Page> m_page;
109 RefPtrWillBeMember<Frame> m_focusedFrame; 109 RefPtrWillBeMember<Frame> m_focusedFrame;
110 bool m_isActive; 110 bool m_isActive;
111 bool m_isFocused; 111 bool m_isFocused;
112 bool m_isChangingFocusedFrame; 112 bool m_isChangingFocusedFrame;
113 }; 113 };
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif // FocusController_h 117 #endif // FocusController_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698