New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735282 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

"!important" label doesn't show up when CSS is inserted by JS

Reported by human.p...@gmail.com, Jun 21 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.32 Safari/537.36

Steps to reproduce the problem:
1. Open http://jsbin.com/fiyugovaje
2. Inspect "test" element
3. Check the styles of it.

What is the expected behavior?
The style "color: red" inserted by JS should be marked with "!important" as it is.

What went wrong?
The style "color: red" inserted by JS is not marked with "!important", which doesn't match its behavior, and causes confusion (because it overrides the "color: blue" rule).

Did this work before? N/A 

Chrome version: 60.0.3112.32  Channel: beta
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 26.0 r0

Firefox and IE don't have this problem (see attachment).
 
bugreport.png
47.2 KB View Download
Labels: M-61 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows 7,Ubuntu 14.04 and Mac 10.12.5 using chrome version 59.0.3071.104 and canary 61.0.3136.0.
This is non regression issue as the issue seen from M30 old builds.
Marking it as  Untriaged to get more inputs from dev team.

Thanks,
Cc: einbinder@chromium.org
Owner: lushnikov@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a752fccf949634ba488c829191299fa6b306f0b

commit 3a752fccf949634ba488c829191299fa6b306f0b
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Tue Dec 12 22:54:04 2017

DevTools: properly report values for CSSOM important properties

DevTools expect the "!important" modifier to be a part of the property
value. This patch brings CSSOM-generated property values in line with
the assumption.

BUG= 735282 
R=dgozman

Change-Id: I2b3b852c66e07799c6437dd04841b5197b6c3201
Reviewed-on: https://chromium-review.googlesource.com/820974
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523584}
[modify] https://crrev.com/3a752fccf949634ba488c829191299fa6b306f0b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-2/cssom-shorthand-important-expected.txt
[add] https://crrev.com/3a752fccf949634ba488c829191299fa6b306f0b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/styles-cssom-important-property-expected.txt
[add] https://crrev.com/3a752fccf949634ba488c829191299fa6b306f0b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-3/styles-cssom-important-property.js
[modify] https://crrev.com/3a752fccf949634ba488c829191299fa6b306f0b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/styles-4/styles-new-API-expected.txt
[modify] https://crrev.com/3a752fccf949634ba488c829191299fa6b306f0b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment