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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.h

Issue 1174893002: Implement ShadowRoot.delegatesFocus 1/4 (focus navigation) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for nit review comment 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 | « Source/core/dom/Element.cpp ('k') | Source/core/dom/shadow/ShadowRoot.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ShadowRoot* olderShadowRoot() const { return next(); } 117 ShadowRoot* olderShadowRoot() const { return next(); }
118 118
119 String innerHTML() const; 119 String innerHTML() const;
120 void setInnerHTML(const String&, ExceptionState&); 120 void setInnerHTML(const String&, ExceptionState&);
121 121
122 PassRefPtrWillBeRawPtr<Node> cloneNode(bool, ExceptionState&); 122 PassRefPtrWillBeRawPtr<Node> cloneNode(bool, ExceptionState&);
123 PassRefPtrWillBeRawPtr<Node> cloneNode(ExceptionState& exceptionState) { ret urn cloneNode(true, exceptionState); } 123 PassRefPtrWillBeRawPtr<Node> cloneNode(ExceptionState& exceptionState) { ret urn cloneNode(true, exceptionState); }
124 124
125 StyleSheetList* styleSheets(); 125 StyleSheetList* styleSheets();
126 126
127 void setDelegatesFocus(bool flag) { m_delegatesFocus = flag; }
128 bool delegatesFocus() const { return m_delegatesFocus; }
129
127 DECLARE_VIRTUAL_TRACE(); 130 DECLARE_VIRTUAL_TRACE();
128 131
129 private: 132 private:
130 ShadowRoot(Document&, ShadowRootType); 133 ShadowRoot(Document&, ShadowRootType);
131 virtual ~ShadowRoot(); 134 virtual ~ShadowRoot();
132 135
133 #if !ENABLE(OILPAN) 136 #if !ENABLE(OILPAN)
134 virtual void dispose() override; 137 virtual void dispose() override;
135 #endif 138 #endif
136 139
(...skipping 11 matching lines...) Expand all
148 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888 34 151 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888 34
149 bool isOrphan() const { return !host(); } 152 bool isOrphan() const { return !host(); }
150 153
151 RawPtrWillBeMember<ShadowRoot> m_prev; 154 RawPtrWillBeMember<ShadowRoot> m_prev;
152 RawPtrWillBeMember<ShadowRoot> m_next; 155 RawPtrWillBeMember<ShadowRoot> m_next;
153 OwnPtrWillBeMember<ShadowRootRareData> m_shadowRootRareData; 156 OwnPtrWillBeMember<ShadowRootRareData> m_shadowRootRareData;
154 unsigned m_numberOfStyles : 27; 157 unsigned m_numberOfStyles : 27;
155 unsigned m_type : 1; 158 unsigned m_type : 1;
156 unsigned m_registeredWithParentShadowRoot : 1; 159 unsigned m_registeredWithParentShadowRoot : 1;
157 unsigned m_descendantInsertionPointsIsValid : 1; 160 unsigned m_descendantInsertionPointsIsValid : 1;
161 unsigned m_delegatesFocus : 1;
158 }; 162 };
159 163
160 inline Element* ShadowRoot::activeElement() const 164 inline Element* ShadowRoot::activeElement() const
161 { 165 {
162 return adjustedFocusedElement(); 166 return adjustedFocusedElement();
163 } 167 }
164 168
165 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); 169 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot());
166 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot()); 170 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot());
167 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); 171 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true);
168 172
169 } // namespace blink 173 } // namespace blink
170 174
171 #endif // ShadowRoot_h 175 #endif // ShadowRoot_h
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698