| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 AXLabelFor, | 357 AXLabelFor, |
| 358 AXNotRendered, | 358 AXNotRendered, |
| 359 AXNotVisible, | 359 AXNotVisible, |
| 360 AXPresentationalRole, | 360 AXPresentationalRole, |
| 361 AXProbablyPresentational, | 361 AXProbablyPresentational, |
| 362 AXStaticTextUsedAsNameFor, | 362 AXStaticTextUsedAsNameFor, |
| 363 AXUninteresting | 363 AXUninteresting |
| 364 }; | 364 }; |
| 365 | 365 |
| 366 class IgnoredReason { | 366 class IgnoredReason { |
| 367 ALLOW_ONLY_INLINE_ALLOCATION(); | 367 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 368 public: | 368 public: |
| 369 AXIgnoredReason reason; | 369 AXIgnoredReason reason; |
| 370 Member<const AXObject> relatedObject; | 370 Member<const AXObject> relatedObject; |
| 371 | 371 |
| 372 explicit IgnoredReason(AXIgnoredReason reason) | 372 explicit IgnoredReason(AXIgnoredReason reason) |
| 373 : reason(reason) | 373 : reason(reason) |
| 374 , relatedObject(nullptr) | 374 , relatedObject(nullptr) |
| 375 { } | 375 { } |
| 376 | 376 |
| 377 IgnoredReason(AXIgnoredReason r, const AXObject* obj) | 377 IgnoredReason(AXIgnoredReason r, const AXObject* obj) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 397 } | 397 } |
| 398 | 398 |
| 399 DEFINE_INLINE_TRACE() | 399 DEFINE_INLINE_TRACE() |
| 400 { | 400 { |
| 401 visitor->trace(object); | 401 visitor->trace(object); |
| 402 } | 402 } |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 typedef HeapVector<Member<NameSourceRelatedObject>> AXRelatedObjectVector; | 405 typedef HeapVector<Member<NameSourceRelatedObject>> AXRelatedObjectVector; |
| 406 class NameSource { | 406 class NameSource { |
| 407 ALLOW_ONLY_INLINE_ALLOCATION(); | 407 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 408 public: | 408 public: |
| 409 String text; | 409 String text; |
| 410 bool superseded = false; | 410 bool superseded = false; |
| 411 bool invalid = false; | 411 bool invalid = false; |
| 412 AXNameFrom type = AXNameFromUninitialized; | 412 AXNameFrom type = AXNameFromUninitialized; |
| 413 const QualifiedName& attribute; | 413 const QualifiedName& attribute; |
| 414 AtomicString attributeValue; | 414 AtomicString attributeValue; |
| 415 AXTextFromNativeHTML nativeSource = AXTextFromNativeHTMLUninitialized; | 415 AXTextFromNativeHTML nativeSource = AXTextFromNativeHTMLUninitialized; |
| 416 AXRelatedObjectVector relatedObjects; | 416 AXRelatedObjectVector relatedObjects; |
| 417 | 417 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 431 { | 431 { |
| 432 visitor->trace(relatedObjects); | 432 visitor->trace(relatedObjects); |
| 433 } | 433 } |
| 434 }; | 434 }; |
| 435 | 435 |
| 436 class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> { | 436 class MODULES_EXPORT AXObject : public GarbageCollectedFinalized<AXObject> { |
| 437 public: | 437 public: |
| 438 typedef HeapVector<Member<AXObject>> AXObjectVector; | 438 typedef HeapVector<Member<AXObject>> AXObjectVector; |
| 439 | 439 |
| 440 struct AXRange { | 440 struct AXRange { |
| 441 ALLOW_ONLY_INLINE_ALLOCATION(); | 441 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 442 // The deepest descendant in which the range starts. | 442 // The deepest descendant in which the range starts. |
| 443 // (nullptr means the current object.) | 443 // (nullptr means the current object.) |
| 444 Persistent<AXObject> anchorObject; | 444 Persistent<AXObject> anchorObject; |
| 445 // The number of characters and child objects in the anchor object | 445 // The number of characters and child objects in the anchor object |
| 446 // before the range starts. | 446 // before the range starts. |
| 447 int anchorOffset; | 447 int anchorOffset; |
| 448 // The deepest descendant in which the range ends. | 448 // The deepest descendant in which the range ends. |
| 449 // (nullptr means the current object.) | 449 // (nullptr means the current object.) |
| 450 Persistent<AXObject> focusObject; | 450 Persistent<AXObject> focusObject; |
| 451 // The number of characters and child objects in the focus object | 451 // The number of characters and child objects in the focus object |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 | 937 |
| 938 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 938 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 939 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 939 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 940 | 940 |
| 941 } // namespace blink | 941 } // namespace blink |
| 942 | 942 |
| 943 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); | 943 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); |
| 944 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); | 944 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); |
| 945 | 945 |
| 946 #endif // AXObject_h | 946 #endif // AXObject_h |
| OLD | NEW |