Closed Bug 737766 Opened 12 years ago Closed 10 years ago

Firefox can't save the homepage.

Categories

(Firefox :: Disability Access, defect)

9 Branch
x86
Solaris
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: tim.miao, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [good first bug][lang=c++])

Steps to reproduce:
1. Launch ff 9.0.1 and accerciser.
2. Open firefox preferences window.
3. Poke to HomePage text entry in accerciser.
4. Change firefox home page in accerciser with following methods in ipython console:
acc.queryEditableText().setTextContents('www.oracle.com')
5. Click Close button to close ff preference dialog.
6. Re-open firefox preferences dialog.

Bug observations:
Firefox homepage is not changed.
So it sounds when the text of HomePage textbox is changed programmatically (a11y uses nsIPlaintextEditor::InsertText method) then preference dialog doesn't update homepage. Dao, can you think of the way to fix this?
Does backing out bug 595356 fix this?
(In reply to Dão Gottwald [:dao] from comment #3)
> Does backing out bug 595356 fix this?

Marco, do you have a minute to check it?
(In reply to Dão Gottwald [:dao] from comment #3)
> Does backing out bug 595356 fix this?

No, it doesn't fix it.
It is broken since Firefox 3.5.

I also tested Firefox 3.0.19, but although insertText or setTextContents returns True, the home page text field is always empty.
The firefox a11y automation test cases can be run on firefox6, setting text value through a11y api does work.
(In reply to Ginn Chen from comment #5)
> (In reply to Dão Gottwald [:dao] from comment #3)
> > Does backing out bug 595356 fix this?
> 
> No, it doesn't fix it.

Dão, other ideas? Can you point the code where the value of HomePage text entry is stored?
For preference binding, a11y API setTextContents or insertText doesn't trigger onxblinput or onxblchange event.

See preferences.xml
thank you, Ginn. I think oninput and onchange events trigger on user input only so our calls into nsIPlaintextEditor don't trigger them. 

Ehsan, do you have ideas?
IIRC we only fire those events if the key entry actually happens, and the event is trusted.  That's true for the input event, but I'm not completely sure about the change event.
Ehsan, how about if we generate input event when the text is changed by accessibility API? Technically 3d party softwares catches the user input from other devices and change the text via accessibility API.
Maybe we could fire an input and a change event. According to HTML specifications [1] it might be the more appropriate behaviour.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #13)
> Maybe we could fire an input and a change event. According to HTML
> specifications [1] it might be the more appropriate behaviour.

when a11y is used, right? How can I fire DOM event?
(In reply to alexander :surkov from comment #14)
> when a11y is used, right?

Yes.

> How can I fire DOM event?

You can use nsContentUtils::DispatchTrustedEvent.
See: https://mxr.mozilla.org/mozilla-central/source/content/base/public/nsContentUtils.h#957

Is there any specification for that kind of a11y methods? Or that's something highly Mozilla specific?
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #15)

> Is there any specification for that kind of a11y methods? Or that's
> something highly Mozilla specific?

each platform has own API. For example, on Windows we expose IAccessible2, here's IAccessibleEditableText idl we use http://accessibility.linuxfoundation.org/a11yspecs/ia2/api/AccessibleEditableText.idl
fire 'input' event as described in comment #15 for nsHyperTextAccessible methods:
1) SetTextContents
2) InsertText
3) CutText
4) DeleteText
5) PasteText
Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++]
Hello,
i want to work on this bug.This seems suitable to me. i have recently learned c.
So, by solving it want to enhance my knowledge.
Hi,

Is this being worked on by chandankumar? Or could I have a shot at it. I am a newbie to Firefox. This will be my first bug, so would need some pointers in the right direction to start with.
I was not even aware of the bug I was assigned to mentor. Sorry for the late answer.

I haven't heard on anybody working on it yet.
So if nobody else is working, I would like to start. Could I get some pointers, as I am just starting and have no clue on where to start. And if it is ok, you could assign the bug to me.
The accessibility code is in accessible/

The comments above give a pretty good idea of what is to be done.

You need to:

1. get the source code https://developer.mozilla.org/en-US/docs/Developer_Guide/Source_Code/Mercurial
2. build mozilla (on Linux) https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Linux_Prerequisites

