Commit 489e4293 authored by Mike West's avatar Mike West Committed by Commit Bot

Revert "Fixed color-picker style when opened from datalist via Other button."

This reverts commit 0fac3886.

Reason for revert: 

`virtual/controls-refresh/color/color-picker-from-color-suggestion-picker.html` test failures beginning in https://ci.chromium.org/p/chromium/builders/ci/linux-trusty-rel/9370.

Original change's description:
> Fixed color-picker style when opened from datalist via Other button.
> 
> The issue was caused by the fact that the color-picker style wasn't added
> when constructing the color-suggestion-picker popup.
> 
> Added a test to validate the change and prevent future regressions.
> 
> Bug: 1062501
> Change-Id: Iaf561f33e18bf2f26a8f87ffd1fb549118e02764
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108091
> Commit-Queue: Ionel Popescu <iopopesc@microsoft.com>
> Reviewed-by: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#751610}

TBR=tkent@chromium.org,masonfreed@chromium.org,iopopesc@microsoft.com

Change-Id: I8f55d4ca75cf35bea0da47ba9f79a422ee87bd9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1062501
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107845Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751625}
parent 9a376230
......@@ -136,8 +136,6 @@ void ColorChooserPopupUIController::WriteColorSuggestionPickerDocument(
"<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
data->Append(ChooserResourceLoader::GetPickerCommonStyleSheet());
data->Append(ChooserResourceLoader::GetColorSuggestionPickerStyleSheet());
if (features::IsFormControlsRefreshEnabled())
data->Append(ChooserResourceLoader::GetColorPickerStyleSheet());
PagePopupClient::AddString(
"</style></head><body>\n"
"<div id='main'>Loading...</div><script>\n"
......
<!DOCTYPE html>
<html>
<head>
<script>
testRunner.waitUntilDone();
</script>
<script src='../../../fast/forms/resources/picker-common.js'></script>
</head>
<body>
<input type='color' id='color' list='gray'>
<datalist id='gray'>
<option>#ffffff</option>
<option>#eeeeee</option>
<option>#dddddd</option>
<option>#cccccc</option>
<option>#bbbbbb</option>
<option>#aaaaaa</option>
<option>#999999</option>
<option>#888888</option>
<option>#777777</option>
<option>#666666</option>
<option>#555555</option>
<option>#444444</option>
<option>#333333</option>
<option>#222222</option>
<option>#111111</option>
<option>#000000</option>
</datalist>
<script>
openPicker(document.getElementById('color'), openPickerSuccessfulCallback, () => testRunner.notifyDone());
function openPickerSuccessfulCallback() {
popupWindow.focus();
const popupDocument = popupWindow.document;
const otherColor = popupDocument.querySelector('.other-color');
const otherColorRect = otherColor.getBoundingClientRect();
// Click the Other color button.
eventSender.mouseMoveTo(otherColorRect.left + (otherColorRect.width / 2), otherColorRect.top + (otherColorRect.height / 2));
eventSender.mouseDown();
eventSender.mouseUp();
popupWindow.focus();
testRunner.notifyDone();
}
</script>
</body>
</html>
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