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 * | 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 11 matching lines...) Expand all Loading... | |
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #include "config.h" | 29 #include "config.h" |
30 #include "core/accessibility/AXObject.h" | 30 #include "core/accessibility/AXObject.h" |
31 | 31 |
32 #include "core/InputTypeNames.h" | |
32 #include "core/accessibility/AXObjectCache.h" | 33 #include "core/accessibility/AXObjectCache.h" |
33 #include "core/dom/NodeTraversal.h" | 34 #include "core/dom/NodeTraversal.h" |
34 #include "core/editing/VisibleUnits.h" | 35 #include "core/editing/VisibleUnits.h" |
35 #include "core/editing/htmlediting.h" | 36 #include "core/editing/htmlediting.h" |
36 #include "core/frame/LocalFrame.h" | 37 #include "core/frame/LocalFrame.h" |
37 #include "core/rendering/RenderListItem.h" | 38 #include "core/rendering/RenderListItem.h" |
38 #include "core/rendering/RenderTheme.h" | 39 #include "core/rendering/RenderTheme.h" |
39 #include "core/rendering/RenderView.h" | 40 #include "core/rendering/RenderView.h" |
40 #include "platform/UserGestureIndicator.h" | 41 #include "platform/UserGestureIndicator.h" |
41 #include "platform/text/PlatformLocale.h" | 42 #include "platform/text/PlatformLocale.h" |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
623 if (!elementNode) | 624 if (!elementNode) |
624 return nullAtom; | 625 return nullAtom; |
625 | 626 |
626 if (!elementNode->isElementNode()) | 627 if (!elementNode->isElementNode()) |
627 return nullAtom; | 628 return nullAtom; |
628 | 629 |
629 Element* element = toElement(elementNode); | 630 Element* element = toElement(elementNode); |
630 return element->fastGetAttribute(attribute); | 631 return element->fastGetAttribute(attribute); |
631 } | 632 } |
632 | 633 |
634 const AtomicString& AXObject::textInputType() const | |
dmazzoni
2014/09/26 15:17:26
This looks great, but please move it to AXNodeObje
je_julie(Not used)
2014/09/27 09:05:46
Thanks. I'll update it.
On 2014/09/26 15:17:26, dm
| |
635 { | |
636 Node* elementNode = node(); | |
637 if (!elementNode) | |
638 return nullAtom; | |
639 | |
640 if (!elementNode->isElementNode() ||!isHTMLInputElement(*elementNode)) | |
dmazzoni
2014/09/26 15:17:26
nit: space between || and !
je_julie(Not used)
2014/09/27 09:05:46
Thanks, I'll update it.
On 2014/09/26 15:17:26, dm
| |
641 return nullAtom; | |
642 | |
643 Element* element = toElement(elementNode); | |
644 const AtomicString& value = element->fastGetAttribute(typeAttr); | |
645 | |
646 if (equalIgnoringCase(value, InputTypeNames::tel) || equalIgnoringCase(value , InputTypeNames::url) | |
647 || equalIgnoringCase(value, InputTypeNames::email) || equalIgnoringCase( value, InputTypeNames::search)) | |
648 return value; | |
649 | |
650 return nullAtom; | |
651 } | |
652 | |
633 bool AXObject::press() const | 653 bool AXObject::press() const |
634 { | 654 { |
635 Element* actionElem = actionElement(); | 655 Element* actionElem = actionElement(); |
636 if (!actionElem) | 656 if (!actionElem) |
637 return false; | 657 return false; |
638 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 658 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
639 actionElem->accessKeyAction(true); | 659 actionElem->accessKeyAction(true); |
640 return true; | 660 return true; |
641 } | 661 } |
642 | 662 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
894 return ToggleButtonRole; | 914 return ToggleButtonRole; |
895 if (ariaHasPopup()) | 915 if (ariaHasPopup()) |
896 return PopUpButtonRole; | 916 return PopUpButtonRole; |
897 // We don't contemplate RadioButtonRole, as it depends on the input | 917 // We don't contemplate RadioButtonRole, as it depends on the input |
898 // type. | 918 // type. |
899 | 919 |
900 return ButtonRole; | 920 return ButtonRole; |
901 } | 921 } |
902 | 922 |
903 } // namespace blink | 923 } // namespace blink |
OLD | NEW |