OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 AXProtectedState, | 209 AXProtectedState, |
210 AXReadonlyState, | 210 AXReadonlyState, |
211 AXRequiredState, | 211 AXRequiredState, |
212 AXSelectableState, | 212 AXSelectableState, |
213 AXSelectedState, | 213 AXSelectedState, |
214 AXVerticalState, | 214 AXVerticalState, |
215 AXVisitedState | 215 AXVisitedState |
216 }; | 216 }; |
217 | 217 |
218 class AccessibilityText final : public NoBaseWillBeGarbageCollectedFinalized<Acc
essibilityText> { | 218 class AccessibilityText final : public NoBaseWillBeGarbageCollectedFinalized<Acc
essibilityText> { |
| 219 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(AccessibilityText); |
219 public: | 220 public: |
220 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text,
const AccessibilityTextSource& source) | 221 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text,
const AccessibilityTextSource& source) |
221 { | 222 { |
222 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr)); | 223 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr)); |
223 } | 224 } |
224 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text,
const AccessibilityTextSource& source, const RefPtrWillBeRawPtr<AXObject> elemen
t) | 225 static PassOwnPtrWillBeRawPtr<AccessibilityText> create(const String& text,
const AccessibilityTextSource& source, const RefPtrWillBeRawPtr<AXObject> elemen
t) |
225 { | 226 { |
226 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr)); | 227 return adoptPtrWillBeNoop(new AccessibilityText(text, source, nullptr)); |
227 } | 228 } |
228 | 229 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 { | 416 { |
416 visitor->trace(nameObjects); | 417 visitor->trace(nameObjects); |
417 } | 418 } |
418 }; | 419 }; |
419 | 420 |
420 class MODULES_EXPORT AXObject : public RefCountedWillBeGarbageCollectedFinalized
<AXObject> { | 421 class MODULES_EXPORT AXObject : public RefCountedWillBeGarbageCollectedFinalized
<AXObject> { |
421 public: | 422 public: |
422 typedef WillBeHeapVector<RefPtrWillBeMember<AXObject>> AccessibilityChildren
Vector; | 423 typedef WillBeHeapVector<RefPtrWillBeMember<AXObject>> AccessibilityChildren
Vector; |
423 | 424 |
424 struct AXRange { | 425 struct AXRange { |
| 426 ALLOW_ONLY_INLINE_ALLOCATION(); |
425 // The deepest descendant in which the range starts. | 427 // The deepest descendant in which the range starts. |
426 // (nullptr means the current object.) | 428 // (nullptr means the current object.) |
427 RefPtrWillBePersistent<AXObject> anchorObject; | 429 RefPtrWillBePersistent<AXObject> anchorObject; |
428 // The number of characters and child objects in the anchor object | 430 // The number of characters and child objects in the anchor object |
429 // before the range starts. | 431 // before the range starts. |
430 int anchorOffset; | 432 int anchorOffset; |
431 // The deepest descendant in which the range ends. | 433 // The deepest descendant in which the range ends. |
432 // (nullptr means the current object.) | 434 // (nullptr means the current object.) |
433 RefPtrWillBePersistent<AXObject> focusObject; | 435 RefPtrWillBePersistent<AXObject> focusObject; |
434 // The number of characters and child objects in the focus object | 436 // The number of characters and child objects in the focus object |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 | 921 |
920 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 922 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
921 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 923 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
922 | 924 |
923 } // namespace blink | 925 } // namespace blink |
924 | 926 |
925 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); | 927 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); |
926 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); | 928 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); |
927 | 929 |
928 #endif // AXObject_h | 930 #endif // AXObject_h |
OLD | NEW |