Bug 178990 - Web Inspector: Styles: Editing style attribute prepends line-break
Summary: Web Inspector: Styles: Editing style attribute prepends line-break
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-29 13:40 PDT by Nikita Vasilyev
Modified: 2017-10-29 13:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-10-29 13:40:12 PDT
Editing the style attribute via the sidebar causes a line-break character to be prepended to the style attribute text in the DOM tree.

This affects both the old and the new styles sidebar.
Comment 1 Radar WebKit Bug Importer 2017-10-29 13:40:56 PDT
<rdar://problem/35242049>
Comment 2 Nikita Vasilyev 2017-10-29 13:43:31 PDT
This was introduced in Bug 157869 - REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar.

https://bugs.webkit.org/show_bug.cgi?id=157869#c10:
> This patch is essentially fixes the bug without making too much changes in
> how we handle spacing and indentation in CSS.
> In the future, we shouldn't append or prepend "\n" to inline styles at all.
> This would require more changes to be made, which can
> potentially break things.

Now is a good time to make these changes and add more tests.