[Webkit-unassigned] [Bug 109340] New: Web Inspector: protocol should support setStyleText

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 8 20:22:42 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=109340

           Summary: Web Inspector: protocol should support setStyleText
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: timothy at apple.com
                CC: keishi at webkit.org, pmuellr at yahoo.com,
                    pfeldman at chromium.org, yurys at chromium.org,
                    apavlov at chromium.org, loislo at chromium.org,
                    vsevik at chromium.org,
                    web-inspector-bugs at googlegroups.com


You should be able to edit a whole CSSStyleDeclaration (like you can in the CSSOM with the cssText property).

Something like:

            {
                "name": "setStyleText",
                "parameters": [
                    { "name": "styleId", "$ref": "CSSStyleId" },
                    { "name": "text", "type": "string" },
                ],
                "returns": [
                    { "name": "style", "$ref": "CSSStyle", "description": "The resulting style after the text modification." }
                ],
                "description": "Sets the new <code>text</code> for the respective style."
            },

I understand you can get this crudely by using getStyleSheetText, replace the range gotten from the CSSStyle, then call setStyleSheetText. But that is fairly heavy handed, and would cause a world update for all rules in that stylesheet instead of a single rule.

Having this setStyleText call would allow features like free-form editing of inline styles or rules in the sidebar, instead of individual property editing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list