OLD | NEW |
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 default: | 399 default: |
400 break; | 400 break; |
401 } | 401 } |
402 | 402 |
403 return false; | 403 return false; |
404 } | 404 } |
405 | 405 |
406 String RenderTheme::extraDefaultStyleSheet() | 406 String RenderTheme::extraDefaultStyleSheet() |
407 { | 407 { |
408 StringBuilder runtimeCSS; | 408 StringBuilder runtimeCSS; |
409 runtimeCSS.appendLiteral("dialog:not([open]) { display: none; }"); | 409 if (RuntimeEnabledFeatures::contextMenuEnabled()) |
410 runtimeCSS.appendLiteral("dialog { position: absolute; left: 0; right: 0; wi
dth: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: sol
id; padding: 1em; background: white; color: black;}"); | |
411 runtimeCSS.appendLiteral("dialog::backdrop { position: fixed; top: 0; right:
0; bottom: 0; left: 0; background: rgba(0,0,0,0.1); }"); | |
412 | |
413 if (RuntimeEnabledFeatures::contextMenuEnabled()) { | |
414 runtimeCSS.appendLiteral("menu[type=\"popup\" i] { display: none; }"); | 410 runtimeCSS.appendLiteral("menu[type=\"popup\" i] { display: none; }"); |
415 } | |
416 | |
417 return runtimeCSS.toString(); | 411 return runtimeCSS.toString(); |
418 } | 412 } |
419 | 413 |
420 String RenderTheme::formatMediaControlsTime(float time) const | 414 String RenderTheme::formatMediaControlsTime(float time) const |
421 { | 415 { |
422 if (!std::isfinite(time)) | 416 if (!std::isfinite(time)) |
423 time = 0; | 417 time = 0; |
424 int seconds = (int)fabsf(time); | 418 int seconds = (int)fabsf(time); |
425 int hours = seconds / (60 * 60); | 419 int hours = seconds / (60 * 60); |
426 int minutes = (seconds / 60) % 60; | 420 int minutes = (seconds / 60) % 60; |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 | 1197 |
1204 // padding - not honored by WinIE, needs to be removed. | 1198 // padding - not honored by WinIE, needs to be removed. |
1205 style->resetPadding(); | 1199 style->resetPadding(); |
1206 | 1200 |
1207 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1201 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
1208 // for now, we will not honor it. | 1202 // for now, we will not honor it. |
1209 style->resetBorder(); | 1203 style->resetBorder(); |
1210 } | 1204 } |
1211 | 1205 |
1212 } // namespace blink | 1206 } // namespace blink |
OLD | NEW |