Bug 204924 - Fix inspector/css test assertions after r253158
Summary: Fix inspector/css test assertions after r253158
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-05 15:14 PST by Simon Fraser (smfr)
Modified: 2019-12-05 15:30 PST (History)
10 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2019-12-05 15:14 PST, Simon Fraser (smfr)
hi: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-12-05 15:14:19 PST
Fix inspector/css test assertions after r253158
Comment 1 Simon Fraser (smfr) 2019-12-05 15:14:58 PST
Created attachment 384967 [details]
Patch
Comment 2 EWS Watchlist 2019-12-05 15:16:08 PST
This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment 3 Devin Rousso 2019-12-05 15:20:52 PST
Comment on attachment 384967 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384967&action=review

r=me, with one additional fix

> Source/WebCore/ChangeLog:8
> +        No new tests (OOPS!).

Oops.

> Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:754
> +    Highlight: "highlight",

In addition to this, I think the only thing that's necessary for the Web Inspector frontend to handle this is adding the following to `WI.CSSManager.displayNameForPseudoId`:
```
    case CSSManager.PseudoSelectorNames.Highlight:
        return WI.unlocalizedString("::highlight");
```
Without this, the Web Inspector frontend would log an error to the console.  I'd rather fix both the backend `ASSERT` and any frontend requirements at the same time.

It's not necessary to add it to the switch-case inside the `if (!InspectorBackend.Enum.CSS.PseudoId)` as that's only used for compatibility purposes when inspecting older webpages, meaning that path won't be taken when inspecting a page that has `PseudoId::Highlight` defined.
Comment 4 Simon Fraser (smfr) 2019-12-05 15:29:19 PST
https://trac.webkit.org/changeset/253176/webkit
Comment 5 Radar WebKit Bug Importer 2019-12-05 15:30:25 PST
<rdar://problem/57679991>