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

Issue 841202 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression : Cookies remain blocked even after selecting 'Always allow...' option from cookies blocked bubble.

Reported by pranjali...@etouch.net, May 9 2018

Issue description

Chrome version : 67.0.3396.40 (Official Build) Revision 4d4e946fc6b643fe97197ead24e3a6f414385ad3-refs/branch-heads/3396@{#527} (32/64-bit) 

OS : Mac(10.12.6,10.13.1,10.13.5),Windows(7,8,8.1,10) and Linux(14.04 LTS) OS.

Steps to reproduce:
1. Launch chrome and navigate to 'https://www.google.com/'.
2. Block cookies for same site and click on 'reload' button.
3. Now click on blocked cookie icon on omnibox and press tab key to bring focus on 'Always allow...' radio button.
4. Now again press tab until focus reaches to 'Done' button and observe.

Actual Result: Cookies remain blocked even after selecting 'Always allow...' option from cookies blocked bubble.
Expected Result: Cookies should get unblocked after selecting 'Always allow...' option from cookies blocked bubble.

This is a regression issue broken in ‘M-61’ and using the per-revision bisect providing the bisect results,
Good build: 61.0.3142.0 (Revision: 482492)
Bad build: 61.0.3143.0 (Revision : 482834)

Unable to provide the bisect using per-revision script as getting trace back error while doing the bisect. 
Hence providing the bisect using old bisect script.

You are probably looking for a change made after 482733 (known good), but no later than 482742 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/ee0ed6a262fc3b0e73b3000cd95f0984f019c72f..2f4fffab7a7e37c37466670730dd5e97e7ee8486 

Suspect: r482735

@bsep: Could you please look into the issue, pardon me if it has nothing to do with your changes and if possible please assign it to concern owner.

Note: Issue is not reproducible after clicking 'Always allow...' option from cookies blocked bubble using mouse.

Thank you.
 
Actual_result.mp4
624 KB View Download
Expected_result.mp4
698 KB View Download

Comment 1 by bsep@chromium.org, May 14 2018

Cc: bsep@chromium.org
Owner: tbergquist@chromium.org
Delegating
Summarizing a bit of repro detail here:
Selecting the radio button option with the mouse works.
Selecting the radio button option with the keyboard arrow keys does not work.
Selecting the radio button option with the keyboard arrow keys, and then pressing enter, does work.

I agree with OP that 482735 is very likely to have introduced the issue.
My current hypothesis: ContentSettingSingleRadioGroup has a selected_item_ field that tracks the selected radio option, but the code that updates it only listens for click events.  Before 482735, selecting a radio button option with the arrow keys simulated a click on that radio button. 482735 removed that simulated click in order to remove the 'ink drop' animation when selecting a radio option with arrow keys.  However, the simulated click was also the mechanism that updated selected_item_, so without it, selected_item_ gets out of sync with the radio group's state.

I'll add a unit test to validate that hypothesis, and if it checks out will try removing selected_item_ so we don't have duplicated state.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 13

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

commit 754f9b669fd1200644b11820597926099b60d4b3
Author: Taylor Bergquist <tbergquist@chromium.org>
Date: Fri Jul 13 23:12:02 2018

Fix radio buttons in content setting bubbles

The various content setting bubbles were listening to their radio
buttons and maintaining a separate copy of the buttons' checkedness
state.  However, radio buttons didn't notify their listeners when the
arrow keys were used to change checkedness; they only notified on mouse
events.

This CL makes the bubbles refer to the actual radio button state when
closing instead of listening to the buttons.  It also gets rid of radio
button listening as a thing, since it didn't work anyways and nobody
else was using it.

Other yaks shaved by this change:
- Remove Checkbox::set_listener so that it can't be called on radio
buttons.  Listeners must be added at construction time now.
- Move the business logic out of destructors in the content setting
bubbles so that the bubble models can reference their views without
worrying about them having been already cleaned up.  It's now in an
explicitly invoked separate method 'CommitChanges'.
- The RPH (register protocol handler) content setting bubble was the
only one that applied settings changes as users clicked on radio
buttons, rather than when the dialog was closed.  It's now consistent
with the other bubbles.

Bug:  841202 
Change-Id: I16761571fd03bb1925d95995d8b7e6f0e03aa02a
Reviewed-on: https://chromium-review.googlesource.com/1128377
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Taylor Bergquist <tbergquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575112}
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ash/message_center/notifier_settings_view.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/content_setting_bubble_model.h
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
[add] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/fake_owner.cc
[add] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/fake_owner.h
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/content_settings/framebust_block_browsertest.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/chrome_cleaner_dialog_win.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/content_setting_bubble_contents.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/content_setting_bubble_contents.h
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/create_application_shortcut_view.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/global_error_bubble_view_unittest.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/media_router/cast_dialog_sink_button_unittest.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/translate/translate_bubble_view.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/chrome/browser/ui/views/uninstall_view.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/message_center/views/notification_view_md.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/controls/button/checkbox.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/controls/button/checkbox.h
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/controls/button/radio_button.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/box_layout_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/checkbox_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/dialog_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/label_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/multiline_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/radio_button_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/radio_button_example.h
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/table_example.cc
[modify] https://crrev.com/754f9b669fd1200644b11820597926099b60d4b3/ui/views/examples/text_example.cc

Status: Fixed (was: Assigned)
Forgot to mark this one fixed.

Sign in to add a comment