function(propertyText, majorChange, userCallback)
    {
        function enabledCallback(style)
        {
            if (style)
                WebInspector.cssModel._styleSheetChanged(style.id.styleSheetId, majorChange);
            if (userCallback)
                userCallback(style);
        }

        function callback(stylePayload)
        {
            if (stylePayload) {
                this.text = propertyText;
                var style = WebInspector.CSSStyleDeclaration.parsePayload(stylePayload);
                var newProperty = style.allProperties[this.index];

                if (newProperty && this.disabled && !propertyText.match(/^\s*$/)) {
                    newProperty.setDisabled(false, enabledCallback);
                    return;
                } else
                    WebInspector.cssModel._styleSheetChanged(style.id.styleSheetId, majorChange);
                if (userCallback)
                    userCallback(style);
            } else {
                if (userCallback)
                    userCallback(null);
            }
        }

        if (!this.ownerStyle)
            throw "No ownerStyle for property";

        // An index past all the properties adds a new property to the style.
        InspectorBackend.setPropertyText(this.ownerStyle.id, this.index, propertyText, this.index < this.ownerStyle.pastLastSourcePropertyIndex(), callback.bind(this));
    }
function(propertyText, majorChange, userCallback)
    {
        function enabledCallback(style)
        {
            if (style)
                WebInspector.cssModel._styleSheetChanged(style.id.styleSheetId, majorChange);
            if (userCallback)
                userCallback(style);
        }

        function callback(stylePayload)
        {
            if (stylePayload) {
                this.text = propertyText;
                var style = WebInspector.CSSStyleDeclaration.parsePayload(stylePayload);
                var newProperty = style.allProperties[this.index];

                if (newProperty && this.disabled && !propertyText.match(/^\s*$/)) {
                    newProperty.setDisabled(false, enabledCallback);
                    return;
                } else
                    WebInspector.cssModel._styleSheetChanged(style.id.styleSheetId, majorChange);
                if (userCallback)
                    userCallback(style);
            } else {
                if (userCallback)
                    userCallback(null);
            }
        }

        if (!this.ownerStyle)
            throw "No ownerStyle for property";

        // An index past all the properties adds a new property to the style.
        InspectorBackend.setPropertyText(this.ownerStyle.id, this.index, propertyText, this.index < this.ownerStyle.pastLastSourcePropertyIndex(), callback.bind(this));
    }
function ( propertyText , majorChange , userCallback ) { function enabledCallback ( style ) { if ( style ) WebInspector . cssModel . _styleSheetChanged ( style . id . styleSheetId , majorChange ) ; if ( userCallback ) userCallback ( style ) ; } function callback ( stylePayload ) { if ( stylePayload ) { this . text = propertyText ; var style = WebInspector . CSSStyleDeclaration . parsePayload ( stylePayload ) ; var newProperty = style . allProperties [ this . index ] ; if ( newProperty && this . disabled && ! propertyText . match ( / ^\s*$ / ) ) { newProperty . setDisabled ( false , enabledCallback ) ; return ; } else WebInspector . cssModel . _styleSheetChanged ( style . id . styleSheetId , majorChange ) ; if ( userCallback ) userCallback ( style ) ; } else { if ( userCallback ) userCallback ( null ) ; } } if ( ! this . ownerStyle ) throw "No ownerStyle for property" ; // An index past all the properties adds a new property to the style. InspectorBackend . setPropertyText ( this . ownerStyle . id , this . index , propertyText , this . index < this . ownerStyle . pastLastSourcePropertyIndex ( ) , callback . bind ( this ) ) ; }
Replaces "propertyName: propertyValue [!important];" in the stylesheet by an arbitrary propertyText.
Replaces propertyName : propertyValue [ !important ] ; in the stylesheet by an arbitrary propertyText .
Set the text of the property