Bug 148436

Summary: Web Inspector: Styles sidebar says Media: all when it should say Media: screen
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, hi, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Screenshot
none
Patch
none
Patch none

Description Timothy Hatcher 2015-08-25 10:53:24 PDT
Created attachment 259860 [details]
Screenshot

On daring fireball.net, the stylesheets are media="screen", however the sidebar says Media: all.

The Copy Rule context menu does include the media as screen, so the data is there we are just showing the wrong thing.
Comment 1 Radar WebKit Bug Importer 2015-08-25 10:53:42 PDT
<rdar://problem/22421857>
Comment 2 Devin Rousso 2015-09-10 12:53:56 PDT
Created attachment 260943 [details]
Patch
Comment 3 BJ Burg 2015-09-10 12:56:52 PDT
Comment on attachment 260943 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js:193
> +            var currentMediaList = style.ownerRule && style.ownerRule.mediaList;

This change removes the fallback to [] if both are null. Maybe you should add || [] ?
Comment 4 Devin Rousso 2015-09-10 12:59:54 PDT
(In reply to comment #3)
> This change removes the fallback to [] if both are null. Maybe you should
> add || [] ?

It shouldn't be an issue when both are null, but I can see an issue when only one is null and the other isn't.  I'll add that now.
Comment 5 Devin Rousso 2015-09-10 13:04:32 PDT
Created attachment 260944 [details]
Patch
Comment 6 WebKit Commit Bot 2015-09-10 14:54:42 PDT
Comment on attachment 260944 [details]
Patch

Clearing flags on attachment: 260944

Committed r189593: <http://trac.webkit.org/changeset/189593>
Comment 7 WebKit Commit Bot 2015-09-10 14:54:46 PDT
All reviewed patches have been landed.  Closing bug.