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

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

Issue 10984006: Merge 129036 - AX: A few control types are returning the wrong answer for isReadOnly (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h » ('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) 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 627
628 bool AccessibilityNodeObject::isReadOnly() const 628 bool AccessibilityNodeObject::isReadOnly() const
629 { 629 {
630 Node* node = this->node(); 630 Node* node = this->node();
631 if (!node) 631 if (!node)
632 return true; 632 return true;
633 633
634 if (node->hasTagName(textareaTag)) 634 if (node->hasTagName(textareaTag))
635 return static_cast<HTMLTextAreaElement*>(node)->readOnly(); 635 return static_cast<HTMLTextAreaElement*>(node)->readOnly();
636 636
637 if (node->hasTagName(inputTag)) 637 if (node->hasTagName(inputTag)) {
638 return static_cast<HTMLInputElement*>(node)->readOnly(); 638 HTMLInputElement* input = static_cast<HTMLInputElement*>(node);
639 if (input->isTextField())
640 return input->readOnly();
641 }
639 642
640 return !node->rendererIsEditable(); 643 return !node->rendererIsEditable();
641 } 644 }
642 645
643 bool AccessibilityNodeObject::isRequired() const 646 bool AccessibilityNodeObject::isRequired() const
644 { 647 {
645 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) 648 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true"))
646 return true; 649 return true;
647 650
648 Node* n = this->node(); 651 Node* n = this->node();
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 bool AccessibilityNodeObject::hasContentEditableAttributeSet() const 1470 bool AccessibilityNodeObject::hasContentEditableAttributeSet() const
1468 { 1471 {
1469 if (!hasAttribute(contenteditableAttr)) 1472 if (!hasAttribute(contenteditableAttr))
1470 return false; 1473 return false;
1471 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr) ; 1474 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr) ;
1472 // Both "true" (case-insensitive) and the empty string count as true. 1475 // Both "true" (case-insensitive) and the empty string count as true.
1473 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableVa lue, "true"); 1476 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableVa lue, "true");
1474 } 1477 }
1475 1478
1476 } // namespace WebCore 1479 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698