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

Side by Side Diff: Source/core/rendering/RenderTheme.cpp

Issue 443373002: Add <menuitem>, new HTMLMenuElement IDL attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed comments Created 6 years, 4 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
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 String RenderTheme::extraDefaultStyleSheet() 413 String RenderTheme::extraDefaultStyleSheet()
414 { 414 {
415 StringBuilder runtimeCSS; 415 StringBuilder runtimeCSS;
416 if (RuntimeEnabledFeatures::dialogElementEnabled()) { 416 if (RuntimeEnabledFeatures::dialogElementEnabled()) {
417 runtimeCSS.appendLiteral("dialog:not([open]) { display: none; }"); 417 runtimeCSS.appendLiteral("dialog:not([open]) { display: none; }");
418 runtimeCSS.appendLiteral("dialog { position: absolute; left: 0; right: 0 ; width: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: solid; padding: 1em; background: white; color: black;}"); 418 runtimeCSS.appendLiteral("dialog { position: absolute; left: 0; right: 0 ; width: -webkit-fit-content; height: -webkit-fit-content; margin: auto; border: solid; padding: 1em; background: white; color: black;}");
419 runtimeCSS.appendLiteral("dialog::backdrop { position: fixed; top: 0; ri ght: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.1); }"); 419 runtimeCSS.appendLiteral("dialog::backdrop { position: fixed; top: 0; ri ght: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.1); }");
420 } 420 }
421 421
422 if (RuntimeEnabledFeatures::contextMenuEnabled()) {
423 runtimeCSS.appendLiteral("menu[type=\"popup\" i] { display: none; }");
424 }
425
422 return runtimeCSS.toString(); 426 return runtimeCSS.toString();
423 } 427 }
424 428
425 String RenderTheme::formatMediaControlsTime(float time) const 429 String RenderTheme::formatMediaControlsTime(float time) const
426 { 430 {
427 if (!std::isfinite(time)) 431 if (!std::isfinite(time))
428 time = 0; 432 time = 0;
429 int seconds = (int)fabsf(time); 433 int seconds = (int)fabsf(time);
430 int hours = seconds / (60 * 60); 434 int hours = seconds / (60 * 60);
431 int minutes = (seconds / 60) % 60; 435 int minutes = (seconds / 60) % 60;
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1219
1216 // padding - not honored by WinIE, needs to be removed. 1220 // padding - not honored by WinIE, needs to be removed.
1217 style->resetPadding(); 1221 style->resetPadding();
1218 1222
1219 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme) 1223 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
1220 // for now, we will not honor it. 1224 // for now, we will not honor it.
1221 style->resetBorder(); 1225 style->resetBorder();
1222 } 1226 }
1223 1227
1224 } // namespace blink 1228 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698