Bug 147441 - Web Inspector: inherited CSS rules disappear from Styles sidebar while editing
Summary: Web Inspector: inherited CSS rules disappear from Styles sidebar while editing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P4 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-29 22:28 PDT by Nikita Vasilyev
Modified: 2015-07-31 23:48 PDT (History)
8 users (show)

See Also:


Attachments
Animated GIF of the problem (145.72 KB, image/gif)
2015-07-29 22:28 PDT, Nikita Vasilyev
no flags Details
Patch (8.86 KB, patch)
2015-07-30 22:03 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 Nikita Vasilyev 2015-07-29 22:28:43 PDT
Created attachment 257818 [details]
Animated GIF of the problem

<table>
    <tr style="font-weight: 300">
        <td>font-weight: 300</td>
    </tr>
</table>

Steps:
1. Inspect <td>
2. In the styles sidebar, change "font-weight: 300" to "font-weight: "

Expected:
"font-weight: " stays where it was, even though it's invalid CSS.

Actual:
"font-weight: " disappears.
Comment 1 Radar WebKit Bug Importer 2015-07-29 22:29:04 PDT
<rdar://problem/22066483>
Comment 2 Nikita Vasilyev 2015-07-30 12:03:09 PDT
It doesn't look like a regression, it was broken in a 7 months old build (r177585).

The problem only exists with inline styles, the following works as expected:

<style>
  span {color: red}
</style>
<div>
  <span>Test</span>
</div>

This seem like a low priority bug, setting it to P4.
Comment 3 Devin Rousso 2015-07-30 22:03:33 PDT
Created attachment 257899 [details]
Patch
Comment 4 Nikita Vasilyev 2015-07-31 18:14:28 PDT
(In reply to comment #3)
> Created attachment 257899 [details]
> Patch

I can confirm that this fixes the issue for the provided test case.
Comment 5 Timothy Hatcher 2015-07-31 20:49:27 PDT
Comment on attachment 257899 [details]
Patch

Do sections still update overrides when a duplicate property is added to the active section?
Comment 6 Devin Rousso 2015-07-31 22:50:30 PDT
(In reply to comment #5)
> Do sections still update overrides when a duplicate property is added to the
> active section?

From what I can tell, it still does (but obviously only if the property is in a section above the existing property or an important is added).
Comment 7 WebKit Commit Bot 2015-07-31 23:48:51 PDT
Comment on attachment 257899 [details]
Patch

Clearing flags on attachment: 257899

Committed r187714: <http://trac.webkit.org/changeset/187714>
Comment 8 WebKit Commit Bot 2015-07-31 23:48:55 PDT
All reviewed patches have been landed.  Closing bug.