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

Issue 668031 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Regression: In chrome://net-internals, border color of input text box is not seen in red color.

Reported by lpa...@etouch.net, Nov 23 2016

Issue description

Version: 57.0.2928.0 (Official Build) 61ab768cc656a8bef5e8f08972d0f58a74f89c83-refs/heads/master@{#433845} (32/64-bit)
OS: Windows (7,8,10), Mac (10.11.6, 10.12.1), Linux (14.04 LTS)

What steps will reproduce the problem?
1) Launch chrome, go to chrome://net-internals and click on ’Save to file’ button (Pop up opens).
2) Observe the border of input text box in the background.

Border of input text box is seen in black color.

Border of input text box should be seen in red color.

This is a Regression issue broken in M-52, below is the bisect info
Manual bisect:
Good build: 52.0.2742.0
Bad build: 52.0.2743.0

Narrow bisect URL:
https://chromium.googlesource.com/chromium/src/+log/6b693cb69c1731ac3e4fa0851e64fd10fa820a1c..003cd61ab7a3e38d8f7fdfe55068c5450ed1bb68?pretty=fuller&n=10000

Suspecting: r394883
 
net-internals.jpg
319 KB View Download
Cc: aelias@chromium.org
We changed the alert box and other JS dialog behavior in
https://codereview.chromium.org/1931793002

But this is an intended behavior. We need to change the margin color of the textarea before showing the alert because we do not handle nested message loop any more.

robhogan@, are you the right person to assign this to? If not, could you help reassign this issue?

Cc: changwan@chromium.org
Owner: robhogan@chromium.org
really assigning to robhogan@
On a second thought, this can happen even if you change the color before calling alert.

from  issue 639150 :

alert is immediately blocking whereas painting posts asynchronous tasks, and we intentionally changed not to run any tasks on the main message loop while the alert is active.

FYI, the change is documented here:
https://www.chromestatus.com/features/5683408571203584

When you modify the DOM, although the change to the DOM itself is instantaneous, actually painting it to the screen is posted as a task/microtask on the loop to be run after your JS yields.  This is an essential optimization to avoid multiple paint passes when JS touches a lot of DOM at once, shared among all browsers.

What changed in Chrome M52 is that alert(), which is a immediately run "paused task", now better conforms to the spec text: "While a user agent has a paused task, the corresponding event loop must not run further tasks, and any script in the currently running task must block."  On Firefox, IE and Chrome <=51, there is a special "nested event loop" that runs more tasks inside paused tasks, which we removed.  This conforms with Safari's behavior and other browser vendors may eventually also follow.


That said, one workaround to wait for paint might be to call window.setTimeout(). Attaching a sample code for your reference.


paint_alert.html
463 bytes View Download
Cc: -changwan@chromium.org robhogan@chromium.org
Owner: changwan@chromium.org
Hi changwan@ - why do you suspect my change? It's related to painting overflow on tables. https://chromium.googlesource.com/chromium/src/+/806f45bd9dd5e39cdc20009f2b03bfa9d24566e0
I don't suspect that at all.

I'm trying to assign this to someone knowledgeable about internal ui.
This is completely out of my knowledge boundary, although my change has caused it.
Cc: changwan@chromium.org
Owner: ----
Status: Available (was: Assigned)
robhogan@, could you help find the right assignee for this? I'm completely illiterate in internals code.

Owner: changwan@chromium.org
Status: Assigned (was: Available)
Hmm... actually, let me give it more thought first...
Labels: -Pri-1 Pri-2
Yes, this is basically a dupe of  http://crbug.com/639150  .  I've thought about this a bit more and I think it would really difficult to bring back the old behavior without bringing back a nested message loop, as it intrinsically requires reordering.  I think we likely want to just commit to the new behavior as effectively the new web spec behavior with Chrome and Safari on the vanguard of it.

Since you already found a Javascript-side fix using setTimeout, how about you simply apply it in chrome/browser/resources/net_internals/export_view.js ?  Another Javascript-side workaround would be to get rid of the red border and alert business entirely and to gray out the submit button until text is present instead.
Project Member

Comment 9 by bugdroid1@chromium.org, Dec 7 2016

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

commit 3aeac6ac2bb076ec6d08dd1056f8b41a981b3771
Author: changwan <changwan@chromium.org>
Date: Wed Dec 07 00:34:24 2016

Disable save-to-file button until there is some text

Due to the change caused by
https://www.chromestatus.com/features/5683408571203584,
we do not update layout in the background while alert modal dialog is
showing up.

This has caused a regression in chrome://net-internals/#export ,
where we show red border before calling alert() to draw user's attention.

We could also use window.setTimeout() to avoid the issue, but disabling
save-to-file button is probably a better UX.

BUG= 668031 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2544263002
Cr-Commit-Position: refs/heads/master@{#436780}

[modify] https://crrev.com/3aeac6ac2bb076ec6d08dd1056f8b41a981b3771/chrome/browser/resources/net_internals/export_view.html
[modify] https://crrev.com/3aeac6ac2bb076ec6d08dd1056f8b41a981b3771/chrome/browser/resources/net_internals/export_view.js

Status: Fixed (was: Assigned)

Sign in to add a comment