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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTheme.cpp

Issue 2905763003: Rollback ContextMenu (Closed)
Patch Set: Delete RuntimeEnabledFeatures::contextMenuEnabled Created 3 years, 6 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 /** 1 /**
2 * This file is part of the theme implementation for form controls in WebCore. 2 * This file is part of the theme implementation for form controls in WebCore.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return AdjustSearchFieldStyle(style); 249 return AdjustSearchFieldStyle(style);
250 case kSearchFieldCancelButtonPart: 250 case kSearchFieldCancelButtonPart:
251 return AdjustSearchFieldCancelButtonStyle(style); 251 return AdjustSearchFieldCancelButtonStyle(style);
252 default: 252 default:
253 break; 253 break;
254 } 254 }
255 } 255 }
256 256
257 String LayoutTheme::ExtraDefaultStyleSheet() { 257 String LayoutTheme::ExtraDefaultStyleSheet() {
258 StringBuilder runtime_css; 258 StringBuilder runtime_css;
259 if (RuntimeEnabledFeatures::contextMenuEnabled())
260 runtime_css.Append("menu[type=\"context\" i] { display: none; }");
261 return runtime_css.ToString(); 259 return runtime_css.ToString();
tkent 2017/05/26 04:48:53 We can remove |runtime_css|, and return g_empty_st
yuzuchan 2017/05/30 07:15:20 Done.
262 } 260 }
263 261
264 static String FormatChromiumMediaControlsTime(float time, 262 static String FormatChromiumMediaControlsTime(float time,
265 float duration, 263 float duration,
266 bool include_separator) { 264 bool include_separator) {
267 if (!std::isfinite(time)) 265 if (!std::isfinite(time))
268 time = 0; 266 time = 0;
269 if (!std::isfinite(duration)) 267 if (!std::isfinite(duration))
270 duration = 0; 268 duration = 0;
271 int seconds = static_cast<int>(fabsf(time)); 269 int seconds = static_cast<int>(fabsf(time));
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 // padding - not honored by WinIE, needs to be removed. 911 // padding - not honored by WinIE, needs to be removed.
914 style.ResetPadding(); 912 style.ResetPadding();
915 913
916 // border - honored by WinIE, but looks terrible (just paints in the control 914 // border - honored by WinIE, but looks terrible (just paints in the control
917 // box and turns off the Windows XP theme) 915 // box and turns off the Windows XP theme)
918 // for now, we will not honor it. 916 // for now, we will not honor it.
919 style.ResetBorder(); 917 style.ResetBorder();
920 } 918 }
921 919
922 } // namespace blink 920 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698