Bug 28854 - Text Fields and Text Areas are reported as read-only by inspect32.exe
Summary: Text Fields and Text Areas are reported as read-only by inspect32.exe
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Brian Weinstein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 13:31 PDT by Brian Weinstein
Modified: 2009-08-31 16:46 PDT (History)
0 users

See Also:


Attachments
Fix (1.73 KB, patch)
2009-08-31 14:10 PDT, Brian Weinstein
no flags Details | Formatted Diff | Diff
Fix + Removed Testing Code (1.54 KB, patch)
2009-08-31 14:12 PDT, Brian Weinstein
darin: review-
Details | Formatted Diff | Diff
Fix + Test Case (4.85 KB, patch)
2009-08-31 16:16 PDT, Brian Weinstein
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Weinstein 2009-08-31 13:31:47 PDT
Text Fields and Text Areas are reported as read-only by inspect32.exe.

The text fields and areas that are read/write should be read/write to inspect32.exe and other tools that look at the accessibility of a node.
Comment 1 Brian Weinstein 2009-08-31 14:10:27 PDT
Created attachment 38832 [details]
Fix
Comment 2 Brian Weinstein 2009-08-31 14:12:26 PDT
Created attachment 38833 [details]
Fix + Removed Testing Code
Comment 3 Adam Roben (:aroben) 2009-08-31 14:22:36 PDT
Comment on attachment 38833 [details]
Fix + Removed Testing Code

Can you make a regression test for this?
Comment 4 Brian Weinstein 2009-08-31 14:25:48 PDT
I was having trouble with the accessibility tests on Windows, I can give it a shot though.
Comment 5 Darin Adler 2009-08-31 15:35:44 PDT
Comment on attachment 38833 [details]
Fix + Removed Testing Code

> +    if (m_renderer->isTextField()) {
> +        HTMLInputElement* input = static_cast<HTMLInputElement*>(m_renderer->node());
> +        return input->readOnly();
> +    } else if (m_renderer->isTextArea()) {
> +        HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(m_renderer->node());
> +        return textArea->readOnly();
> +    }

We normally don't do else after if.

I think the code would read fine without a local variable.

    if (m_renderer->isTextField())
        return static_cast<HTMLInputElement*>(m_renderer->node())->readOnly()

Can this be tested with a regression test? I think there are accessibility-driven regression tests. If so, please add a test.

review- because of the lack of a test. If it's not possible to test this, then feel free to put up for review again.
Comment 6 Brian Weinstein 2009-08-31 16:16:01 PDT
Created attachment 38842 [details]
Fix + Test Case
Comment 7 Brian Weinstein 2009-08-31 16:46:35 PDT
Committed in http://trac.webkit.org/changeset/47915.