Bug 139307 - Web Inspector: Hide Compositing Borders Button if backend returns an error that it is unsupported
Summary: Web Inspector: Hide Compositing Borders Button if backend returns an error th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-12-05 12:13 PST by Joseph Pecoraro
Modified: 2014-12-10 15:30 PST (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.45 KB, patch)
2014-12-05 13:25 PST, Joseph Pecoraro
darin: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 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.
Comment 1 Radar WebKit Bug Importer 2014-12-05 12:14:19 PST
<rdar://problem/19159939>
Comment 2 Joseph Pecoraro 2014-12-05 13:25:14 PST
Created attachment 242655 [details]
[PATCH] Proposed Fix
Comment 3 Darin Adler 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";
Comment 4 Joseph Pecoraro 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.
Comment 5 Joseph Pecoraro 2014-12-10 15:30:54 PST
http://trac.webkit.org/changeset/177108