if you have any question, we are on the #accessibility IRC channel on irc.mozilla.org.
Assignee: nobody → mohangorai
I could reproduce the issue on firefox 15.0.1 on ubuntu 12.04 machine. I was looking at the code responsible for this. For the invocation,  acc.queryEditableText().setTextContents('www.oracle.com') in comment #1 . I was looking for the queryEditableText() method for a Accessible object, but couldn't find any method. What are the classes which are responsible for updating the text elements. I couldn't find "nsHyperTextAccessible" class anywhere in the source tree.
(In reply to gmr from comment #23)
> I couldn't find "nsHyperTextAccessible" class
> anywhere in the source tree.

it was renamed to HyperTextAccessible (http://mxr.mozilla.org/mozilla-central/source/accessible/src/generic/HyperTextAccessible.cpp)
Can you confirm that you're still working on this bug?
Flags: needinfo?(mohangorai)
Nope. Sorry I am not working on this anymore. You could reassign if someone else is interested. Thanks.
Flags: needinfo?(mohangorai)
then get it back into the pull
Assignee: mohangorai → nobody
Can this bug please be assigned to me.
Assignee: nobody → manishsin8
Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++] → [good first bug][mentor=surkov.alexander@gmail.com][lang=c++]
Due to certain unforeseen circumstances I am not be able to devote time on this.
I would get back on it as soon as I get time.

I am extremely sorry for this.
Hey,

I would love to work on this as my first bugfix , need some guidance though. 

Thanks
-Karthik
Hi, Karthik. Feel free to assign yourself the bug; if this is your first time building a Mozilla product, we have some excellent documentation about getting your development environment set up here:

https://developer.mozilla.org/en-US/docs/Developer_Guide

that should help you get started. 

Also needinfoing Alexander Surkov - Alexander, are you still available to mentor this bug?
Flags: needinfo?(surkov.alexander)
Sure, I can answer questions (steps to fix are described in comment #17)
Flags: needinfo?(surkov.alexander)
cant really seem to reproduce the bug , accerciser not detecting firefox
Hey i want to work on this bug.It will be my first bug. Please help me out with it and assign it to me
Hello, Anmol - 

If you're comfortable with Python, C++ and Accerciser (on Linux) you're welcome to give it a try. The first thing to do is to get your development environment set up.

This is a good place to start: https://developer.mozilla.org/en-US/docs/Simple_Firefox_build 

and then take a look at comment #17, above, to see what the steps to fix are, and work on a patch.
Assignee: manishsin8 → nobody
I should add that we can formally assign it to you once you've got a first patch submitted. Good luck, and please either comment in this bug or contact Alexander Surkov - the mentor for this but - if you have any questions.
Mentor: surkov.alexander
Whiteboard: [good first bug][mentor=surkov.alexander@gmail.com][lang=c++] → [good first bug][lang=c++]
hello,
i want to contribute to open source can anybody please guide me how to start?
Flags: needinfo?(surkov.alexander)
(In reply to Navneet from comment #37)
> hello,
> i want to contribute to open source can anybody please guide me how to start?

comment #31 how to start hacking on Mozilla, then comment #17 how to start working on this bug. Pls let me know if you have questions.
Flags: needinfo?(surkov.alexander)
Hi!
I want to work on this bug.
I have already read the beginner's documentation and successfully built firefox nightly.

Is this the correct build for this bug?
The homepage gets saved properly when I edit it manually in nightly.
Can you provide some information about accerciser so that I could recreate the bug? I haven't worked with it.

Thanks!
(In reply to Amanjot from comment #39)
> I have already read the beginner's documentation and successfully built
> firefox nightly.
> 
> Is this the correct build for this bug?

yes

> Can you provide some information about accerciser so that I could recreate
> the bug? I haven't worked with it.

https://wiki.gnome.org/action/show/Apps/Accerciser?action=show&redirect=Accerciser
Hi. I am new to open source community. I have read the documentation and built firefox successfully. Guide me to the next point from where i can start working on this bug.
Siddharth, can you read the comments above. A lot of people have asked this question and some good answers have been given to it. If there's still some doubt after reading the comments above, feel free to ask here.
Hello,
I want to work on this bug. I'm a newbie and still learning basics of Firefox. 
I will try my best to work on it and submit patch for it. 

Requirements mentioned by Mike Hoye [:mhoye] in his comment #35 - I am comfortable with C++ and Python and learning about Accerciser.
I am unable to reproduce this bug.

There is some bug with Fedora 20 Accerciser package bug reported https://bugzilla.redhat.com/show_bug.cgi?id=1108329
blocking-b2g: --- → fugu?
blocking-b2g: fugu? → ---
hello, i am unable to reproduce this bug using the steps given in description, is it already fixed??
(In reply to diwas joshi [:dij] from comment #45)
> hello, i am unable to reproduce this bug using the steps given in
> description, is it already fixed??

lets assume so, if the reporter can still reproduce they can always reopen.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.