Bug 35348 - Web Inspector: Adding a style attribute via the Style panel doesn't update the DOM view
Summary: Web Inspector: Adding a style attribute via the Style panel doesn't update th...
Status: RESOLVED DUPLICATE of bug 51478
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 09:09 PST by Anthony Ricaud
Modified: 2011-01-14 05:06 PST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2010-02-24 09:09:39 PST
Steps to reproduce:

1) Open any webpage
2) Add a style attribute in the Styles column (like color: red;)

Actual results:
The body node doesn't show the style attribute

Expected:
The body node shows the style attribute

Note that the added style is applied to the webpage. Only the DOM view is not updated.
Comment 1 Adam 2010-08-19 16:14:49 PDT
What you are adding is css styles, not attributes.  They wouldn't show up as an attribute in the DOM like <font color=red>.  There isn't anything that should need to be updated at all on the dom view.

You are editing the properties and values of the selector.  If you want to add an attribute in the dom, you can right click a node and add an attribute, it will be added and reflected upon the page.
Comment 2 Adam 2010-08-19 16:19:41 PDT
Sigh... disregard my entire comment, I'm confused.

It is a valid problem when editing in the "element's 'style' attribute".
Comment 3 Joseph Pecoraro 2010-08-19 16:20:00 PDT
(In reply to comment #1)
> What you are adding is css styles, not attributes.

Actually this bug refers to editing the "Style Attribute" section in
the Styles Sidebar. Those are connected to the DOM Element's
style="..." attribute. This is a special section that always exists
in the Styles Sidebar.

For an example:

  <div>
    <p>Text</p>
  </div>

  1. Select the <div>
  2. In the "element.style" section, add "color:red"
  -> at this point the div's style attribute is set. But the DOM wasn't updated!

If you close and reopen the inspector you will see the correct
styles in DOM:

  <div style="color:red">
    <p>Text</p>
  </div>
Comment 4 Joseph Pecoraro 2010-08-19 16:20:50 PDT
(In reply to comment #2)
> Sigh... disregard my entire comment, I'm confused.
> It is a valid problem when editing in the "element's 'style' attribute".

No problem =). Too bad Bugzilla doesn't allow deleting comments.
Comment 5 Alexander Pavlov (apavlov) 2011-01-14 05:06:39 PST
The symptoms sound like bug 51478, which has been fixed in ToT.

*** This bug has been marked as a duplicate of bug 51478 ***