Closed Bug 750287 Opened 13 years ago Closed 13 years ago

don't cache is form fill enabled pref

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: tbsaunde, Assigned: capella)

References

Details

(Whiteboard: [good first bug][mentor=trev.saunders@gmail.com][lang=c++])

Attachments

(1 file, 2 obsolete files)

remove the code in accessible/src/base/nsAccessNode.cpp/h that has to do with gIsFormFillEnabled and in accessible/src/html/HTMLFormControlAccessible.cpp just check preferences::GetBoolPref() directly.
Attached patch Patch (v1) (obsolete) — Splinter Review
Initial patch attempt ... builds and tests locally.
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Attachment #620564 - Flags: feedback?(trev.saunders)
Comment on attachment 620564 [details] [diff] [review] Patch (v1) >+#include "nsIPrefService.h" > #include "nsISelectionController.h" > #include "jsapi.h" >+ if (mParent) { >+ bool isFormFillEnabled = false; >+ nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); >+ if (prefBranch) >+ prefBranch->GetBoolPref("browser.formfill.enable", &isFormFillEnabled); since your touching this exact code already use mozilla::preferneces please, if nothing else it'll make the changes here easier to be sure are correct.
Attachment #620564 - Flags: feedback?(trev.saunders)
Depends on: 750283
Attached patch Patch (v2) (obsolete) — Splinter Review
Cool tip! Much cleaner code.
Attachment #620564 - Attachment is obsolete: true
Attachment #620687 - Flags: feedback?(trev.saunders)
Blocks: 750295
Comment on attachment 620687 [details] [diff] [review] Patch (v2) > // is unattached from tree then we don't care. >- if (mParent && gIsFormFillEnabled) { >+ if (mParent && mozilla::Preferences::GetBool("browser.formfill.enable", true)) { add using namespace mozilla then you can just do preferences:: also keep the defautl as false. > // Check to see if autocompletion is allowed on this input. We don't expose > // it for password fields even though the entire password can be remembered > // for a page if the user asks it to be. However, the kind of autocomplete > // we're talking here is based on what the user types, where a popup of > // possible choices comes up. > nsAutoString autocomplete; > mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::autocomplete, > autocomplete);
Attachment #620687 - Flags: feedback?(trev.saunders) → feedback+
Mark, are you going to file new patch addressing comments or should I fix them before landing?
I'll fix this one .... I'm working you hard enough already :)
(In reply to Mark Capella [:capella] from comment #6) > I'll fix this one .... I'm working you hard enough already :) thank you. and it'd be great if you get an access to land your patches yourself. it'll be a big help also :)
Attached patch Patch (v3)Splinter Review
Final nits addressed and re-tested ...
Attachment #620687 - Attachment is obsolete: true
Attachment #621666 - Flags: review?(surkov.alexander)
Attachment #621666 - Attachment is patch: true
Comment on attachment 621666 [details] [diff] [review] Patch (v3) Review of attachment 621666 [details] [diff] [review]: ----------------------------------------------------------------- ::: accessible/src/html/HTMLFormControlAccessible.cpp @@ +498,5 @@ > return state | states::SUPPORTS_AUTOCOMPLETION; > > // No parent can mean a fake widget created for XUL textbox. If accessible > // is unattached from tree then we don't care. > + if (mParent && Preferences::GetBool("browser.formfill.enable", false)) { you don't need to pass false since it's value of default argument, I'll fix it
Attachment #621666 - Flags: review?(surkov.alexander) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: