Bug 148436 - Web Inspector: Styles sidebar says Media: all when it should say Media: screen
Summary: Web Inspector: Styles sidebar says Media: all when it should say Media: screen
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-25 10:53 PDT by Timothy Hatcher
Modified: 2015-09-10 14:54 PDT (History)
9 users (show)

See Also:


Attachments
Screenshot (672.30 KB, image/png)
2015-08-25 10:53 PDT, Timothy Hatcher
no flags Details
Patch (2.42 KB, patch)
2015-09-10 12:53 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.43 KB, patch)
2015-09-10 13:04 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.