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

Side by Side Diff: Source/core/accessibility/AccessibilityNodeObject.cpp

Issue 17381010: Introduce toHTMLFormControlElement, and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 return !node->rendererIsEditable(); 697 return !node->rendererIsEditable();
698 } 698 }
699 699
700 bool AccessibilityNodeObject::isRequired() const 700 bool AccessibilityNodeObject::isRequired() const
701 { 701 {
702 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) 702 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true"))
703 return true; 703 return true;
704 704
705 Node* n = this->node(); 705 Node* n = this->node();
706 if (n && (n->isElementNode() && toElement(n)->isFormControlElement())) 706 if (n && (n->isElementNode() && toElement(n)->isFormControlElement()))
707 return static_cast<HTMLFormControlElement*>(n)->isRequired(); 707 return toHTMLFormControlElement(n)->isRequired();
708 708
709 return false; 709 return false;
710 } 710 }
711 711
712 bool AccessibilityNodeObject::canSetFocusAttribute() const 712 bool AccessibilityNodeObject::canSetFocusAttribute() const
713 { 713 {
714 Node* node = this->node(); 714 Node* node = this->node();
715 if (!node) 715 if (!node)
716 return false; 716 return false;
717 717
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 useTextUnderElement = true; 1626 useTextUnderElement = true;
1627 1627
1628 if (useTextUnderElement) { 1628 if (useTextUnderElement) {
1629 String text = textUnderElement(); 1629 String text = textUnderElement();
1630 if (!text.isEmpty()) 1630 if (!text.isEmpty())
1631 textOrder.append(AccessibilityText(text, ChildrenText)); 1631 textOrder.append(AccessibilityText(text, ChildrenText));
1632 } 1632 }
1633 } 1633 }
1634 1634
1635 } // namespace WebCore 1635 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebSearchableFormData.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698