Bug 146176 - Web Inspector: Duplication of style attribute in rules panel for shadow content
Summary: Web Inspector: Duplication of style attribute in rules panel for shadow content
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: 2015-06-19 17:58 PDT by Joseph Pecoraro
Modified: 2015-06-19 23:21 PDT (History)
10 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.10 KB, patch)
2015-06-19 18:00 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (3.10 KB, patch)
2015-06-19 18:01 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-06-19 17:58:54 PDT
* SUMMARY
Duplicate of style attribute in rules panel for shadow content.

Regressed with: <http://trac.webkit.org/changeset/184000>

* TEST
<audio controls></audio>

* STEPS TO REPRODUCE
1. Inspect any page with <audio>
2. Enable Shadow DOM (Elements tab)
3. Expand the audio
4. Select the <input pseudo="-webkit-media-controls-timeline" style="background-image: -webkit-canvas(_webkit-media-controls-timeline-6bd0eaf2-ef13-461e-86f2-fc4d3c7794f2);" min="0" max="NaN" class="hidden">
5. Show Style Rules sidebar
  => the CSS is duplicated in the Styles Attribute section

* NOTES
- CSSStyleDeclarationTextEditor.js's CSSStyleDeclarationTextEditor.prototype._resetContent makes an assumption that styleText will always be empty for a readOnly editor. It turns out that for a Style Attribute that is Read Only, that is not the case. I think the only way that can happen is a Shadow DOM node with a Style Attribute (as we are seeing it here). We should more gracefully handle this.
Comment 1 Joseph Pecoraro 2015-06-19 17:59:06 PDT
<rdar://problem/21467669>
Comment 2 Joseph Pecoraro 2015-06-19 18:00:55 PDT
Created attachment 255259 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-06-19 18:01:43 PDT
Created attachment 255260 [details]
[PATCH] Proposed Fix

Fixed title.
Comment 4 Tobias Reiss 2015-06-19 18:18:04 PDT
Good catch and good fix! I would add it to the commit-queue.
Comment 5 WebKit Commit Bot 2015-06-19 23:21:05 PDT
Comment on attachment 255260 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 255260

Committed r185789: <http://trac.webkit.org/changeset/185789>
Comment 6 WebKit Commit Bot 2015-06-19 23:21:11 PDT
All reviewed patches have been landed.  Closing bug.