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

Side by Side Diff: Source/web/PopupListBox.cpp

Issue 23691071: OS(ANDROID) should not imply OS(LINUX) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Refactor OS macros to have exclusive priority order Created 7 years, 2 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/config.h ('k') | Source/web/WebViewImpl.cpp » ('j') | 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 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // Paint background 399 // Paint background
400 Color backColor, textColor, labelColor; 400 Color backColor, textColor, labelColor;
401 if (rowIndex == m_selectedIndex) { 401 if (rowIndex == m_selectedIndex) {
402 backColor = RenderTheme::theme().activeListBoxSelectionBackgroundColor() ; 402 backColor = RenderTheme::theme().activeListBoxSelectionBackgroundColor() ;
403 textColor = RenderTheme::theme().activeListBoxSelectionForegroundColor() ; 403 textColor = RenderTheme::theme().activeListBoxSelectionForegroundColor() ;
404 labelColor = textColor; 404 labelColor = textColor;
405 } else { 405 } else {
406 backColor = style.backgroundColor(); 406 backColor = style.backgroundColor();
407 textColor = style.foregroundColor(); 407 textColor = style.foregroundColor();
408 408
409 #if OS(LINUX) 409 #if OS(LINUX) || OS(ANDROID)
410 // On other platforms, the <option> background color is the same as the 410 // On other platforms, the <option> background color is the same as the
411 // <select> background color. On Linux, that makes the <option> 411 // <select> background color. On Linux, that makes the <option>
412 // background color very dark, so by default, try to use a lighter 412 // background color very dark, so by default, try to use a lighter
413 // background color for <option>s. 413 // background color for <option>s.
414 if (style.backgroundColorType() == PopupMenuStyle::DefaultBackgroundColo r && RenderTheme::theme().systemColor(CSSValueButtonface) == backColor) 414 if (style.backgroundColorType() == PopupMenuStyle::DefaultBackgroundColo r && RenderTheme::theme().systemColor(CSSValueButtonface) == backColor)
415 backColor = RenderTheme::theme().systemColor(CSSValueMenu); 415 backColor = RenderTheme::theme().systemColor(CSSValueMenu);
416 #endif 416 #endif
417 417
418 // FIXME: for now the label color is hard-coded. It should be added to 418 // FIXME: for now the label color is hard-coded. It should be added to
419 // the PopupMenuStyle. 419 // the PopupMenuStyle.
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 { 929 {
930 return numItems() && IntRect(0, 0, width(), height()).contains(point); 930 return numItems() && IntRect(0, 0, width(), height()).contains(point);
931 } 931 }
932 932
933 int PopupListBox::popupContentHeight() const 933 int PopupListBox::popupContentHeight() const
934 { 934 {
935 return height(); 935 return height();
936 } 936 }
937 937
938 } // namespace WebCore 938 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/config.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698