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

Issue 818518 link

Starred by 5 users

Issue metadata

Status: Fixed
Merged: issue 814937
Owner:
Last visit 28 days ago
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

DevTools cannot "Add new style rule" to css files for local webpages

Reported by billchen...@gmail.com, Mar 4 2018

Issue description

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

Steps to reproduce the problem:
1. Create any HTML webpage and run it on Chrome, the URL will be like "file:///C:/test.htm".

2. Open DevTools -> select any HTML element -> Click the icon of "Add new style rule", if choosing "inspector-stylesheet", everything is fine and styles can be added successfully. HOWEVER, if choosing any specific css file like the screenshot below shows, then it won't work, the style will disappear.

3. If you open the same webpage with URL like "http://localhost/test.htm", everything works fine.

4. The bug exists since Chrome 64. For chrome 64, "Add new style rule" doesn't work for local page, then I reported the bug (issue id: 814937) to the Chrome team, they fix it on Chrome 65 beta. But when I test it, I still encounter the issue here.

What is the expected behavior?

What went wrong?
The style cannot be added to any other css file except the default "Inspector-Stylesheet"

Did this work before? Yes Chrome 63

Chrome version: 65.0.3325.106  Channel: beta
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

I reported the bug below, the Chrome team said they have fixed it on Chrome 65 beta. When I test it and found not completely fix it. Here is the original bug's link:

https://bugs.chromium.org/p/chromium/issues/detail?id=814937#c20
 
bug.JPG
150 KB View Download
Labels: Needs-Bisect Needs-Triage-M65
Cc: sindhu.chelamcherla@chromium.org
Labels: -Pri-2 -Needs-Bisect hasbisect-per-revision Target-67 Triaged-ET RegressedIn-64 Target-66 M-65 Target-64 Target-65 FoundIn-66 FoundIn-67 FoundIn-64 FoundIn-65 ReleaseBlock-Stable OS-Linux OS-Mac Pri-1
Owner: lushnikov@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce this issue on latest stable 64.0.3282.186, on latest beta 65.0.3325.106 and latest canary 67.0.3361.0 using Mac 10.13.3, Ubuntu 14.04 and Windows 10. i.e; Unable to add new style rule when css is selected.

NOTE:  Issue 814937  mentioned in comment#0 is fixed on above builds.

Good Build: 64.0.3280.0
Bad Build: 64.0.3281.0

You are probably looking for a change made after 520004 (known good), but no later than 520005 (first known bad).
CHANGELOG URL:
 https://chromium.googlesource.com/chromium/src/+log/447db371759f0d9638769a7b22b9560a1b2d5da5..a4ebe08c91e29140e700c7bae9b94f27a786d1ca

Reviewed-on: https://chromium-review.googlesource.com/783911

Suspecting same from changelog.

As @ meade is no longer working on chrome assigning to @lushnikov from 814937.

@lushnikov: Please confirm the bug and help in re-assigning if it is not related to your change. Adding RB-Stable as this is a recent regression. Please change if not the case.

Thanks!
Cc: dgozman@chromium.org
Per comment 
Mergedinto: 814937
Status: Duplicate (was: Assigned)
Labels: -M-65 M-66
Status: Assigned (was: Duplicate)
Sorry, duplicated this one by mistake. We'll take a look. Thanks for filing this issue!

Not an M65 blocker given M64 presence, but we'll fix for M66.
Friendly ping to get an update on this issue as it is marked as stable blocker.

Thanks..!
Gentle ping to get an update on this issue.

Thanks..!
Can anybody know that when this bug will be fixed? which version of Chrome will contain the fixed feature? 
lushnikov@, do we have further update on this?
Just a heads up, M66 Stable cut is on April 12th, 10 days away. This issue is marked as RB-Stable for 66. Please make sure to address this issue prior to stable cut. Thanks! 
Friendly ping to get an update on this issue as it is marked as stable blocker & M66 Stable cut is on April 12th.

Thanks..! 

Reminder: Please note that M66 Stable is only 7 days away. This bug has been marked as ReleaseBlock Stable for M66. So please take a look and appropriately address this bug. 
Labels: -M-66 -Target-64 -Target-65 -Target-66 M-67 Target-68
It is so disappointing that such an important bug needs taking 2+ months to fix it.  
Today Google Chrome 66 is just released, I update my web browser immediately, just hope this bug has been fixed. I crossed my finger and pray the annoying bug can disappear. However, the bug is still there. 

Please developers take actions faster to kill this bug, Please.
Project Member

Comment 16 by bugdroid1@chromium.org, Apr 19 2018

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

commit 85535060d2e16341b2bde83e21e2a41a7ad35509
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Thu Apr 19 21:24:31 2018

DevTools: fix CSS.addRule protocol method for file:// urls

The previous attempt to fix the bug was in crrev.com/539166:
the patch allowed adding rules to the inspector style sheets.
However, it didn't take into account adding rules into the
already-existing style sheets.

This patch fixes CSS.addRule altogether, allowing CSSOM access
if the operation is happenning from-inside InspectorMutationScope.

Our tests didn't catch the regression since we run with
--allow-file-access-from-files flag.

BUG= 818518 
R=dgozman

Change-Id: Ic6b198a5ef7abbabcef671edbefb5a9b14fde531
Reviewed-on: https://chromium-review.googlesource.com/1018526
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552161}
[modify] https://crrev.com/85535060d2e16341b2bde83e21e2a41a7ad35509/third_party/blink/renderer/core/css/css_style_sheet.cc
[modify] https://crrev.com/85535060d2e16341b2bde83e21e2a41a7ad35509/third_party/blink/renderer/core/css/css_style_sheet.h
[modify] https://crrev.com/85535060d2e16341b2bde83e21e2a41a7ad35509/third_party/blink/renderer/core/inspector/InspectorCSSAgent.cpp

@billchengreat: sorry for this taking so long.
The fix will be available on tomorrow's Canary.
Labels: TE-Verified-M68 TE-Verified-68.0.3401.0
Able to reproduce the issue on reported version  65.0.3325.106, hence verifying the fix on latest canary 68.0.3401.0 using Mac 10.13.3, Windows 10 and Ubuntu 14.04.

Observing successful adding of style rule. Attaching screencast for reference.

As fix is working as expected, adding Verified labels.

Thanks!
M67 Stable promotion is coming soon. Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and request a merge into the release branch ASAP. Thank you.


Labels: -ReleaseBlock-Stable
Status: Fixed (was: Assigned)
I don't think this is safe to merge into Stable:
- the merge will have to be manual due to Great Blink Move
- we failed to come up with a decent test coverage for this due to the limitations of our test infrastructure.


Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-67; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-67 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD
The bug was promised to be fixed in version 67. I have waited for so long and finally Chrome 67 is released today. I am so excited to check if the bug has been killed or not, however, it still ugly exists in the latest version 67.

It appears Chrome development team needs 1 century to fix such a small bug, and the promise is broken again and again. Please wake up, Google Chrome team, don't sleep on the desk too long, you guys need to WORK!

Sign in to add a comment