Bug 139307

Summary: Web Inspector: Hide Compositing Borders Button if backend returns an error that it is unsupported
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix darin: review+, joepeck: commit-queue-

Joseph Pecoraro
Reported 2014-12-05 12:13:44 PST
* SUMMARY Hide Compositing Borders Button if backend returns an error that it is unsupported. With augmentative agents, some protocol methods exist in the BackendCommands but may be unsupported by the backend. For now, somethings can just respond as "unsupported" and we can update the UI appropriately. Things like CompositingBorders where we always send a request. We may need to look into an alternative solution since we don't want an "isSupported" for every operation. This is just easy since we always make the request.
Attachments
[PATCH] Proposed Fix (1.45 KB, patch)
2014-12-05 13:25 PST, Joseph Pecoraro
darin: review+
joepeck: commit-queue-
Radar WebKit Bug Importer
Comment 1 2014-12-05 12:14:19 PST
Joseph Pecoraro
Comment 2 2014-12-05 13:25:14 PST
Created attachment 242655 [details] [PATCH] Proposed Fix
Darin Adler
Comment 3 2014-12-09 14:44:02 PST
Comment on attachment 242655 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=242655&action=review > Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:450 > + if (error === "unsupported") > + button.enabled = false; Is this really a one-shot? I would have expected this to say: button.enabled = error !== "unsupported";
Joseph Pecoraro
Comment 4 2014-12-09 15:12:22 PST
Comment on attachment 242655 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=242655&action=review >> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:450 >> + button.enabled = false; > > Is this really a one-shot? I would have expected this to say: > > button.enabled = error !== "unsupported"; You're right, it isn't exactly a one-shot. It would happen each time the DOMTreeContentView is shown. I'll take your suggestion, this is not performance sensitive.
Joseph Pecoraro
Comment 5 2014-12-10 15:30:54 PST
Note You need to log in before you can comment on or make changes to this bug.