Commit f7fefaed authored by Shimi Zhang's avatar Shimi Zhang Committed by Commit Bot

[Search form] Don't allow selection on cancel button

With the new algorithm in http://crrev/c/1102157, we won't be able to
select cross editing boundary anymore, so layout test
search-cancel-button-mouseup.html will violate a DCHECK in
|TextControlElement::CacheSelection()|.

In fact, we shouldn't allow selection starts with cancel button at all,
this CL adds |user-select: none;| to |SearchFieldCancelButtonElement|.

Bug: 863651
Change-Id: Id23b50503caaf814b0a8a14ea1b7c243b3c51c68
Reviewed-on: https://chromium-review.googlesource.com/1141350Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576321}
parent 07210ac6
......@@ -4608,9 +4608,6 @@ crbug.com/862643 http/tests/serviceworker/navigation_preload/use-counter.html [
# Sheriff 2018-7-12
crbug.com/863067 [ Win10 ] virtual/user-activation-v2/fast/dom/Window/window-focus-self.html [ Failure Pass ]
# crrev/c/1102157 exposed this DCHECK violation is an unwanted behavior.
crbug.com/863651 fast/forms/search/search-cancel-button-mouseup.html [ Crash Pass ]
# Sheriff 2018-7-13
crbug.com/863599 [ Linux Debug ] external/wpt/requestidlecallback/callback-iframe.html [ Pass Timeout ]
......
......@@ -467,6 +467,7 @@ input[type="search" i]::-webkit-search-cancel-button {
-webkit-margin-start: 1px;
opacity: 0;
pointer-events: none;
user-select: none !important;
}
input[type="search" i]:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-search-cancel-button {
......
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