Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: third_party/WebKit/Source/web/PopupMenuImpl.cpp

Issue 2824123002: SELECT popup: Fix OPTGROUP rendering on a device with a touch-screen. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "web/PopupMenuImpl.h" 5 #include "web/PopupMenuImpl.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/css/CSSFontSelector.h" 8 #include "core/css/CSSFontSelector.h"
9 #include "core/dom/ElementTraversal.h" 9 #include "core/dom/ElementTraversal.h"
10 #include "core/dom/NodeComputedStyle.h" 10 #include "core/dom/NodeComputedStyle.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 PagePopupClient::AddString( 267 PagePopupClient::AddString(
268 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); 268 "<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
269 data->Append(Platform::Current()->LoadResource("pickerCommon.css")); 269 data->Append(Platform::Current()->LoadResource("pickerCommon.css"));
270 data->Append(Platform::Current()->LoadResource("listPicker.css")); 270 data->Append(Platform::Current()->LoadResource("listPicker.css"));
271 if (!RuntimeEnabledFeatures::forceTallerSelectPopupEnabled()) 271 if (!RuntimeEnabledFeatures::forceTallerSelectPopupEnabled())
272 PagePopupClient::AddString("@media (any-pointer:coarse) {", data); 272 PagePopupClient::AddString("@media (any-pointer:coarse) {", data);
273 int padding = static_cast<int>(roundf(4 * scale_factor)); 273 int padding = static_cast<int>(roundf(4 * scale_factor));
274 int min_height = static_cast<int>(roundf(24 * scale_factor)); 274 int min_height = static_cast<int>(roundf(24 * scale_factor));
275 PagePopupClient::AddString(String::Format("option, optgroup {" 275 PagePopupClient::AddString(String::Format("option, optgroup {"
276 "padding-top: %dpx;" 276 "padding-top: %dpx;"
277 "padding-bottom: %dpx;" 277 "padding-bottom: %dpx;"
keishi 2017/04/18 05:45:49 Do we want to add a padding below optgroup, after
tkent 2017/04/18 06:04:49 You're right, padding-bottom isn't necessary. I th
278 "}\n"
279 "option {"
278 "min-height: %dpx;" 280 "min-height: %dpx;"
279 "display: flex;" 281 "display: flex;"
280 "align-items: center;" 282 "align-items: center;"
281 "}", 283 "}",
282 padding, padding, min_height), 284 padding, padding, min_height),
283 data); 285 data);
284 if (!RuntimeEnabledFeatures::forceTallerSelectPopupEnabled()) { 286 if (!RuntimeEnabledFeatures::forceTallerSelectPopupEnabled()) {
285 // Closes @media. 287 // Closes @media.
286 PagePopupClient::AddString("}", data); 288 PagePopupClient::AddString("}", data);
287 } 289 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 578 }
577 579
578 void PopupMenuImpl::DisconnectClient() { 580 void PopupMenuImpl::DisconnectClient() {
579 owner_element_ = nullptr; 581 owner_element_ = nullptr;
580 // Cannot be done during finalization, so instead done when the 582 // Cannot be done during finalization, so instead done when the
581 // layout object is destroyed and disconnected. 583 // layout object is destroyed and disconnected.
582 Dispose(); 584 Dispose();
583 } 585 }
584 586
585 } // namespace blink 587 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/fast/forms/select-popup/popup-menu-appearance-coarse-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698