Commit 2002e544 authored by sauski's avatar sauski Committed by Commit Bot

Enable interaction with Safe Browsing toggles when selection is disabled

This CL adjusts the cursor events for the toggle buttons located inside
the new Safe Browsing radio controls such that disabling the collapse
radio button they are inside does not prevent interaction with the
toggles.

Additionally cursor settings are adjusted such that when the toggles are
disabled because Safe Browsing Standard is not selected, hovering over
them does not display the pointer cursor, incorrectly indicating an
interaction is possible.

Bug: 1067385
Change-Id: I03b3b269af3660f8c16a172d241cbd1100dbe92f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134986Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: Theodore Olsauskas-Warren <sauski@google.com>
Cr-Commit-Position: refs/heads/master@{#757054}
parent 1b95cf58
...@@ -61,6 +61,10 @@ ...@@ -61,6 +61,10 @@
align-items: center; align-items: center;
display: flex; display: flex;
} }
slot[name='noSelectionCollapse'] {
cursor: auto;
}
</style> </style>
<div id="radioCollapse"> <div id="radioCollapse">
<div aria-checked$="[[getAriaChecked_(checked)]]" <div aria-checked$="[[getAriaChecked_(checked)]]"
...@@ -98,6 +102,7 @@ ...@@ -98,6 +102,7 @@
<iron-collapse opened="[[expanded]]"> <iron-collapse opened="[[expanded]]">
<slot name="collapse"></slot> <slot name="collapse"></slot>
<slot name="noSelectionCollapse"></slot>
</iron-collapse> </iron-collapse>
</template> </template>
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
<link rel="import" href="../people_page/sync_browser_proxy.html"> <link rel="import" href="../people_page/sync_browser_proxy.html">
<link rel="import" href="../prefs/prefs_behavior.html"> <link rel="import" href="../prefs/prefs_behavior.html">
<link rel="import" href="../prefs/prefs.html"> <link rel="import" href="../prefs/prefs.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="privacy_page_browser_proxy.html"> <link rel="import" href="privacy_page_browser_proxy.html">
<dom-module id="settings-passwords-leak-detection-toggle"> <dom-module id="settings-passwords-leak-detection-toggle">
<template> <template>
<style> <style include="settings-shared">
:host(.collapsable) settings-toggle-button { :host(.collapsable) settings-toggle-button {
border-top: none; border-top: none;
padding-bottom: 12px; padding-bottom: 12px;
......
...@@ -60,10 +60,19 @@ ...@@ -60,10 +60,19 @@
padding-bottom: 12px; padding-bottom: 12px;
} }
settings-passwords-leak-detection-toggle,
settings-toggle-button:not([disabled]) {
pointer-events: all;
}
#safeBrowsingReportingToggle { #safeBrowsingReportingToggle {
padding-inline-end: 0; padding-inline-end: 0;
padding-inline-start: 0; padding-inline-start: 0;
} }
#safeBrowsingEnhanced .bullet-line:last-of-type {
padding-bottom: 12px;
}
</style> </style>
<picture> <picture>
<source <source
...@@ -139,6 +148,8 @@ ...@@ -139,6 +148,8 @@
$i18n{safeBrowsingStandardBulTwo} $i18n{safeBrowsingStandardBulTwo}
</div> </div>
</div> </div>
</div>
<div slot="noSelectionCollapse">
<settings-toggle-button id="safeBrowsingReportingToggle" <settings-toggle-button id="safeBrowsingReportingToggle"
pref="{{prefs.safebrowsing.scout_reporting_enabled}}" pref="{{prefs.safebrowsing.scout_reporting_enabled}}"
class="first" class="first"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment