mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-01 05:43:46 +00:00
152387 - prefs for location bar autocomplete don't stick. r=caillon sr=ben
This commit is contained in:
parent
4e48f11acc
commit
67ea8be42a
@ -87,6 +87,8 @@ function nsWidgetStateManager ( aFrameID )
|
||||
{ get: wsm.get_Textbox, set: wsm.set_Textbox },
|
||||
listitem:
|
||||
{ get: wsm.get_Listitem, set: wsm.set_Listitem },
|
||||
data:
|
||||
{ get: wsm.get_Data, set: wsm.set_Data },
|
||||
default_handler:
|
||||
{ get: wsm.get_Default, set: wsm.set_Default }
|
||||
}
|
||||
@ -198,7 +200,7 @@ nsWidgetStateManager.prototype =
|
||||
{
|
||||
if (property == "localname")
|
||||
continue;
|
||||
if ( !aDataObject[property] )
|
||||
if ( !aDataObject[property] && typeof aDataObject[property] == "boolean")
|
||||
aElement.removeAttribute( property );
|
||||
else
|
||||
aElement.setAttribute( property, aDataObject[property] );
|
||||
@ -365,6 +367,32 @@ nsWidgetStateManager.prototype =
|
||||
return null;
|
||||
},
|
||||
|
||||
// <data>
|
||||
set_Data:
|
||||
function ( aElementID, aDataObject )
|
||||
{
|
||||
|
||||
var element = wsm.contentArea.document.getElementById( aElementID );
|
||||
wsm.generic_Set( element, aDataObject );
|
||||
if( 'value' in aDataObject )
|
||||
{
|
||||
element.setAttribute("value", aDataObject.value);
|
||||
}
|
||||
},
|
||||
|
||||
get_Data:
|
||||
function ( aElementID )
|
||||
{
|
||||
var element = wsm.contentArea.document.getElementById( aElementID );
|
||||
var dataObject = wsm.generic_Get( element );
|
||||
if( dataObject )
|
||||
{
|
||||
dataObject.value = element.getAttribute( "value" );
|
||||
return dataObject;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
// <default>
|
||||
set_Default:
|
||||
function ( aElementID, aDataObject )
|
||||
|
Loading…
Reference in New Issue
Block a user